blob: f26e3121ee4be1923445a577d17bad32acca4520 (
plain) (
blame)
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
|
--- drivemount/drive-button.c.orig Tue Aug 23 05:16:27 2005
+++ drivemount/drive-button.c Tue Aug 23 20:37:43 2005
@@ -24,6 +24,7 @@
# include <config.h>
#endif
+#include <string.h>
#include "drive-button.h"
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
@@ -710,11 +711,13 @@ run_command (DriveButton *self, const ch
GList *volumes;
GnomeVFSVolume *volume;
+ char *uri;
+ char *mount_path;
volumes = gnome_vfs_drive_get_mounted_volumes (self->drive);
volume = GNOME_VFS_VOLUME (volumes->data);
- char *uri = gnome_vfs_volume_get_activation_uri (volume);
- char *mount_path = gnome_vfs_get_local_path_from_uri (uri);
+ uri = gnome_vfs_volume_get_activation_uri (volume);
+ mount_path = gnome_vfs_get_local_path_from_uri (uri);
g_free (uri);
gnome_vfs_drive_get_display_name (self->drive);
@@ -794,6 +797,11 @@ drive_button_ensure_popup (DriveButton *
char *display_name, *tmp, *label;
int action;
GtkWidget *item;
+ GList *volumes;
+ GnomeVFSVolume *volume = NULL;
+ GnomeVFSDeviceType volume_type;
+ GCallback callback;
+ const char *action_icon = GTK_STOCK_OPEN;
if (self->popup_menu) return;
@@ -869,8 +877,7 @@ drive_button_ensure_popup (DriveButton *
g_free (display_name);
display_name = tmp;
- GCallback callback = G_CALLBACK (open_drive);
- const char *action_icon = GTK_STOCK_OPEN;
+ callback = G_CALLBACK (open_drive);
switch (device_type) {
case GNOME_VFS_DEVICE_TYPE_VIDEO_DVD:
|