diff options
author | Darin Adler <darin@bentspoon.com> | 2002-03-07 19:36:18 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2002-03-07 19:36:18 +0000 |
commit | 136742e4efa2af350b1303469b69113f39443490 (patch) | |
tree | 41e11442b391712ff49a2eee762f8ad22535c86a /libnautilus | |
parent | 6b5798037c6df519b12adb45ff919ea796856034 (diff) | |
download | nautilus-136742e4efa2af350b1303469b69113f39443490.tar.gz |
Because lots of recent bugs were due to "signal handler called after
* Tons of files:
Because lots of recent bugs were due to "signal handler called after
object gone" problems, switched many calls of g_signal_connect and
g_signal_connect_swapped to use g_signal_connect_object instead.
Also did other signal-related cleanup and changed some destroys to
finalizes.
* libnautilus/nautilus-view-standard-main.h:
We no longer need to include nautilus-view.h in here. So include it
in the files that use this instead.
Did merges from stable branch:
2001-10-25 Darin Adler <darin@bentspoon.com>
* libnautilus-private/nautilus-directory.c:
(call_files_changed_common), (call_files_changed_free_list),
(call_files_changed_unref_free_list),
(nautilus_directory_notify_files_changed): Move call to
nautilus_directory_add_file_to_work_queue into a better
bottleneck; now it catches all the notify cases, not just changed.
Also tell it to re-get top-left text and link info too when we get
a changed notice.
* src/file-manager/fm-directory-view.c: (queue_pending_files):
Don't use the timeout (and the hysteresis) when queuing files once
the initial directory load is complete. Doing this was causing
delays processing changes that came in later, which we don't want.
* src/nautilus-sidebar-title.c: (item_count_ready), (monitor_add),
(update_all), (nautilus_sidebar_title_set_file): Monitor the
directory count once we get it the first time. This makes sure
that changes in the directory count get reflected in the sidebar
without creating a race with the main view to see who calculates
it first.
2001-10-25 Alex Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory.c
(nautilus_directory_notify_files_changed): Call
nautilus_directory_add_file_to_work_queue() when file_info is
invalidated. Otherwise it will not be read again.
Diffstat (limited to 'libnautilus')
-rw-r--r-- | libnautilus/nautilus-clipboard.c | 31 | ||||
-rw-r--r-- | libnautilus/nautilus-undo-transaction.c | 2 | ||||
-rw-r--r-- | libnautilus/nautilus-undo.c | 2 | ||||
-rw-r--r-- | libnautilus/nautilus-view-standard-main.h | 2 | ||||
-rw-r--r-- | libnautilus/nautilus-view.c | 7 |
5 files changed, 16 insertions, 28 deletions
diff --git a/libnautilus/nautilus-clipboard.c b/libnautilus/nautilus-clipboard.c index 9f8736aa8..7e666ae8e 100644 --- a/libnautilus/nautilus-clipboard.c +++ b/libnautilus/nautilus-clipboard.c @@ -123,8 +123,8 @@ select_all_callback (BonoboUIComponent *ui, source = g_idle_source_new (); g_source_set_callback (source, select_all_idle_callback, editable, NULL); - g_signal_connect_swapped (editable, "destroy", - G_CALLBACK (g_source_destroy), source); + g_signal_connect_object (editable, "destroy", + G_CALLBACK (g_source_destroy), source, G_CONNECT_SWAPPED); g_source_attach (source, NULL); g_source_unref (source); } @@ -134,11 +134,8 @@ set_menu_item_sensitive (BonoboUIComponent *component, const char *path, gboolean sensitive) { - g_assert (BONOBO_IS_UI_COMPONENT (component)); bonobo_ui_component_set_prop (component, path, - "sensitive", - sensitive ? "1" : "0", - NULL); + "sensitive", sensitive ? "1" : "0", NULL); } @@ -420,9 +417,7 @@ first_focus_callback (GtkWidget *widget, /* Don't set up the clipboard again on future focus_in's. This * is one-time work. */ - disconnect_set_up_in_control_handlers - (GTK_OBJECT (widget), - callback_data); + disconnect_set_up_in_control_handlers (GTK_OBJECT (widget), callback_data); /* Do the rest of the setup. */ nautilus_clipboard_set_up_editable @@ -437,8 +432,7 @@ static void control_destroyed_callback (GtkObject *object, gpointer callback_data) { - disconnect_set_up_in_control_handlers - (object, callback_data); + disconnect_set_up_in_control_handlers (object, callback_data); } void @@ -464,17 +458,12 @@ nautilus_clipboard_set_up_editable_in_control (GtkEditable *target, /* We'd like to use gtk_signal_connect_while_alive, but it's * not compatible with gtk_signal_disconnect calls. */ - g_object_set_data (G_OBJECT (target), - "Nautilus:shares_selection_changes", + g_object_set_data (G_OBJECT (target), "Nautilus:shares_selection_changes", GINT_TO_POINTER (shares_selection_changes)); - g_signal_connect (target, - "focus_in_event", - G_CALLBACK (first_focus_callback), - control); - g_signal_connect (target, - "destroy", - G_CALLBACK (control_destroyed_callback), - control); + g_signal_connect (target, "focus_in_event", + G_CALLBACK (first_focus_callback), control); + g_signal_connect (target, "destroy", + G_CALLBACK (control_destroyed_callback), control); } static void diff --git a/libnautilus/nautilus-undo-transaction.c b/libnautilus/nautilus-undo-transaction.c index e95af4a95..fb991bf9a 100644 --- a/libnautilus/nautilus-undo-transaction.c +++ b/libnautilus/nautilus-undo-transaction.c @@ -171,7 +171,7 @@ nautilus_undo_transaction_finalize (GObject *object) CORBA_Object_release (transaction->owner, &ev); CORBA_exception_free (&ev); - EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); + G_OBJECT_CLASS (parent_class)->finalize (object); } void diff --git a/libnautilus/nautilus-undo.c b/libnautilus/nautilus-undo.c index fbf297085..3e7766b0f 100644 --- a/libnautilus/nautilus-undo.c +++ b/libnautilus/nautilus-undo.c @@ -280,5 +280,5 @@ nautilus_undo_set_up_bonobo_control (BonoboControl *control) set_up_bonobo_control (control); g_signal_connect (control, "set_frame", - G_CALLBACK (set_up_bonobo_control), NULL); + G_CALLBACK (set_up_bonobo_control), NULL); } diff --git a/libnautilus/nautilus-view-standard-main.h b/libnautilus/nautilus-view-standard-main.h index 48c9c1a10..99fc88f47 100644 --- a/libnautilus/nautilus-view-standard-main.h +++ b/libnautilus/nautilus-view-standard-main.h @@ -33,7 +33,7 @@ #ifndef NAUTILUS_VIEW_STANDARD_MAIN_H #define NAUTILUS_VIEW_STANDARD_MAIN_H -#include <libnautilus/nautilus-view.h> +#include <bonobo/bonobo-object.h> G_BEGIN_DECLS diff --git a/libnautilus/nautilus-view.c b/libnautilus/nautilus-view.c index 89ef9d239..8decb6be1 100644 --- a/libnautilus/nautilus-view.c +++ b/libnautilus/nautilus-view.c @@ -448,9 +448,8 @@ nautilus_view_construct_from_bonobo_control (NautilusView *view, bonobo_object_add_interface (BONOBO_OBJECT (view), BONOBO_OBJECT (control)); nautilus_undo_set_up_bonobo_control (control); - g_signal_connect_object (G_OBJECT (control), "set_frame", - G_CALLBACK (nautilus_view_set_frame_callback), - view, 0); + g_signal_connect_object (control, "set_frame", + G_CALLBACK (nautilus_view_set_frame_callback), view, 0); return view; } @@ -470,7 +469,7 @@ nautilus_view_finalize (GObject *object) g_free (view->details); - GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); + G_OBJECT_CLASS (parent_class)->finalize (object); } static void |