Commit 7cc11cb1 authored by Gene Ragan's avatar Gene Ragan
Browse files

*** empty log message ***

parent 1f69f692
2000-05-10 Gene Z. Ragan <gzr@eazel.com>
* components/notes/ntl-notes.c: (make_notes_view):
* libnautilus-extensions/nautilus-undo-manager-component.idl:
* libnautilus/nautilus-view-component.idl:
* libnautilus/nautilus-view-frame.c:
(nautilus_view_frame_get_main_window):
* libnautilus/nautilus-view-frame.h:
* src/ntl-app.c: (impl_Nautilus_Application__get_undo_manager):
* src/ntl-window-msgs.c: (nautilus_window_request_location_change):
* src/ntl-window.h:
2000-05-10 John Sullivan <set EMAIL_ADDRESS environment variable>
* libnautilus/nautilus-bonobo-ui.h: Added #define for path of
......
......@@ -127,8 +127,7 @@ notes_notify_location_change (NautilusViewFrame *view,
}
static void
do_destroy (GtkObject *obj, Notes *notes)
{
......@@ -148,8 +147,8 @@ make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer cl
GtkWidget *vbox;
Notes *notes;
NautilusBackground *background;
NautilusClipboardInfo *info;
NautilusClipboardInfo *info;
g_return_val_if_fail (strcmp (goad_id, "OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185") == 0, NULL);
notes = g_new0 (Notes, 1);
notes->uri = g_strdup ("");
......@@ -192,8 +191,8 @@ make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer cl
/* set description */
nautilus_meta_view_frame_set_label (NAUTILUS_META_VIEW_FRAME (notes->view),
_("Notes"));
return BONOBO_OBJECT (notes->view);
return BONOBO_OBJECT (notes->view);
}
int
......
......@@ -127,8 +127,7 @@ notes_notify_location_change (NautilusViewFrame *view,
}
static void
do_destroy (GtkObject *obj, Notes *notes)
{
......@@ -148,8 +147,8 @@ make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer cl
GtkWidget *vbox;
Notes *notes;
NautilusBackground *background;
NautilusClipboardInfo *info;
NautilusClipboardInfo *info;
g_return_val_if_fail (strcmp (goad_id, "OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185") == 0, NULL);
notes = g_new0 (Notes, 1);
notes->uri = g_strdup ("");
......@@ -192,8 +191,8 @@ make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer cl
/* set description */
nautilus_meta_view_frame_set_label (NAUTILUS_META_VIEW_FRAME (notes->view),
_("Notes"));
return BONOBO_OBJECT (notes->view);
return BONOBO_OBJECT (notes->view);
}
int
......
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
#ifndef _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_
#define _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_
#if !defined(__BONOBO_COMPILATION) && defined(__ORBIT_IDL__)
#pragma inhibit push
#endif
#include <gnome-factory.idl>
#include <Bonobo.idl>
......@@ -10,3 +18,9 @@ module Nautilus {
boolean end_transaction ();
};
};
#if !defined(__BONOBO_COMPILATION) && defined(__ORBIT_IDL__)
#pragma inhibit pop
#endif
#endif /* _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_ */
\ No newline at end of file
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
#ifndef _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_
#define _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_
#if !defined(__BONOBO_COMPILATION) && defined(__ORBIT_IDL__)
#pragma inhibit push
#endif
#include <gnome-factory.idl>
#include <Bonobo.idl>
......@@ -10,3 +18,9 @@ module Nautilus {
boolean end_transaction ();
};
};
#if !defined(__BONOBO_COMPILATION) && defined(__ORBIT_IDL__)
#pragma inhibit pop
#endif
#endif /* _NAUTUILUS_UNDO_MANAGER_IDL_INCLUDED_ */
\ No newline at end of file
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
#include <gnome-factory.idl>
#include <Bonobo.idl>
#include "../libnautilus-extensions/nautilus-undo-manager-component.idl"
%{
#pragma include_defs "libnautilus-extensions/nautilus-undo-manager-component.h"
%}
module Nautilus {
struct NavigationRequestInfo {
......@@ -103,6 +109,7 @@ module Nautilus {
interface Application : ::Bonobo::GenericFactory, ::Bonobo::Unknown {
readonly attribute ViewWindowList view_windows;
readonly attribute UndoManager undo_manager;
ViewWindow new_view_window ();
};
};
......
......@@ -486,6 +486,25 @@ nautilus_view_frame_get_bonobo_control (NautilusViewFrame *view)
return view->private->control;
}
CORBA_Object
nautilus_view_frame_get_main_window (NautilusViewFrame *view)
{
CORBA_Environment ev;
Nautilus_ViewWindow window;
CORBA_exception_init (&ev);
if (nautilus_view_frame_ensure_view_frame (view)) {
window = Nautilus_ViewFrame__get_main_window (view->private->view_frame, &ev);
} else {
window = NULL;
}
CORBA_exception_free (&ev);
return window;
}
void
nautilus_view_frame_real_set_bonobo_control (NautilusViewFrame *view,
......@@ -505,3 +524,4 @@ nautilus_view_frame_real_set_bonobo_control (NautilusViewFrame *view,
CORBA_exception_free(&ev);
}
......@@ -85,6 +85,8 @@ void nautilus_view_frame_request_status_change (NautilusViewFra
void nautilus_view_frame_request_progress_change (NautilusViewFrame *view,
Nautilus_ProgressRequestInfo *loc);
BonoboObject *nautilus_view_frame_get_bonobo_control (NautilusViewFrame *view);
CORBA_Object nautilus_view_frame_get_main_window (NautilusViewFrame *view);
#ifdef __cplusplus
}
......
......@@ -486,6 +486,25 @@ nautilus_view_frame_get_bonobo_control (NautilusViewFrame *view)
return view->private->control;
}
CORBA_Object
nautilus_view_frame_get_main_window (NautilusViewFrame *view)
{
CORBA_Environment ev;
Nautilus_ViewWindow window;
CORBA_exception_init (&ev);
if (nautilus_view_frame_ensure_view_frame (view)) {
window = Nautilus_ViewFrame__get_main_window (view->private->view_frame, &ev);
} else {
window = NULL;
}
CORBA_exception_free (&ev);
return window;
}
void
nautilus_view_frame_real_set_bonobo_control (NautilusViewFrame *view,
......@@ -505,3 +524,4 @@ nautilus_view_frame_real_set_bonobo_control (NautilusViewFrame *view,
CORBA_exception_free(&ev);
}
......@@ -85,6 +85,8 @@ void nautilus_view_frame_request_status_change (NautilusViewFra
void nautilus_view_frame_request_progress_change (NautilusViewFrame *view,
Nautilus_ProgressRequestInfo *loc);
BonoboObject *nautilus_view_frame_get_bonobo_control (NautilusViewFrame *view);
CORBA_Object nautilus_view_frame_get_main_window (NautilusViewFrame *view);
#ifdef __cplusplus
}
......
......@@ -43,6 +43,9 @@ typedef struct {
static Nautilus_ViewWindowList *
impl_Nautilus_Application__get_view_windows(impl_POA_Nautilus_Application* servant,
CORBA_Environment * ev);
static Nautilus_UndoManager
impl_Nautilus_Application__get_undo_manager(impl_POA_Nautilus_Application* servant,
CORBA_Environment * ev);
static Nautilus_ViewWindow
impl_Nautilus_Application_new_view_window(impl_POA_Nautilus_Application *servant,
CORBA_Environment * ev);
......@@ -59,6 +62,7 @@ impl_Nautilus_Application_create_object(impl_POA_Nautilus_Application *servant,
static POA_Nautilus_Application__epv impl_Nautilus_Application_epv = {
NULL, /* _private */
(gpointer) &impl_Nautilus_Application__get_view_windows,
(gpointer) &impl_Nautilus_Application__get_undo_manager,
(gpointer) &impl_Nautilus_Application_new_view_window
};
......@@ -109,6 +113,15 @@ impl_Nautilus_Application__get_view_windows(impl_POA_Nautilus_Application *serva
return retval;
}
static Nautilus_UndoManager
impl_Nautilus_Application__get_undo_manager(impl_POA_Nautilus_Application *servant,
CORBA_Environment * ev)
{
return CORBA_Object_duplicate(bonobo_object_corba_objref(servant->app->undo_manager), ev);
}
static Nautilus_ViewWindow
impl_Nautilus_Application_new_view_window(impl_POA_Nautilus_Application *servant, CORBA_Environment * ev)
{
......
......@@ -124,30 +124,30 @@ struct _NautilusWindow {
gboolean reset_to_idle : 1;
};
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
#endif
......@@ -124,30 +124,30 @@ struct _NautilusWindow {
gboolean reset_to_idle : 1;
};
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
#endif
......@@ -124,30 +124,30 @@ struct _NautilusWindow {
gboolean reset_to_idle : 1;
};
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
#endif
......@@ -38,6 +38,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include <libgnomevfs/gnome-vfs-async-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-file.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
......@@ -49,7 +50,7 @@
#include "nautilus-location-bar.h"
#include "ntl-types.h"
/* #define EXTREME_DEBUGGING */
/*#define EXTREME_DEBUGGING*/
#ifdef EXTREME_DEBUGGING
#define x_message(parameters) g_message parameters
......@@ -636,6 +637,8 @@ nautilus_window_request_location_change (NautilusWindow *window,
{
NautilusWindow *new_window;
loc->requested_uri = gnome_vfs_unescape_string(loc->requested_uri);
if (handle_unreadable_location (window, loc->requested_uri)) {
return;
}
......
......@@ -124,30 +124,30 @@ struct _NautilusWindow {
gboolean reset_to_idle : 1;
};
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,
gboolean allow);
void nautilus_bookmarks_exiting (void);
#endif
......@@ -43,6 +43,9 @@ typedef struct {
static Nautilus_ViewWindowList *
impl_Nautilus_Application__get_view_windows(impl_POA_Nautilus_Application* servant,
CORBA_Environment * ev);
static Nautilus_UndoManager
impl_Nautilus_Application__get_undo_manager(impl_POA_Nautilus_Application* servant,
CORBA_Environment * ev);
static Nautilus_ViewWindow
impl_Nautilus_Application_new_view_window(impl_POA_Nautilus_Application *servant,
CORBA_Environment * ev);
......@@ -59,6 +62,7 @@ impl_Nautilus_Application_create_object(impl_POA_Nautilus_Application *servant,
static POA_Nautilus_Application__epv impl_Nautilus_Application_epv = {
NULL, /* _private */
(gpointer) &impl_Nautilus_Application__get_view_windows,
(gpointer) &impl_Nautilus_Application__get_undo_manager,
(gpointer) &impl_Nautilus_Application_new_view_window
};
......@@ -109,6 +113,15 @@ impl_Nautilus_Application__get_view_windows(impl_POA_Nautilus_Application *serva
return retval;
}
static Nautilus_UndoManager
impl_Nautilus_Application__get_undo_manager(impl_POA_Nautilus_Application *servant,
CORBA_Environment * ev)
{
return CORBA_Object_duplicate(bonobo_object_corba_objref(servant->app->undo_manager), ev);
}
static Nautilus_ViewWindow
impl_Nautilus_Application_new_view_window(impl_POA_Nautilus_Application *servant, CORBA_Environment * ev)
{
......
......@@ -38,6 +38,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include <libgnomevfs/gnome-vfs-async-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-file.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
......@@ -49,7 +50,7 @@
#include "nautilus-location-bar.h"
#include "ntl-types.h"
/* #define EXTREME_DEBUGGING */
/*#define EXTREME_DEBUGGING*/
#ifdef EXTREME_DEBUGGING
#define x_message(parameters) g_message parameters
......@@ -636,6 +637,8 @@ nautilus_window_request_location_change (NautilusWindow *window,
{
NautilusWindow *new_window;
loc->requested_uri = gnome_vfs_unescape_string(loc->requested_uri);
if (handle_unreadable_location (window, loc->requested_uri)) {
return;
}
......
......@@ -124,30 +124,30 @@ struct _NautilusWindow {
gboolean reset_to_idle : 1;
};
GtkType nautilus_window_get_type (void);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
void nautilus_window_add_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_remove_meta_view (NautilusWindow *window,
NautilusView *meta_view);
void nautilus_window_goto_uri (NautilusWindow *window,
const char *uri);
void nautilus_window_display_error (NautilusWindow *window,
const char *error_msg);
const char * nautilus_window_get_requested_uri (NautilusWindow *window);
BonoboUIHandler *nautilus_window_get_uih (NautilusWindow *window);
void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_up (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_reload (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_stop (NautilusWindow *window,