[Pkg-xfce-devel] Bug#455866: xfdesktop4: No eject in volume context menu if eject is supported

Tino Keitel tino.keitel+debbugs at tikei.de
Wed Dec 12 07:53:09 UTC 2007


Package: xfdesktop4
Version: 4.4.2-1scorpi0
Severity: normal
Tags: patch

Hi,

in the fix for http://bugzilla.xfce.org/show_bug.cgi?id=3119, Benedikt added
a function thunar_vfs_volume_is_ejectable(), so that Thunar can show an
"Eject" in the context menu of volumes that support eject. However,
xfdesktop4 only enables this if thunar_vfs_volume_is_disc() returns true, so
"Eject" is only shown for optical discs.

I attach 2 patches, both of them fix this bug. One is a minimal patch to add
"Eject" to the menu, and another patch that also makes the menu consistent
with Thunar (see
http://foo-projects.org/pipermail/thunar-dev/2007-December/004298.html and
the following mails).

Regards,
Tino

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.8 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xfdesktop4 depends on:
ii  libatk1.0-0             1.20.0-1         The ATK accessibility toolkit
ii  libc6                   2.7-4            GNU C Library: Shared libraries
ii  libcairo2               1.4.10-1.2       The Cairo 2D vector graphics libra
ii  libdbus-1-3             1.1.2-1          simple interprocess messaging syst
ii  libdbus-glib-1-2        0.74-1           simple interprocess messaging syst
ii  libexo-0.3-0            0.3.4-1          Library with extensions for Xfce
ii  libfontconfig1          2.5.0-2          generic font configuration library
ii  libfreetype6            2.3.5-1+b1       FreeType 2 font engine, shared lib
ii  libglib2.0-0            2.14.4-2         The GLib library of C routines
ii  libgtk2.0-0             2.12.3-1         The GTK+ graphical user interface 
ii  libice6                 2:1.0.4-1        X11 Inter-Client Exchange library
ii  libpango1.0-0           1.18.3-1         Layout and rendering of internatio
ii  libpng12-0              1.2.15~beta5-3   PNG library - runtime
ii  libsm6                  2:1.0.3-1+b1     X11 Session Management library
ii  libthunar-vfs-1-2       0.9.0-1scorpi0   VFS abstraction used in thunar
ii  libx11-6                2:1.0.3-7        X11 client-side library
ii  libxfce4mcs-client3     4.4.2-1          Client library for Xfce4 configure
ii  libxfce4util4           4.4.2-1          Utility functions library for Xfce
ii  libxfcegui4-4           4.4.2-1          Basic GUI C functions for Xfce4
ii  libxrender1             1:0.9.4-1        X Rendering Extension client libra
ii  xfce4-mcs-manager       4.4.2-1          Settings manager for Xfce4
ii  xfce4-panel             4.4.2-1          The Xfce4 desktop environment pane
ii  xfce4-utils             4.4.2-3          Various tools for Xfce
ii  xfdesktop4-data         4.4.2-1scorpi0   Provides xfdesktop4 desktop backgr
ii  zlib1g                  1:1.2.3.3.dfsg-7 compression library - runtime

Versions of packages xfdesktop4 recommends:
ii  dbus                          1.1.2-1    simple interprocess messaging syst
ii  librsvg2-common               2.18.2-1   SAX-based renderer library for SVG

-- debconf-show failed
-------------- next part --------------
diff -ru xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c
--- xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c	2007-11-17 20:31:41.000000000 +0100
+++ xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c	2007-12-11 22:14:46.005592273 +0100
@@ -573,8 +573,7 @@
                          icon);
     }
     
-    if(thunar_vfs_volume_is_disc(volume)
-       && thunar_vfs_volume_is_ejectable(volume))
+    if(thunar_vfs_volume_is_ejectable(volume))
     {
         mi = gtk_image_menu_item_new_with_mnemonic(_("E_ject Volume"));
         gtk_widget_show(mi);
-------------- next part --------------
diff -ru xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c
--- xfdesktop4-4.4.2.orig/src/xfdesktop-volume-icon.c	2007-11-17 20:31:41.000000000 +0100
+++ xfdesktop4-4.4.2/src/xfdesktop-volume-icon.c	2007-12-12 01:07:27.421327344 +0100
@@ -562,19 +562,7 @@
                          icon);
     }
     
-    mi = gtk_image_menu_item_new_with_mnemonic(_("_Unmount Volume"));
-    gtk_widget_show(mi);
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-    if(!thunar_vfs_volume_is_mounted(volume))
-        gtk_widget_set_sensitive(mi, FALSE);
-    else {
-        g_signal_connect(G_OBJECT(mi), "activate",
-                         G_CALLBACK(xfdesktop_volume_icon_menu_toggle_mount),
-                         icon);
-    }
-    
-    if(thunar_vfs_volume_is_disc(volume)
-       && thunar_vfs_volume_is_ejectable(volume))
+    if(thunar_vfs_volume_is_ejectable(volume))
     {
         mi = gtk_image_menu_item_new_with_mnemonic(_("E_ject Volume"));
         gtk_widget_show(mi);
@@ -582,6 +570,17 @@
         g_signal_connect(G_OBJECT(mi), "activate",
                          G_CALLBACK(xfdesktop_volume_icon_menu_eject),
                          icon);
+    } else {
+	mi = gtk_image_menu_item_new_with_mnemonic(_("_Unmount Volume"));
+	gtk_widget_show(mi);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
+	if(!thunar_vfs_volume_is_mounted(volume))
+	    gtk_widget_set_sensitive(mi, FALSE);
+	else {
+	    g_signal_connect(G_OBJECT(mi), "activate",
+			     G_CALLBACK(xfdesktop_volume_icon_menu_toggle_mount),
+			     icon);
+	}
     }
     
     mi = gtk_separator_menu_item_new();


More information about the Pkg-xfce-devel mailing list