[gimp] app: don't mess with the dialog's sensitivity while checking the extension
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't mess with the dialog's sensitivity while checking the extension
- Date: Tue, 14 Feb 2012 11:19:56 +0000 (UTC)
commit 8559a28fd435e81f5c684c11a2e36dff1a3e504a
Author: Michael Natterer <mitch gimp org>
Date: Tue Feb 14 12:18:34 2012 +0100
app: don't mess with the dialog's sensitivity while checking the extension
so the same widget (e.g. the entry) stays focused after dismissing the
extension mismatch message dialog.
app/dialogs/file-save-dialog.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
index ff34ada..fdb413b 100644
--- a/app/dialogs/file-save-dialog.c
+++ b/app/dialogs/file-save-dialog.c
@@ -175,7 +175,6 @@ file_save_dialog_response (GtkWidget *save_dialog,
return;
}
- gimp_file_dialog_set_sensitive (dialog, FALSE);
handler_id = g_signal_connect (dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&dialog);
@@ -183,6 +182,8 @@ file_save_dialog_response (GtkWidget *save_dialog,
if (file_save_dialog_check_uri (save_dialog, gimp,
&uri, &basename, &save_proc))
{
+ gimp_file_dialog_set_sensitive (dialog, FALSE);
+
if (file_save_dialog_save_image (GIMP_PROGRESS (save_dialog),
gimp,
dialog->image,
@@ -239,13 +240,13 @@ file_save_dialog_response (GtkWidget *save_dialog,
g_free (uri);
g_free (basename);
+
+ if (dialog)
+ gimp_file_dialog_set_sensitive (dialog, TRUE);
}
if (dialog)
- {
- gimp_file_dialog_set_sensitive (dialog, TRUE);
- g_signal_handler_disconnect (dialog, handler_id);
- }
+ g_signal_handler_disconnect (dialog, handler_id);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]