Hello community,
here is the log from the commit of package nautilus
checked in at Fri Apr 28 21:13:45 CEST 2006.
--------
--- GNOME/nautilus/nautilus.changes 2006-04-19 00:27:10.000000000 +0200
+++ STABLE/nautilus/nautilus.changes 2006-04-27 16:24:53.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Apr 27 16:24:29 CEST 2006 - federico@novell.com
+
+- Updated nautilus-155010-desktop-volume-policy.diff to fix bug
+ https://bugzilla.novell.com/show_bug.cgi?id=168280. This makes
+ Nautilus not display two volume icons for no-media-check devices.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nautilus.spec ++++++
--- /var/tmp/diff_new_pack.PaKCTR/_old 2006-04-28 21:13:38.000000000 +0200
+++ /var/tmp/diff_new_pack.PaKCTR/_new 2006-04-28 21:13:38.000000000 +0200
@@ -18,7 +18,7 @@
Group: Productivity/File utilities
Autoreqprov: on
Version: 2.12.2
-Release: 50
+Release: 57
Summary: The GNOME 2.x Desktop File Manager
Source: ftp://ftp.gnome.org/pub/gnome/sources/nautilus/2.11/%{name}-%{version}.tar.bz2
URL: http://www.gnome.org
@@ -183,6 +183,10 @@
%{prefix}/%_lib/pkgconfig/*.pc
%changelog -n nautilus
+* Thu Apr 27 2006 - federico@novell.com
+- Updated nautilus-155010-desktop-volume-policy.diff to fix bug
+ https://bugzilla.novell.com/show_bug.cgi?id=168280. This makes
+ Nautilus not display two volume icons for no-media-check devices.
* Wed Apr 19 2006 - federico@suse.de
- Removed dot-hidden.dif. This fixes bug #158158 completely; that
patch is obsoleted by the updated
++++++ nautilus-155010-desktop-volume-policy.diff ++++++
--- /var/tmp/diff_new_pack.PaKCTR/_old 2006-04-28 21:13:39.000000000 +0200
+++ /var/tmp/diff_new_pack.PaKCTR/_new 2006-04-28 21:13:39.000000000 +0200
@@ -1,3 +1,19 @@
+2006-04-25 Federico Mena Quintero
+
+ Fix https://bugzilla.novell.com/show_bug.cgi?id=168280:
+
+ * libnautilus-private/nautilus-desktop-link-monitor.c
+ (volume_mounted_callback): Just call refresh_volume_links(); this
+ will regenerate the whole list of drives/volumes, and avoid having
+ duplicates for user-visible drives that are also mounted.
+ (volume_unmounted_callback): Likewise.
+ (NautilusDesktopLinkMonitorDetails): Added fields connected_id and
+ disconnected_id.
+ (nautilus_desktop_link_monitor_init): Connect to "drive_connected"
+ and "drive_disconnected" on the volume_monitor.
+ (drive_connect_disconnect_callback): New callback; simply calls
+ refresh_volume_links().
+
2006-04-12 Federico Mena Quintero
* src/nautilus-places-sidebar.c: Adapted patch from
@@ -91,11 +107,36 @@
===================================================================
RCS file: /cvsroot/novell/nautilus/libnautilus-private/nautilus-desktop-link-monitor.c,v
retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -u -p -r1.1.1.1 -r1.2
+retrieving revision 1.3
+diff -u -p -r1.1.1.1 -r1.3
--- libnautilus-private/nautilus-desktop-link-monitor.c 7 Apr 2006 20:12:27 -0000 1.1.1.1
-+++ libnautilus-private/nautilus-desktop-link-monitor.c 11 Apr 2006 16:46:34 -0000 1.2
-@@ -104,41 +104,49 @@ static void
++++ libnautilus-private/nautilus-desktop-link-monitor.c 26 Apr 2006 14:29:51 -0000 1.3
+@@ -52,13 +52,14 @@ struct NautilusDesktopLinkMonitorDetails
+ NautilusDesktopLink *trash_link;
+ NautilusDesktopLink *network_link;
+
++ gulong connected_id;
++ gulong disconnected_id;
+ gulong mount_id;
+ gulong unmount_id;
+
+ GList *volume_links;
+ };
+
+-
+ static void nautilus_desktop_link_monitor_init (gpointer object,
+ gpointer klass);
+ static void nautilus_desktop_link_monitor_class_init (gpointer klass);
+@@ -69,6 +70,8 @@ EEL_CLASS_BOILERPLATE (NautilusDesktopLi
+
+ static NautilusDesktopLinkMonitor *the_link_monitor = NULL;
+
++static void refresh_volume_links (NautilusDesktopLinkMonitor *monitor);
++
+ static void
+ destroy_desktop_link_monitor (void)
+ {
+@@ -104,41 +107,49 @@ static void
volume_delete_dialog (GtkWidget *parent_view,
NautilusDesktopLink *link)
{
@@ -146,22 +187,22 @@
+ } else {
+ dialog_str = g_strdup_printf (_("You cannot move the drive \"%s\" to the trash."),
+ display_name);
-
-- gnome_vfs_volume_unref (volume);
-- g_free (dialog_str);
++
+ detail_str = NULL;
- }
++ }
+
+ eel_run_simple_dialog (parent_view, FALSE, GTK_MESSAGE_ERROR,
+ dialog_str,
+ detail_str,
+ NULL, GTK_STOCK_OK, NULL);
-+
+
+- gnome_vfs_volume_unref (volume);
+- g_free (dialog_str);
+ if (GNOME_IS_VFS_VOLUME (drive_or_volume)) {
+ gnome_vfs_volume_unref (GNOME_VFS_VOLUME (drive_or_volume));
+ } else {
+ gnome_vfs_drive_unref (GNOME_VFS_DRIVE (drive_or_volume));
-+ }
+ }
+
+ g_free (display_name);
+ g_free (dialog_str);
@@ -169,7 +210,7 @@
}
void
-@@ -197,6 +205,21 @@ nautilus_desktop_link_monitor_make_filen
+@@ -197,6 +208,21 @@ nautilus_desktop_link_monitor_make_filen
}
static void
@@ -191,7 +232,7 @@
create_volume_link (NautilusDesktopLinkMonitor *monitor,
GnomeVFSVolume *volume)
{
-@@ -209,7 +232,7 @@ create_volume_link (NautilusDesktopLinkM
+@@ -209,19 +235,29 @@ create_volume_link (NautilusDesktopLinkM
}
if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE)) {
@@ -200,8 +241,34 @@
monitor->details->volume_links = g_list_prepend (monitor->details->volume_links, link);
}
}
-@@ -232,17 +255,22 @@ volume_unmounted_callback (GnomeVFSVolum
+
+-
++static void
++drive_connect_disconnect_callback (GnomeVFSVolumeMonitor *volume_monitor,
++ GnomeVFSDrive *drive,
++ NautilusDesktopLinkMonitor *monitor)
++{
++ refresh_volume_links (monitor);
++}
+
+ static void
+ volume_mounted_callback (GnomeVFSVolumeMonitor *volume_monitor,
+ GnomeVFSVolume *volume,
+ NautilusDesktopLinkMonitor *monitor)
{
++#if 0
+ create_volume_link (monitor, volume);
++#else
++ refresh_volume_links (monitor);
++#endif
+ }
+
+
+@@ -230,25 +266,34 @@ volume_unmounted_callback (GnomeVFSVolum
+ GnomeVFSVolume *volume,
+ NautilusDesktopLinkMonitor *monitor)
+ {
++#if 0
GList *l;
NautilusDesktopLink *link;
- GnomeVFSVolume *other_volume;
@@ -228,7 +295,16 @@
}
if (link) {
-@@ -322,21 +350,38 @@ desktop_network_visible_changed (gpointe
+ monitor->details->volume_links = g_list_remove (monitor->details->volume_links, link);
+ g_object_unref (link);
+ }
++#else
++ refresh_volume_links (monitor);
++#endif
+ }
+
+ static void
+@@ -322,32 +367,60 @@ desktop_network_visible_changed (gpointe
}
static void
@@ -241,39 +317,54 @@
volume_monitor = gnome_vfs_get_volume_monitor ();
- monitor = NAUTILUS_DESKTOP_LINK_MONITOR (callback_data);
-
- if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE)) {
- if (monitor->details->volume_links == NULL) {
-+ GList *l;
-+ GList *volumes, *drives;
-+
-+ /* Unmounted drives */
-+
-+ drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);
-+ for (l = drives; l != NULL; l = l->next) {
-+ GnomeVFSDrive *drive;
-+
-+ drive = GNOME_VFS_DRIVE (l->data);
-+ create_drive_link (monitor, drive);
-+ gnome_vfs_drive_unref (drive);
-+ }
-+ g_list_free (drives);
+
-+ /* Volumes */
++ /* Free existing links */
++
++ g_list_foreach (monitor->details->volume_links, (GFunc)g_object_unref, NULL);
++ g_list_free (monitor->details->volume_links);
++ monitor->details->volume_links = NULL;
+
- volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor);
- for (l = volumes; l != NULL; l = l->next) {
++ /* Scan the links again */
+
+ if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_VOLUMES_VISIBLE)) {
+- if (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);
-+ GnomeVFSVolume *volume;
+- }
+- g_list_free (volumes);
++ GList *l;
++ GList *volumes, *drives;
++
++ /* Unmounted drives */
++
++ drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);
++ for (l = drives; l != NULL; l = l->next) {
++ GnomeVFSDrive *drive;
+
-+ volume = GNOME_VFS_VOLUME (l->data);
-+ create_volume_link (monitor, volume);
-+ gnome_vfs_volume_unref (volume);
- }
- g_list_free (volumes);
++ drive = GNOME_VFS_DRIVE (l->data);
++ create_drive_link (monitor, drive);
++ gnome_vfs_drive_unref (drive);
}
-@@ -348,6 +393,15 @@ desktop_volumes_visible_changed (gpointe
+- } 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;
++ g_list_free (drives);
++
++ /* Volumes */
++
++ volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor);
++ for (l = volumes; l != NULL; l = l->next) {
++ GnomeVFSVolume *volume;
++
++ volume = GNOME_VFS_VOLUME (l->data);
++ create_volume_link (monitor, volume);
++ gnome_vfs_volume_unref (volume);
++ }
++ g_list_free (volumes);
+ }
}
static void
@@ -289,7 +380,7 @@
create_link_and_add_preference (NautilusDesktopLink **link_ref,
NautilusDesktopLinkType link_type,
const char *preference_key,
-@@ -365,8 +419,6 @@ static void
+@@ -365,8 +438,6 @@ static void
nautilus_desktop_link_monitor_init (gpointer object, gpointer klass)
{
NautilusDesktopLinkMonitor *monitor;
@@ -298,7 +389,7 @@
GnomeVFSVolumeMonitor *volume_monitor;
monitor = NAUTILUS_DESKTOP_LINK_MONITOR (object);
-@@ -404,22 +456,16 @@ nautilus_desktop_link_monitor_init (gpoi
+@@ -404,22 +475,22 @@ nautilus_desktop_link_monitor_init (gpoi
desktop_network_visible_changed,
monitor);
@@ -322,6 +413,12 @@
+ volume_monitor = gnome_vfs_get_volume_monitor ();
+
++ monitor->details->connected_id = g_signal_connect_object (volume_monitor, "drive_connected",
++ G_CALLBACK (drive_connect_disconnect_callback),
++ monitor, 0);
++ monitor->details->disconnected_id = g_signal_connect_object (volume_monitor, "drive_connected",
++ G_CALLBACK (drive_connect_disconnect_callback),
++ monitor, 0);
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",
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...