diff options
Diffstat (limited to 'gnome-base/nautilus/files/nautilus-2.6.3-novolumes.patch')
-rw-r--r-- | gnome-base/nautilus/files/nautilus-2.6.3-novolumes.patch | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/gnome-base/nautilus/files/nautilus-2.6.3-novolumes.patch b/gnome-base/nautilus/files/nautilus-2.6.3-novolumes.patch new file mode 100644 index 000000000000..dab18d295562 --- /dev/null +++ b/gnome-base/nautilus/files/nautilus-2.6.3-novolumes.patch @@ -0,0 +1,122 @@ +--- libnautilus-private/apps_nautilus_preferences.schemas.in 20 Feb 2004 10:33:46 -0000 ++++ libnautilus-private/apps_nautilus_preferences.schemas.in 6 May 2004 06:37:07 -0000 +@@ -808,6 +808,21 @@ + </schema> + + <schema> ++ <key>/schemas/apps/nautilus/desktop/volumes_visible</key> ++ <applyto>/apps/nautilus/desktop/volumes_visible</applyto> ++ <owner>nautilus</owner> ++ <type>bool</type> ++ <default>true</default> ++ <locale name="C"> ++ <short>Show mounted volumes on the desktop</short> ++ <long> ++ If this is set to true, icons linking to mounted ++ volumes will be put on the desktop. ++ </long> ++ </locale> ++ </schema> ++ ++ <schema> + <key>/schemas/apps/nautilus/desktop/home_icon_name</key> + <applyto>/apps/nautilus/desktop/home_icon_name</applyto> + <owner>nautilus</owner> + +--- libnautilus-private/nautilus-desktop-link-monitor.c 12 Dec 2003 19:07:17 -0000 1.9 ++++ libnautilus-private/nautilus-desktop-link-monitor.c 6 May 2004 06:37:08 -0000 +@@ -116,13 +116,18 @@ create_volume_link (NautilusDesktopLinkM + GnomeVFSVolume *volume) + { + NautilusDesktopLink *link; +- ++ ++ link = NULL; ++ + if (!gnome_vfs_volume_is_user_visible (volume)) { + return; + } + +- link = nautilus_desktop_link_new_from_volume (volume); +- monitor->details->volume_links = g_list_prepend (monitor->details->volume_links, link); ++ if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE)) { ++ link = nautilus_desktop_link_new_from_volume (volume); ++ monitor->details->volume_links = g_list_prepend (monitor->details->volume_links, link); ++ } ++ + } + + +@@ -221,6 +226,30 @@ desktop_trash_visible_changed (gpointer + } + + static void ++desktop_volumes_visible_changed (gpointer callback_data) ++{ ++ GnomeVFSVolumeMonitor *volume_monitor; ++ NautilusDesktopLinkMonitor *monitor; ++ GList *l, *volumes; ++ ++ volume_monitor = gnome_vfs_get_volume_monitor (); ++ monitor = NAUTILUS_DESKTOP_LINK_MONITOR (callback_data); ++ ++ if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE) && monitor->details->volume_links == NULL) { ++ volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor); ++ for (l = volumes; l != NULL; l = l->next) { ++ create_volume_link (monitor, l->data); ++ gnome_vfs_volume_unref (l->data); ++ } ++ g_list_free (volumes); ++ } else { ++ g_list_foreach (monitor->details->volume_links, (GFunc)g_object_unref, NULL); ++ g_list_free (monitor->details->volume_links); ++ monitor->details->volume_links = NULL; ++ } ++} ++ ++static void + nautilus_desktop_link_monitor_init (gpointer object, gpointer klass) + { + NautilusDesktopLinkMonitor *monitor; +@@ -248,6 +277,7 @@ nautilus_desktop_link_monitor_init (gpoi + } + + volume_monitor = gnome_vfs_get_volume_monitor (); ++ + volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor); + for (l = volumes; l != NULL; l = l->next) { + volume = l->data; +@@ -265,8 +295,10 @@ nautilus_desktop_link_monitor_init (gpoi + eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_TRASH_VISIBLE, + desktop_trash_visible_changed, + monitor); ++ eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE, ++ desktop_volumes_visible_changed, ++ monitor); + +- + monitor->details->mount_id = g_signal_connect_object (volume_monitor, "volume_mounted", + G_CALLBACK (volume_mounted_callback), monitor, 0); + monitor->details->unmount_id = g_signal_connect_object (volume_monitor, "volume_unmounted", +@@ -311,6 +343,9 @@ desktop_link_monitor_finalize (GObject * + monitor); + eel_preferences_remove_callback (NAUTILUS_PREFERENCES_DESKTOP_TRASH_VISIBLE, + desktop_trash_visible_changed, ++ monitor); ++ eel_preferences_remove_callback (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE, ++ desktop_volumes_visible_changed, + monitor); + + if (monitor->details->mount_id != 0) { + +--- libnautilus-private/nautilus-global-preferences.h 20 Feb 2004 10:33:49 -0000 1.122 ++++ libnautilus-private/nautilus-global-preferences.h 6 May 2004 06:37:08 -0000 +@@ -177,6 +177,7 @@ typedef enum + #define NAUTILUS_PREFERENCES_DESKTOP_COMPUTER_NAME "desktop/computer_icon_name" + #define NAUTILUS_PREFERENCES_DESKTOP_TRASH_VISIBLE "desktop/trash_icon_visible" + #define NAUTILUS_PREFERENCES_DESKTOP_TRASH_NAME "desktop/trash_icon_name" ++#define NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE "desktop/volumes_visible" + + void nautilus_global_preferences_init (void); + void nautilus_global_preferences_init_with_folder_browsing (void); + |