mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
Fix global variable name hidden by local variables in gio/gio-tool-mount.c
This commit is contained in:
parent
c0dabdd8df
commit
71de9553ca
@ -39,7 +39,7 @@ typedef enum {
|
||||
|
||||
static int outstanding_mounts = 0;
|
||||
static GMainLoop *main_loop;
|
||||
static GVolumeMonitor *volume_monitor;
|
||||
static GVolumeMonitor *global_volume_monitor;
|
||||
|
||||
static gboolean mount_mountable = FALSE;
|
||||
static gboolean mount_unmount = FALSE;
|
||||
@ -488,7 +488,7 @@ stop_with_device_file (const char *device_file)
|
||||
GList *drives;
|
||||
GList *l;
|
||||
|
||||
drives = g_volume_monitor_get_connected_drives (volume_monitor);
|
||||
drives = g_volume_monitor_get_connected_drives (global_volume_monitor);
|
||||
for (l = drives; l != NULL; l = l->next)
|
||||
{
|
||||
GDrive *drive = G_DRIVE (l->data);
|
||||
@ -906,15 +906,15 @@ list_monitor_items (void)
|
||||
/* populate gvfs network mounts */
|
||||
iterate_gmain();
|
||||
|
||||
drives = g_volume_monitor_get_connected_drives (volume_monitor);
|
||||
drives = g_volume_monitor_get_connected_drives (global_volume_monitor);
|
||||
list_drives (drives, 0);
|
||||
g_list_free_full (drives, g_object_unref);
|
||||
|
||||
volumes = g_volume_monitor_get_volumes (volume_monitor);
|
||||
volumes = g_volume_monitor_get_volumes (global_volume_monitor);
|
||||
list_volumes (volumes, 0, TRUE);
|
||||
g_list_free_full (volumes, g_object_unref);
|
||||
|
||||
mounts = g_volume_monitor_get_mounts (volume_monitor);
|
||||
mounts = g_volume_monitor_get_mounts (global_volume_monitor);
|
||||
list_mounts (mounts, 0, TRUE);
|
||||
g_list_free_full (mounts, g_object_unref);
|
||||
}
|
||||
@ -928,7 +928,7 @@ unmount_all_with_scheme (const char *scheme)
|
||||
/* populate gvfs network mounts */
|
||||
iterate_gmain();
|
||||
|
||||
mounts = g_volume_monitor_get_mounts (volume_monitor);
|
||||
mounts = g_volume_monitor_get_mounts (global_volume_monitor);
|
||||
for (l = mounts; l != NULL; l = l->next) {
|
||||
GMount *mount = G_MOUNT (l->data);
|
||||
GFile *root;
|
||||
@ -977,7 +977,7 @@ mount_with_id (const char *id)
|
||||
GList *volumes;
|
||||
GList *l;
|
||||
|
||||
volumes = g_volume_monitor_get_volumes (volume_monitor);
|
||||
volumes = g_volume_monitor_get_volumes (global_volume_monitor);
|
||||
for (l = volumes; l != NULL; l = l->next)
|
||||
{
|
||||
GVolume *volume = G_VOLUME (l->data);
|
||||
@ -1167,17 +1167,17 @@ monitor_drive_eject_button (GVolumeMonitor *volume_monitor, GDrive *drive)
|
||||
static void
|
||||
monitor (void)
|
||||
{
|
||||
g_signal_connect (volume_monitor, "mount-added", (GCallback) monitor_mount_added, NULL);
|
||||
g_signal_connect (volume_monitor, "mount-removed", (GCallback) monitor_mount_removed, NULL);
|
||||
g_signal_connect (volume_monitor, "mount-changed", (GCallback) monitor_mount_changed, NULL);
|
||||
g_signal_connect (volume_monitor, "mount-pre-unmount", (GCallback) monitor_mount_pre_unmount, NULL);
|
||||
g_signal_connect (volume_monitor, "volume-added", (GCallback) monitor_volume_added, NULL);
|
||||
g_signal_connect (volume_monitor, "volume-removed", (GCallback) monitor_volume_removed, NULL);
|
||||
g_signal_connect (volume_monitor, "volume-changed", (GCallback) monitor_volume_changed, NULL);
|
||||
g_signal_connect (volume_monitor, "drive-connected", (GCallback) monitor_drive_connected, NULL);
|
||||
g_signal_connect (volume_monitor, "drive-disconnected", (GCallback) monitor_drive_disconnected, NULL);
|
||||
g_signal_connect (volume_monitor, "drive-changed", (GCallback) monitor_drive_changed, NULL);
|
||||
g_signal_connect (volume_monitor, "drive-eject-button", (GCallback) monitor_drive_eject_button, NULL);
|
||||
g_signal_connect (global_volume_monitor, "mount-added", (GCallback) monitor_mount_added, NULL);
|
||||
g_signal_connect (global_volume_monitor, "mount-removed", (GCallback) monitor_mount_removed, NULL);
|
||||
g_signal_connect (global_volume_monitor, "mount-changed", (GCallback) monitor_mount_changed, NULL);
|
||||
g_signal_connect (global_volume_monitor, "mount-pre-unmount", (GCallback) monitor_mount_pre_unmount, NULL);
|
||||
g_signal_connect (global_volume_monitor, "volume-added", (GCallback) monitor_volume_added, NULL);
|
||||
g_signal_connect (global_volume_monitor, "volume-removed", (GCallback) monitor_volume_removed, NULL);
|
||||
g_signal_connect (global_volume_monitor, "volume-changed", (GCallback) monitor_volume_changed, NULL);
|
||||
g_signal_connect (global_volume_monitor, "drive-connected", (GCallback) monitor_drive_connected, NULL);
|
||||
g_signal_connect (global_volume_monitor, "drive-disconnected", (GCallback) monitor_drive_disconnected, NULL);
|
||||
g_signal_connect (global_volume_monitor, "drive-changed", (GCallback) monitor_drive_changed, NULL);
|
||||
g_signal_connect (global_volume_monitor, "drive-eject-button", (GCallback) monitor_drive_eject_button, NULL);
|
||||
|
||||
g_print ("Monitoring events. Press Ctrl+C to quit.\n");
|
||||
|
||||
@ -1219,7 +1219,7 @@ handle_mount (int argc, char *argv[], gboolean do_help)
|
||||
}
|
||||
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
volume_monitor = g_volume_monitor_get ();
|
||||
global_volume_monitor = g_volume_monitor_get ();
|
||||
|
||||
if (mount_list)
|
||||
list_monitor_items ();
|
||||
@ -1249,7 +1249,7 @@ handle_mount (int argc, char *argv[], gboolean do_help)
|
||||
{
|
||||
show_help (context, _("No locations given"));
|
||||
g_option_context_free (context);
|
||||
g_object_unref (volume_monitor);
|
||||
g_object_unref (global_volume_monitor);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1258,7 +1258,7 @@ handle_mount (int argc, char *argv[], gboolean do_help)
|
||||
if (outstanding_mounts > 0)
|
||||
g_main_loop_run (main_loop);
|
||||
|
||||
g_object_unref (volume_monitor);
|
||||
g_object_unref (global_volume_monitor);
|
||||
|
||||
return success ? 0 : 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user