GtkFileSystemModel *browse_files_model;
+ GtkWidget *filter_combo_hbox;
GtkWidget *filter_combo;
GtkWidget *preview_box;
GtkWidget *preview_label;
NULL);
}
-/* Callback used when the "New Folder" toolbar button is clicked */
+/* Callback used when the "New Folder" button is clicked */
static void
new_folder_button_clicked (GtkButton *button,
GtkFileChooserDefault *impl)
return swin;
}
-static GtkWidget *
-create_filename_entry_and_filter_combo (GtkFileChooserDefault *impl)
-{
- GtkWidget *hbox;
- GtkWidget *widget;
-
- hbox = gtk_hbox_new (FALSE, 12);
- gtk_widget_show (hbox);
-
- /* Filter combo */
-
- widget = filter_create (impl);
- gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
-
- return hbox;
-}
-
static GtkWidget *
create_path_bar (GtkFileChooserDefault *impl)
{
gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0);
/* Don't show preview box initially */
- /* Filename entry and filter combo */
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_size_group_add_widget (size_group, hbox);
- widget = create_filename_entry_and_filter_combo (impl);
- gtk_box_pack_end (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- gtk_widget_show (hbox);
+ /* Filter combo */
+
+ impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
+
+ widget = filter_create (impl);
+ gtk_widget_show (widget);
+ gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), widget, FALSE, FALSE, 0);
+
+ gtk_size_group_add_widget (size_group, impl->filter_combo_hbox);
+ gtk_box_pack_end (GTK_BOX (vbox), impl->filter_combo_hbox, FALSE, FALSE, 0);
return vbox;
}
/* Shows or hides the filter widgets */
static void
-toolbar_show_filters (GtkFileChooserDefault *impl,
- gboolean show)
+show_filters (GtkFileChooserDefault *impl,
+ gboolean show)
{
if (show)
- gtk_widget_show (impl->filter_combo);
+ gtk_widget_show (impl->filter_combo_hbox);
else
- gtk_widget_hide (impl->filter_combo);
+ gtk_widget_hide (impl->filter_combo_hbox);
}
static void
if (!g_slist_find (impl->filters, impl->current_filter))
set_current_filter (impl, filter);
- toolbar_show_filters (impl, TRUE);
+ show_filters (impl, TRUE);
}
static void
g_object_unref (filter);
if (!impl->filters)
- toolbar_show_filters (impl, FALSE);
+ show_filters (impl, FALSE);
}
static GSList *