Commit 97b7f15a authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Handle changes of GMount objects

2008-02-08  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-desktop-link.c:
        (mount_changed_callback):
        (nautilus_desktop_link_new_from_mount):
	Handle changes of GMount objects


svn path=/trunk/; revision=13711
parent 912b9d3e
2008-02-08 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-desktop-link.c:
(mount_changed_callback):
(nautilus_desktop_link_new_from_mount):
Handle changes of GMount objects
2008-02-08 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c:
......
......@@ -68,6 +68,24 @@ nautilus_desktop_link_changed (NautilusDesktopLink *link)
}
}
static void
mount_changed_callback (GMount *mount, NautilusDesktopLink *link)
{
g_free (link->details->display_name);
if (link->details->activation_location) {
g_object_unref (link->details->activation_location);
}
if (link->details->icon) {
g_object_unref (link->details->icon);
}
link->details->display_name = g_mount_get_name (mount);
link->details->activation_location = g_mount_get_root (mount);
link->details->icon = g_mount_get_icon (mount);
nautilus_desktop_link_changed (link);
}
static void
trash_state_changed_callback (NautilusTrashMonitor *trash_monitor,
gboolean state,
......@@ -245,6 +263,9 @@ 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);
create_icon_file (link);
return link;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment