Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Discard the search widgets in a separate function

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
  • Loading branch information...
commit 6c31de64b383c56695a410513205d33cbeabd2a8 1 parent 3de864c
@federicomenaquintero federicomenaquintero authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 gtk/gtkfilechooserdefault.c
View
16 gtk/gtkfilechooserdefault.c
@@ -5236,6 +5236,18 @@ path_bar_update (GtkFileChooserDefault *impl)
path_bar_set_mode (impl, mode);
}
+static void
+operation_mode_discard_search_widgets (GtkFileChooserDefault *impl)
+{
+ if (impl->search_hbox)
+ {
+ gtk_widget_destroy (impl->search_hbox);
+
+ impl->search_hbox = NULL;
+ impl->search_entry = NULL;
+ }
+}
+
/* Stops running operations like populating the browse model, searches, and the recent-files model */
static void
operation_mode_stop (GtkFileChooserDefault *impl, OperationMode mode)
@@ -5250,9 +5262,7 @@ operation_mode_stop (GtkFileChooserDefault *impl, OperationMode mode)
search_stop_searching (impl, FALSE);
search_clear_model (impl, TRUE);
- gtk_widget_destroy (impl->search_hbox);
- impl->search_hbox = NULL;
- impl->search_entry = NULL;
+ operation_mode_discard_search_widgets (impl);
break;
case OPERATION_MODE_RECENT:
Please sign in to comment.
Something went wrong with that request. Please try again.