Move the widgets above the hpaned to their own box

This way we can re-create the contents of that box easily without disrupting
the rest of the file chooser.
Signed-off-by: Federico Mena Quintero's avatarFederico Mena Quintero <federico@gnome.org>
parent 8e9d5e10
...@@ -4912,9 +4912,13 @@ browse_widgets_create (GtkFileChooserDefault *impl) ...@@ -4912,9 +4912,13 @@ browse_widgets_create (GtkFileChooserDefault *impl)
GtkWidget *widget; GtkWidget *widget;
GtkSizeGroup *size_group; GtkSizeGroup *size_group;
/* size group is used by the scrolled windows of the panes */
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
impl->browse_widgets_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); impl->browse_widgets_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (impl), impl->browse_widgets_box, TRUE, TRUE, 0);
gtk_widget_show (impl->browse_widgets_box);
impl->browse_header_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (impl->browse_widgets_box), impl->browse_header_box, FALSE, FALSE, 0);
gtk_widget_show (impl->browse_header_box);
/* Path bar, info bar, and their respective machinery - the browse_path_bar_hbox will get packed elsewhere */ /* Path bar, info bar, and their respective machinery - the browse_path_bar_hbox will get packed elsewhere */
path_bar_widgets_create (impl); path_bar_widgets_create (impl);
...@@ -4922,12 +4926,15 @@ browse_widgets_create (GtkFileChooserDefault *impl) ...@@ -4922,12 +4926,15 @@ browse_widgets_create (GtkFileChooserDefault *impl)
/* Box for the location label and entry */ /* Box for the location label and entry */
impl->location_entry_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); impl->location_entry_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (impl->browse_widgets_box), impl->location_entry_box, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (impl->browse_header_box), impl->location_entry_box, FALSE, FALSE, 0);
impl->location_label = gtk_label_new_with_mnemonic (_("_Location:")); impl->location_label = gtk_label_new_with_mnemonic (_("_Location:"));
gtk_widget_show (impl->location_label); gtk_widget_show (impl->location_label);
gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_label, FALSE, FALSE, 0);
/* size group is used by the scrolled windows of the panes */
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
/* Paned widget */ /* Paned widget */
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
...@@ -4966,7 +4973,6 @@ gtk_file_chooser_default_constructor (GType type, ...@@ -4966,7 +4973,6 @@ gtk_file_chooser_default_constructor (GType type,
/* The browse widgets */ /* The browse widgets */
browse_widgets_create (impl); browse_widgets_create (impl);
gtk_box_pack_start (GTK_BOX (impl), impl->browse_widgets_box, TRUE, TRUE, 0);
/* Alignment to hold extra widget */ /* Alignment to hold extra widget */
impl->extra_align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0); impl->extra_align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
...@@ -5137,8 +5143,8 @@ restore_path_bar (GtkFileChooserDefault *impl) ...@@ -5137,8 +5143,8 @@ restore_path_bar (GtkFileChooserDefault *impl)
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{ {
gtk_box_pack_start (GTK_BOX (impl->browse_widgets_box), impl->browse_path_bar_hbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (impl->browse_header_box), impl->browse_path_bar_hbox, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (impl->browse_widgets_box), impl->browse_path_bar_hbox, 0); gtk_box_reorder_child (GTK_BOX (impl->browse_header_box), impl->browse_path_bar_hbox, 0);
} }
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE else if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
...@@ -5380,7 +5386,6 @@ update_appearance (GtkFileChooserDefault *impl) ...@@ -5380,7 +5386,6 @@ update_appearance (GtkFileChooserDefault *impl)
{ {
gtk_widget_show (impl->location_button); gtk_widget_show (impl->location_button);
save_widgets_destroy (impl); save_widgets_destroy (impl);
gtk_widget_show (impl->browse_widgets_box);
location_mode_set (impl, impl->location_mode, TRUE); location_mode_set (impl, impl->location_mode, TRUE);
} }
......
...@@ -168,6 +168,7 @@ struct _GtkFileChooserDefault ...@@ -168,6 +168,7 @@ struct _GtkFileChooserDefault
/* The file browsing widgets */ /* The file browsing widgets */
GtkWidget *browse_widgets_box; GtkWidget *browse_widgets_box;
GtkWidget *browse_header_box;
GtkWidget *browse_shortcuts_tree_view; GtkWidget *browse_shortcuts_tree_view;
GtkWidget *browse_shortcuts_add_button; GtkWidget *browse_shortcuts_add_button;
GtkWidget *browse_shortcuts_remove_button; GtkWidget *browse_shortcuts_remove_button;
......
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