mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
Maks sure we disconnect from the changed signal on the mount.
2008-02-08 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-desktop-link.c: Maks sure we disconnect from the changed signal on the mount. svn path=/trunk/; revision=13713
This commit is contained in:
parent
bb8e9e64f5
commit
26c5c5e9c4
|
@ -1,3 +1,9 @@
|
|||
2008-02-08 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* libnautilus-private/nautilus-desktop-link.c:
|
||||
Maks sure we disconnect from the changed
|
||||
signal on the mount.
|
||||
|
||||
2008-02-08 Olav Vitters <olav@bkor.dhs.org>
|
||||
|
||||
* HACKING: Change CVS things into SVN.
|
||||
|
|
|
@ -45,8 +45,8 @@ struct NautilusDesktopLinkDetails {
|
|||
|
||||
NautilusDesktopIconFile *icon_file;
|
||||
|
||||
/* Just for trash icons: */
|
||||
gulong trash_state_handler;
|
||||
GObject *signal_handler_obj;
|
||||
gulong signal_handler;
|
||||
|
||||
/* Just for mount icons: */
|
||||
GMount *mount;
|
||||
|
@ -201,7 +201,8 @@ nautilus_desktop_link_new (NautilusDesktopLinkType type)
|
|||
eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_TRASH_NAME,
|
||||
trash_name_changed,
|
||||
link);
|
||||
link->details->trash_state_handler =
|
||||
link->details->signal_handler_obj = G_OBJECT (nautilus_trash_monitor_get ());
|
||||
link->details->signal_handler =
|
||||
g_signal_connect_object (nautilus_trash_monitor_get (), "trash_state_changed",
|
||||
G_CALLBACK (trash_state_changed_callback), link, 0);
|
||||
break;
|
||||
|
@ -263,8 +264,10 @@ nautilus_desktop_link_new_from_mount (GMount *mount)
|
|||
link->details->activation_location = g_mount_get_root (mount);
|
||||
link->details->icon = g_mount_get_icon (mount);
|
||||
|
||||
g_signal_connect (mount, "changed",
|
||||
G_CALLBACK (mount_changed_callback), link);
|
||||
link->details->signal_handler_obj = G_OBJECT (mount);
|
||||
link->details->signal_handler =
|
||||
g_signal_connect (mount, "changed",
|
||||
G_CALLBACK (mount_changed_callback), link);
|
||||
|
||||
create_icon_file (link);
|
||||
|
||||
|
@ -379,9 +382,9 @@ desktop_link_finalize (GObject *object)
|
|||
|
||||
link = NAUTILUS_DESKTOP_LINK (object);
|
||||
|
||||
if (link->details->trash_state_handler != 0) {
|
||||
g_signal_handler_disconnect (nautilus_trash_monitor_get (),
|
||||
link->details->trash_state_handler);
|
||||
if (link->details->signal_handler != 0) {
|
||||
g_signal_handler_disconnect (link->details->signal_handler_obj,
|
||||
link->details->signal_handler);
|
||||
}
|
||||
|
||||
if (link->details->icon_file != NULL) {
|
||||
|
|
Loading…
Reference in a new issue