Commit 1b53dbd4 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

headerbar: separate the navigation commands from the rest

parent 3fd201f4
......@@ -335,7 +335,7 @@ bookmarks__gth_browser_construct_cb (GthBrowser *browser)
_gtk_window_add_accelerators_from_menu ((GTK_WINDOW (browser)), menu);
gtk_widget_show_all (button);
gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS)), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gth_browser_get_headerbar_section (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_LOCATIONS)), button, FALSE, FALSE, 0);
g_object_unref (builder);
}
......
......@@ -2289,6 +2289,7 @@ _gth_browser_real_set_current_page (GthWindow *window,
_gth_browser_hide_infobar (browser);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION, page == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_LOCATIONS, page == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS, page == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW, page == GTH_BROWSER_PAGE_BROWSER);
_gth_browser_update_header_section_visibility (browser, GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT, page == GTH_BROWSER_PAGE_BROWSER);
......@@ -4218,6 +4219,7 @@ gth_browser_init (GthBrowser *browser)
}
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION]);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_LOCATIONS]);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW]);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT]);
......@@ -4274,7 +4276,7 @@ gth_browser_init (GthBrowser *browser)
"win.go-up",
"<alt>Up");
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION,
GTH_BROWSER_HEADER_SECTION_BROWSER_LOCATIONS,
"user-home-symbolic",
NULL,
"win.go-home",
......
......@@ -53,6 +53,7 @@ typedef enum { /*< skip >*/
typedef enum { /*< skip >*/
GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION,
GTH_BROWSER_HEADER_SECTION_BROWSER_LOCATIONS,
GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS,
GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
GTH_BROWSER_HEADER_SECTION_BROWSER_EDIT,
......
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