[gimp] file-open-location: disable widgets only while opening a file
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] file-open-location: disable widgets only while opening a file
- Date: Sun, 1 Apr 2018 10:49:49 +0000 (UTC)
commit a4b366f49440e8755cfb7ff63efe5c2a1c955a8f
Author: Edward E <develinthedetail gmail com>
Date: Sat Mar 31 12:00:05 2018 -0500
file-open-location: disable widgets only while opening a file
app/dialogs/file-open-location-dialog.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/app/dialogs/file-open-location-dialog.c b/app/dialogs/file-open-location-dialog.c
index d542241..462b1a5 100644
--- a/app/dialogs/file-open-location-dialog.c
+++ b/app/dialogs/file-open-location-dialog.c
@@ -162,10 +162,6 @@ file_open_location_response (GtkDialog *dialog,
}
entry = g_object_get_data (G_OBJECT (dialog), "location-entry");
-
- gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
-
text = gtk_entry_get_text (GTK_ENTRY (entry));
if (text && strlen (text))
@@ -204,6 +200,9 @@ file_open_location_response (GtkDialog *dialog,
gtk_widget_show (box);
+ gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
+
image = file_open_with_proc_and_display (gimp,
gimp_get_user_context (gimp),
GIMP_PROGRESS (box),
@@ -213,6 +212,9 @@ file_open_location_response (GtkDialog *dialog,
gimp_widget_get_monitor (entry),
&status, &error);
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
+ gtk_editable_set_editable (GTK_EDITABLE (entry), TRUE);
+
g_object_unref (entered_file);
if (image == NULL && status != GIMP_PDB_CANCEL)
@@ -232,9 +234,6 @@ file_open_location_response (GtkDialog *dialog,
text, error->message);
g_clear_error (&error);
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
- gtk_editable_set_editable (GTK_EDITABLE (entry), TRUE);
-
return;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]