diff options
author | Mathieu Lacage <mathieu@eazel.com> | 2000-08-19 05:44:53 +0000 |
---|---|---|
committer | Mathieu Lacage <mathieu@src.gnome.org> | 2000-08-19 05:44:53 +0000 |
commit | 62ce8b92d1bcaa32542821777d7e593501358eba (patch) | |
tree | 78ed155b93aeaa0dabf3d8b1c883440cc1d5bdd7 /libnautilus/nautilus-view.c | |
parent | 8ddbe9e76e8573efd73169cddb9454b0cecf3fe8 (diff) | |
download | nautilus-62ce8b92d1bcaa32542821777d7e593501358eba.tar.gz |
completes task 1567. it shows a bug in the way the history view displays
2000-08-19 Mathieu Lacage <mathieu@eazel.com>
completes task 1567. it shows a bug in the way the history
view displays the current location given the history. to be
fixed soon.
* components/history/nautilus-history-view.c:
(history_load_location), (history_title_changed), (make_obj):
add title_changed_callback, connect it to changed_title signal.
make it call load_location.
Hack evil stuff in load_location: a hand-made lock because the
function calls some gtk calls which seem to make the main loop
run at least once. This allowed the main loop to use the events
in the event queue and it happened that the title_changed signal
is usually emited more than once so it called again the
non-reentrant signal callback... BAD THINGS HAPPENED.
* libnautilus/nautilus-view-component.idl: add changed_title method
to Nautilus::View.
* libnautilus/nautilus-view.c: (impl_Nautilus_View_title_changed),
(nautilus_view_initialize_class): implement the new idl function and
add a signal for it.
* libnautilus/nautilus-view.h: add the new signal class method.
* src/nautilus-view-frame-bonobo-control.c: add the title_changed
field to the vtable.
* src/nautilus-view-frame-nautilus-view.c: (title_changed): idem.
* src/nautilus-view-frame-private.h: idem.
* src/nautilus-view-frame.c: (nautilus_view_frame_title_changed):
add api function to emit the signal and make the actual corba call.
* src/nautilus-view-frame.h: add function prototype.
* src/nautilus-window-manage-views.c: add calls to
(nautilus_window_update_title): to notify view frames of changed
titles.
Diffstat (limited to 'libnautilus/nautilus-view.c')
-rw-r--r-- | libnautilus/nautilus-view.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libnautilus/nautilus-view.c b/libnautilus/nautilus-view.c index 1ed6d1c48..6b88783dd 100644 --- a/libnautilus/nautilus-view.c +++ b/libnautilus/nautilus-view.c @@ -40,6 +40,7 @@ enum { LOAD_LOCATION, STOP_LOADING, SELECTION_CHANGED, + TITLE_CHANGED, LAST_SIGNAL }; @@ -62,6 +63,8 @@ static void impl_Nautilus_View_stop_loading (PortableServer_Servant servan static void impl_Nautilus_View_selection_changed (PortableServer_Servant servant, const Nautilus_URIList *selection, CORBA_Environment *ev); +static void impl_Nautilus_View_title_changed (PortableServer_Servant servant, + CORBA_Environment *ev); static void nautilus_view_initialize (NautilusView *view); static void nautilus_view_destroy (GtkObject *object); static void nautilus_view_initialize_class (NautilusViewClass *klass); @@ -73,7 +76,8 @@ POA_Nautilus_View__epv libnautilus_Nautilus_View_epv = NULL, &impl_Nautilus_View_load_location, &impl_Nautilus_View_stop_loading, - &impl_Nautilus_View_selection_changed + &impl_Nautilus_View_selection_changed, + &impl_Nautilus_View_title_changed }; static PortableServer_ServantBase__epv base_epv; @@ -161,6 +165,15 @@ impl_Nautilus_View_selection_changed (PortableServer_Servant servant, g_list_free (selection_as_g_list); } +static void +impl_Nautilus_View_title_changed (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + gtk_signal_emit (GTK_OBJECT (((impl_POA_Nautilus_View *) servant)->bonobo_object), + signals[TITLE_CHANGED]); +} + + static void impl_Nautilus_View__destroy (BonoboObject *object, PortableServer_Servant servant) { @@ -230,6 +243,13 @@ nautilus_view_initialize_class (NautilusViewClass *klass) GTK_SIGNAL_OFFSET (NautilusViewClass, selection_changed), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + signals[TITLE_CHANGED] = + gtk_signal_new ("title_changed", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (NautilusViewClass, title_changed), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } |