[epiphany/wip/bookmarks: 3/76] bookmarks: Add toolbar button for popover



commit c25930533bc5641a0b644e6b70e3194ef0c21729
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Fri Jul 15 20:02:54 2016 +0300

    bookmarks: Add toolbar button for popover

 src/ephy-header-bar.c |   10 ++++++++++
 src/ephy-window.h     |    3 ++-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index cf2b38e..7c86fc7 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -60,6 +60,7 @@ struct _EphyHeaderBar {
   GtkWidget *navigation_box;
   GtkWidget *new_tab_button;
   GtkWidget *combined_stop_reload_button;
+  GtkWidget *bookmarks_button;
   GtkWidget *page_menu_button;
   GtkWidget *downloads_revealer;
   GtkWidget *downloads_button;
@@ -166,6 +167,7 @@ sync_chromes_visibility (EphyHeaderBar *header_bar)
   chrome = ephy_window_get_chrome (header_bar->window);
 
   gtk_widget_set_visible (header_bar->navigation_box, chrome & EPHY_WINDOW_CHROME_HEADER_BAR);
+  gtk_widget_set_visible (header_bar->bookmarks_button, chrome & EPHY_WINDOW_CHROME_BOOKMARKS);
   gtk_widget_set_visible (header_bar->page_menu_button, chrome & EPHY_WINDOW_CHROME_MENU);
   gtk_widget_set_visible (header_bar->new_tab_button, chrome & EPHY_WINDOW_CHROME_TABSBAR);
 }
@@ -652,6 +654,14 @@ ephy_header_bar_constructed (GObject *object)
 
   gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), button);
 
+  /* Bookmarks button */
+  button = gtk_menu_button_new ();
+  header_bar->bookmarks_button = button;
+  gtk_button_set_image (GTK_BUTTON (button),
+                        gtk_image_new_from_icon_name ("user-bookmarks-symbolic", GTK_ICON_SIZE_BUTTON));
+  gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+  gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), button);
+
   /* Downloads */
   downloads_manager = ephy_embed_shell_get_downloads_manager (ephy_embed_shell_get_default ());
 
diff --git a/src/ephy-window.h b/src/ephy-window.h
index a760559..2297093 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -34,7 +34,8 @@ typedef enum
         EPHY_WINDOW_CHROME_MENU          = 1 << 1,
         EPHY_WINDOW_CHROME_LOCATION      = 1 << 2,
         EPHY_WINDOW_CHROME_TABSBAR       = 1 << 3,
-        EPHY_WINDOW_CHROME_DEFAULT       = (EPHY_WINDOW_CHROME_HEADER_BAR | EPHY_WINDOW_CHROME_MENU | 
EPHY_WINDOW_CHROME_LOCATION | EPHY_WINDOW_CHROME_TABSBAR)
+        EPHY_WINDOW_CHROME_BOOKMARKS     = 1 << 4,
+        EPHY_WINDOW_CHROME_DEFAULT       = (EPHY_WINDOW_CHROME_HEADER_BAR | EPHY_WINDOW_CHROME_MENU | 
EPHY_WINDOW_CHROME_LOCATION | EPHY_WINDOW_CHROME_TABSBAR | EPHY_WINDOW_CHROME_BOOKMARKS)
 } EphyWindowChrome;
 
 EphyWindow       *ephy_window_new                 (void);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]