[Pkg-xfce-commits] r2111 - desktop/trunk/exo/debian/patches
corsac at alioth.debian.org
corsac at alioth.debian.org
Mon Jun 9 12:53:37 UTC 2008
Author: corsac
Date: 2008-06-09 12:53:36 +0000 (Mon, 09 Jun 2008)
New Revision: 2111
Modified:
desktop/trunk/exo/debian/patches/03_handle-luks-fs.patch
Log:
refresh the patch, enable passing device path to exo-mount
Modified: desktop/trunk/exo/debian/patches/03_handle-luks-fs.patch
===================================================================
--- desktop/trunk/exo/debian/patches/03_handle-luks-fs.patch 2008-06-09 09:38:13 UTC (rev 2110)
+++ desktop/trunk/exo/debian/patches/03_handle-luks-fs.patch 2008-06-09 12:53:36 UTC (rev 2111)
@@ -1,23 +1,5 @@
---- a/exo-mount/main.c.orig 2008-06-09 10:41:12.000000000 +0200
-+++ b/exo-mount/main.c 2008-06-09 10:41:46.000000000 +0200
-@@ -306,12 +306,12 @@ main (int argc, char **argv)
- "but kernel doesn't list the volume as mounted");
- }
-
-- /* check if we failed */
-- if (G_UNLIKELY (err != NULL))
-- {
- #ifdef HAVE_HAL
- err0:
- #endif
-+ /* check if we failed */
-+ if (G_UNLIKELY (err != NULL))
-+ {
- /* check if we should display an error dialog */
- if (G_LIKELY (!opt_noui))
- {
---- a/exo-mount/exo-mount-hal.c.orig 2008-06-09 10:40:38.000000000 +0200
-+++ b/exo-mount/exo-mount-hal.c 2008-06-09 10:47:40.000000000 +0200
+--- a/exo-mount/exo-mount-hal.c.orig 2008-06-09 14:43:41.000000000 +0200
++++ b/exo-mount/exo-mount-hal.c 2008-06-09 14:44:41.000000000 +0200
@@ -181,7 +181,350 @@ device_has_interface(const gchar *udi, c
@@ -394,7 +376,17 @@
dbus_error_free (&derror);
return device;
}
-@@ -576,10 +928,19 @@ exo_mount_hal_device_eject (ExoMountHalD
+@@ -381,7 +733,8 @@ exo_mount_hal_device_from_file (const gc
+ continue;
+
+ /* check if we have a mountable device here */
+- if (string_in_list (interfaces, "org.freedesktop.Hal.Device.Volume"))
++ if (string_in_list (interfaces, "org.freedesktop.Hal.Device.Volume") ||
++ string_in_list (interfaces, "org.freedesktop.Hal.Device.Volume.Crypto"))
+ {
+ libhal_free_string_array (interfaces);
+ break;
+@@ -576,10 +929,19 @@ exo_mount_hal_device_eject (ExoMountHalD
DBusMessage *message;
DBusMessage *result;
DBusError derror;
@@ -414,7 +406,7 @@
/* allocate the D-Bus message for the "Eject" method */
message = dbus_message_new_method_call ("org.freedesktop.Hal", device->udi, "org.freedesktop.Hal.Device.Volume", "Eject");
if (G_UNLIKELY (message == NULL))
-@@ -750,7 +1111,7 @@ oom: g_set_error (error, G_FILE_ERR
+@@ -750,7 +1112,7 @@ oom: g_set_error (error, G_FILE_ERR
DBUS_TYPE_STRING, &mount_point,
DBUS_TYPE_STRING, &fstype,
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &options, n,
@@ -423,7 +415,7 @@
{
dbus_message_unref (message);
goto oom;
-@@ -923,10 +1284,14 @@ exo_mount_hal_device_unmount (ExoMountHa
+@@ -923,10 +1285,14 @@ exo_mount_hal_device_unmount (ExoMountHa
DBusMessage *message;
DBusMessage *result;
DBusError derror;
@@ -438,7 +430,7 @@
/* allocate the D-Bus message for the "Unmount" method */
message = dbus_message_new_method_call ("org.freedesktop.Hal", device->udi, "org.freedesktop.Hal.Device.Volume", "Unmount");
if (G_UNLIKELY (message == NULL))
-@@ -984,7 +1349,7 @@ oom: g_set_error (error, G_FILE_ERROR,
+@@ -984,7 +1350,7 @@ oom: g_set_error (error, G_FILE_ERROR,
{
/* Ups, volume not mounted, we succeed! */
dbus_error_free (&derror);
@@ -447,7 +439,7 @@
}
else
{
-@@ -996,7 +1361,11 @@ oom: g_set_error (error, G_FILE_ERROR,
+@@ -996,7 +1362,11 @@ oom: g_set_error (error, G_FILE_ERROR,
dbus_error_free (&derror);
return FALSE;
}
@@ -460,3 +452,61 @@
return TRUE;
}
+--- a/exo-mount/main.c.orig 2008-06-09 14:43:54.000000000 +0200
++++ b/exo-mount/main.c 2008-06-09 14:44:12.000000000 +0200
+@@ -306,12 +306,12 @@ main (int argc, char **argv)
+ "but kernel doesn't list the volume as mounted");
+ }
+
+- /* check if we failed */
+- if (G_UNLIKELY (err != NULL))
+- {
+ #ifdef HAVE_HAL
+ err0:
+ #endif
++ /* check if we failed */
++ if (G_UNLIKELY (err != NULL))
++ {
+ /* check if we should display an error dialog */
+ if (G_LIKELY (!opt_noui))
+ {
+--- a/exo-hal/exo-hal.c.orig 2008-06-09 14:44:07.000000000 +0200
++++ b/exo-hal/exo-hal.c 2008-06-09 14:44:12.000000000 +0200
+@@ -99,6 +99,7 @@ typedef enum
+ HAL_ICON_VOLUME_ZIP = 0x20b00,
+ HAL_ICON_VOLUME_JAZ = 0x20c00,
+ HAL_ICON_VOLUME_FLASH_KEY = 0x20d00,
++ HAL_ICON_VOLUME_CRYPTO = 0x20e00,
+
+ HAL_ICON_DISC_CDROM = 0x30000,
+ HAL_ICON_DISC_CDR = HAL_ICON_DISC_CDROM + LIBHAL_VOLUME_DISC_TYPE_CDR,
+@@ -180,6 +181,7 @@ static const HalIconPair hal_icon_mappin
+ { HAL_ICON_VOLUME_ZIP, "gnome-dev-zipdisk" },
+ { HAL_ICON_VOLUME_JAZ, "gnome-dev-jazdisk" },
+ { HAL_ICON_VOLUME_FLASH_KEY, "gnome-dev-harddisk" }, /* TODO: gnome-dev-pendrive */
++ { HAL_ICON_VOLUME_CRYPTO, "gtk-dialog-authentication" },
+
+ { HAL_ICON_DISC_CDROM, "gnome-dev-cdrom" },
+ { HAL_ICON_DISC_CDR, "gnome-dev-disc-cdr" },
+@@ -806,6 +808,11 @@ exo_hal_volume_compute_display_name (str
+ }
+ }
+
++ if (G_UNLIKELY(libhal_volume_get_fsusage(volume) == LIBHAL_VOLUME_USAGE_CRYPTO)) {
++ gchar *tmp = g_strdup_printf(_("Encrypted %s"), display_name);
++ g_free(display_name);
++ display_name = tmp;
++ }
+ return display_name;
+ #else
+ /* HAL is not available, impossible to figure out
+@@ -857,6 +864,9 @@ exo_hal_volume_compute_icon_list (struct
+ if (G_UNLIKELY (icon_name != NULL))
+ icon_list = g_list_append (icon_list, g_strdup (icon_name));
+
++ if (G_UNLIKELY(libhal_volume_get_fsusage(volume) == LIBHAL_VOLUME_USAGE_CRYPTO))
++ icon_list = g_list_append(icon_list, g_strdup("gtk-dialog-authentication"));
++
+ /* check if we have a disc based volume */
+ if (libhal_volume_is_disc (volume))
+ {
More information about the Pkg-xfce-commits
mailing list