diff options
author | Federico Mena Quintero <federico@ximian.com> | 2004-07-13 18:25:48 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2004-07-13 18:25:48 +0000 |
commit | f9d9cc9aacd9279d56d380f078867b271c0e64c7 (patch) | |
tree | a6386ddcd7e4f9d137ab46cce3b75f22425c436b | |
parent | 57101256f29c2b6b6437a56b295152a7f45c9cfe (diff) | |
download | gdk-pixbuf-f9d9cc9aacd9279d56d380f078867b271c0e64c7.tar.gz |
Set a busy cursor while mounting the volume. Also, ref the chooser while
2004-07-13 Federico Mena Quintero <federico@ximian.com>
* 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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 23 |
5 files changed, 44 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2004-07-13 Federico Mena Quintero <federico@ximian.com> + + * 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/gtktreeview.c (gtk_tree_view_adjustment_changed): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7e5ca7342..f72f8eb7e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-07-13 Federico Mena Quintero <federico@ximian.com> + + * 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/gtktreeview.c (gtk_tree_view_adjustment_changed): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7e5ca7342..f72f8eb7e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-07-13 Federico Mena Quintero <federico@ximian.com> + + * 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/gtktreeview.c (gtk_tree_view_adjustment_changed): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7e5ca7342..f72f8eb7e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-07-13 Federico Mena Quintero <federico@ximian.com> + + * 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/gtktreeview.c (gtk_tree_view_adjustment_changed): diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index aa75188a6..fb034c912 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4840,12 +4840,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; @@ -4855,14 +4865,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 */ |