[gtk+/gtk-2-24] filechooserentry: Don't update the folder when completing
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] filechooserentry: Don't update the folder when completing
- Date: Thu, 10 Mar 2016 21:30:34 +0000 (UTC)
commit 8a4dda06feadb78e63956b049a489b3bbea32a10
Author: Benjamin Otte <otte redhat com>
Date: Mon Nov 7 02:58:26 2011 +0100
filechooserentry: Don't update the folder when completing
The folder is always up to date, there's no need to update it. (If the
folder is not up to date, that is a bug and needs to be fixed
elsewhere.)
gtk/gtkfilechooserentry.c | 57 +++-----------------------------------------
1 files changed, 4 insertions(+), 53 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 49110eb..514ad99 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -679,59 +679,10 @@ gtk_file_chooser_entry_grab_focus (GtkWidget *widget)
static void
start_explicit_completion (GtkFileChooserEntry *chooser_entry)
{
- RefreshStatus status;
- gboolean is_error;
- char *text;
-
- text = gtk_editable_get_chars (GTK_EDITABLE (chooser_entry),
- 0, gtk_editable_get_position (GTK_EDITABLE (chooser_entry)));
- status = refresh_current_folder_and_file_part (chooser_entry, text);
- g_free (text);
-
- is_error = FALSE;
-
- switch (status)
- {
- case REFRESH_OK:
- g_assert (chooser_entry->current_folder_file != NULL);
-
- if (chooser_entry->current_folder_loaded)
- explicitly_complete (chooser_entry);
- else
- {
- chooser_entry->load_complete_action = LOAD_COMPLETE_EXPLICIT_COMPLETION;
- }
-
- break;
-
- case REFRESH_INVALID_INPUT:
- is_error = TRUE;
- break;
-
- case REFRESH_INCOMPLETE_HOSTNAME:
- is_error = TRUE;
- break;
-
- case REFRESH_NONEXISTENT:
- is_error = TRUE;
- break;
-
- case REFRESH_NOT_LOCAL:
- is_error = TRUE;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- if (is_error)
- {
- g_assert (chooser_entry->current_folder_file == NULL);
-
- beep (chooser_entry);
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
- }
+ if (chooser_entry->current_folder_loaded)
+ explicitly_complete (chooser_entry);
+ else
+ chooser_entry->load_complete_action = LOAD_COMPLETE_EXPLICIT_COMPLETION;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]