Commit a4b366f4 authored by Edward E.'s avatar Edward E. Committed by Michael Natterer

file-open-location: disable widgets only while opening a file

parent 33b7d8e3
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment