1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
diff --exclude-from=/home/dang/.diffrc -u -ruN gnome-mount-0.4.orig/src/gnome-mount.c gnome-mount-0.4/src/gnome-mount.c
--- gnome-mount-0.4.orig/src/gnome-mount.c 2006-02-24 00:14:23.000000000 -0500
+++ gnome-mount-0.4/src/gnome-mount.c 2006-05-21 19:26:17.000000000 -0400
@@ -238,7 +238,8 @@
/* #define MOUNT_ERROR_DIALOG_RESPONSE_INSTALL_DRIVER 10 see below */
static void
-show_error_dialog_mount (LibHalVolume *volume, const char *error_name, const char *error_detail,
+show_error_dialog_mount (LibHalVolume *volume, LibHalDrive *drive,
+ const char *error_name, const char *error_detail,
const char *fstype_requested)
{
GtkWidget *w;
@@ -266,7 +267,10 @@
0,
_("Cannot mount volume"));
- volume_name = libhal_volume_get_label (volume);
+ if (volume != NULL)
+ volume_name = libhal_volume_get_label (volume);
+ else
+ volume_name = NULL;
if (strcmp (error_name, "org.freedesktop.Hal.Device.Volume.PermissionDenied") == 0) {
gtk_message_dialog_format_secondary_text (
@@ -289,8 +293,8 @@
volume_name != NULL ?
_("The volume '%s' uses the <i>%s</i> file system which is not supported by your system.") :
_("The volume uses the <i>%s</i> file system which is not supported by your system."),
- volume_name != NULL ? volume_name : fstype_requested,
- volume_name != NULL ? fstype_requested : "");
+ volume_name != NULL ? volume_name : (fstype_requested != NULL ? fstype_requested : ""),
+ volume_name != NULL ? (fstype_requested != NULL ? fstype_requested : "") : "");
/* some day.. :-)
gtk_dialog_add_buttons (GTK_DIALOG (w),
@@ -463,9 +467,9 @@
notify_parent (FALSE);
- show_error_dialog_mount (volume, error.name, error.message,
+ show_error_dialog_mount (volume, drive, error.name, error.message,
(fstype != NULL && strlen (fstype) > 0) ?
- fstype : libhal_volume_get_fstype (volume));
+ fstype : (volume != NULL ? libhal_volume_get_fstype (volume) : NULL));
dbus_error_free (&error);
goto out;
|