Merged from HEAD:

2004-07-13  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
	busy cursor while mounting the volume.  Also, ref the chooser
	while mounting, as we may re-enter.  Fixes #139376.
This commit is contained in:
Federico Mena Quintero
2004-07-13 18:26:47 +00:00
committed by Federico Mena Quintero
parent f979c5c56e
commit e2d90b91c1
5 changed files with 52 additions and 3 deletions

View File

@@ -1,3 +1,11 @@
2004-07-13 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
busy cursor while mounting the volume. Also, ref the chooser
while mounting, as we may re-enter. Fixes #139376.
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.h: Add gtk_parse_args(). Its public API. (#147476,

View File

@@ -1,3 +1,11 @@
2004-07-13 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
busy cursor while mounting the volume. Also, ref the chooser
while mounting, as we may re-enter. Fixes #139376.
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.h: Add gtk_parse_args(). Its public API. (#147476,

View File

@@ -1,3 +1,11 @@
2004-07-13 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
busy cursor while mounting the volume. Also, ref the chooser
while mounting, as we may re-enter. Fixes #139376.
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.h: Add gtk_parse_args(). Its public API. (#147476,

View File

@@ -1,3 +1,11 @@
2004-07-13 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
busy cursor while mounting the volume. Also, ref the chooser
while mounting, as we may re-enter. Fixes #139376.
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.h: Add gtk_parse_args(). Its public API. (#147476,

View File

@@ -4838,12 +4838,22 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
{
GtkFilePath *path;
/* We ref the file chooser since volume_mount() may run a main loop, and the
* user could close the file chooser window in the meantime.
*/
g_object_ref (impl);
if (!gtk_file_system_volume_get_is_mounted (impl->file_system, volume))
{
GError *error;
gboolean result;
set_busy_cursor (impl, TRUE);
error = NULL;
if (!gtk_file_system_volume_mount (impl->file_system, volume, &error))
result = gtk_file_system_volume_mount (impl->file_system, volume, &error);
if (!result)
{
char *msg;
@@ -4853,14 +4863,21 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
error_message (impl, msg);
g_free (msg);
g_error_free (error);
return;
}
set_busy_cursor (impl, FALSE);
if (!result)
goto out;
}
path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
out:
g_object_unref (impl);
}
/* Opens the folder or volume at the specified index in the shortcuts list */