From e992a1c7c84c383235d025bab8add3aeea623260 Mon Sep 17 00:00:00 2001 From: Maciej Stachowiak Date: Tue, 4 Jan 2000 03:06:28 +0000 Subject: Fix warnings. 2000-01-03 Maciej Stachowiak * src/ntl-prefs.c: Fix warnings. * src/ntl-view.c, src/ntl-view.h, src/ntl-view-frame-svr.c (nautilus_view_notify_location_change, nautilus_view_notify_selection_change, nautilus_view_load_state, nautilus_view_save_state, nautilus_view_show_properties): Made these functions public and removed the corresponding signals; these are operations you do to the NautilusView, not something it informs other parts of the program of. (request_location_change, request_selection_change, request_status_change, request_progress_change): New signals. These allow NautilusView to have less dependence on NautilusWindow. (nautilus_view_signals): Moved signal number table from view to this static variable. (nautilus_view_request_location_change, nautilus_view_request_selection_change, nautilus_view_request_status_change, nautilus_view_request_progress_change): Move to ntl-view.c and make them emit the proper signals in lieu of hardcoded handling. * src/ntl-window.c, src/ntl-window.h src/ntl-window-msgs.c, src/ntl-window-msgs.h, src/ntl-window-state.c (request_location_change, request_selection_change, request_status_change, request_progress_change): Removed these signals; they are operations you do on a NautilusWindow, not something it notifies you of, and any usefulness for inheritance purposes is purely speculative right now. (nautilus_window_connect_view, nautilus_window_disconnect_view): Use these new helper functions to connect callbacks to NautilusView's signals instead of expecting them to just get called. (nautilus_view_request_location_change, nautilus_view_request_selection_change, nautilus_view_request_status_change, nautilus_view_request_progress_change): Execute bodies of real_ versions instead of emitting singals. (nautilus_view_real_request_location_change, nautilus_view_real_request_selection_change, nautilus_view_real_request_status_change, nautilus_view_real_request_progress_change): Removed these. Finally, always call nautilus_winodow_set_content_view or nautilus_window_add_meta_view before calling nautilus_view_load_client to make sure no signals are lost. --- src/ntl-view.h | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'src/ntl-view.h') diff --git a/src/ntl-view.h b/src/ntl-view.h index aead366de..94b94edb3 100644 --- a/src/ntl-view.h +++ b/src/ntl-view.h @@ -51,19 +51,22 @@ struct _NautilusViewClass { GtkBinClass parent_spot; - void (*notify_location_change) (NautilusView *view, - Nautilus_NavigationInfo *nav_context); - void (*notify_selection_change) (NautilusView *view, - Nautilus_SelectionInfo *nav_context); - void (*load_state) (NautilusView *view, const char *config_path); - void (*save_state) (NautilusView *view, const char *config_path); - void (*show_properties) (NautilusView *view); + /* These signals correspond to the Natuilus:ViewFrame CORBA interface. They + are requests that the underlying view may make of the framework. */ + + void (*request_location_change) (NautilusView *view, + Nautilus_NavigationRequestInfo *navinfo); + void (*request_selection_change) (NautilusView *view, + Nautilus_SelectionRequestInfo *selinfo); + void (*request_status_change) (NautilusView *view, + Nautilus_StatusRequestInfo *loc); + void (*request_progress_change) (NautilusView *view, + Nautilus_ProgressRequestInfo *loc); /* Not a signal. Work-around for Gtk+'s lack of a 'constructed' operation */ void (*view_constructed) (NautilusView *view); GtkBinClass *parent_class; - guint view_signals[6]; guint num_construct_args; gpointer servant_init_func, servant_destroy_func, vepv; @@ -90,13 +93,28 @@ struct _NautilusView gpointer component_data; }; -GtkType nautilus_view_get_type (void); +GtkType nautilus_view_get_type (void); gboolean nautilus_view_load_client (NautilusView *view, const char * iid); -const char *nautilus_view_get_iid(NautilusView *view); -CORBA_Object nautilus_view_get_client_objref(NautilusView *view); -GnomeObject *nautilus_view_get_control_frame(NautilusView *view); -CORBA_Object nautilus_view_get_objref(NautilusView *view); +const char *nautilus_view_get_iid (NautilusView *view); +CORBA_Object nautilus_view_get_client_objref (NautilusView *view); +GnomeObject *nautilus_view_get_control_frame (NautilusView *view); +CORBA_Object nautilus_view_get_objref (NautilusView *view); + +/* These functions correspond to methods of the Nautilus:View CORBAinterface */ + +void nautilus_view_notify_location_change (NautilusView *view, + Nautilus_NavigationInfo *nav_context); +void nautilus_view_notify_selection_change (NautilusView *view, + Nautilus_SelectionInfo *sel_context); +void nautilus_view_load_state (NautilusView *view, + const char *config_path); +void nautilus_view_save_state (NautilusView *view, + const char *config_path); +void nautilus_view_show_properties (NautilusView *view); + + + /* This is a "protected" operation */ void nautilus_view_construct_arg_set(NautilusView *view); -- cgit v1.2.1