[epiphany/wip/page-menu-popover: 2/2] Implement new Page Menu popover design
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/page-menu-popover: 2/2] Implement new Page Menu popover design
- Date: Thu, 22 Sep 2016 21:26:50 +0000 (UTC)
commit 3dfe333a6b68f8b01e0be864d638c403a0876f23
Author: Iulian Radu <iulian radu67 gmail com>
Date: Fri Sep 23 00:23:53 2016 +0300
Implement new Page Menu popover design
src/Makefile.am | 1 +
src/bookmarks/Makefile.am | 2 -
src/bookmarks/ephy-bookmarks-menu.c | 239 --------------------------------
src/bookmarks/ephy-bookmarks-menu.h | 32 -----
src/bookmarks/ephy-bookmarks-ui.c | 174 -----------------------
src/bookmarks/ephy-topic-action.c | 1 -
src/ephy-header-bar.c | 14 +--
src/ephy-window.c | 71 ++++++----
src/epiphany.gresource.xml | 1 +
src/resources/gtk/menus.ui | 96 -------------
src/resources/gtk/page-menu-popover.ui | 199 ++++++++++++++++++++++++++
11 files changed, 248 insertions(+), 582 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 16edae7..d392db7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -117,6 +117,7 @@ RESOURCE_FILES = \
resources/epiphany.css \
resources/error.html \
resources/gtk/menus.ui \
+ resources/gtk/page-menu-popover.ui \
resources/history-dialog.ui \
resources/incognito.png \
resources/missing-thumbnail.png \
diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am
index bc8661d..c695db2 100644
--- a/src/bookmarks/Makefile.am
+++ b/src/bookmarks/Makefile.am
@@ -16,8 +16,6 @@ libephybookmarks_la_SOURCES = \
ephy-bookmarks-import.h \
ephy-bookmarks-ui.c \
ephy-bookmarks-ui.h \
- ephy-bookmarks-menu.c \
- ephy-bookmarks-menu.h \
ephy-bookmark-properties.c \
ephy-bookmark-properties.h \
ephy-link-action.c \
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index f9e239b..f1d99a9 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -23,7 +23,6 @@
#include "ephy-bookmark-action-group.h"
#include "ephy-bookmark-action.h"
#include "ephy-bookmark-properties.h"
-#include "ephy-bookmarks-menu.h"
#include "ephy-bookmarks.h"
#include "ephy-debug.h"
#include "ephy-dnd.h"
@@ -48,7 +47,6 @@
#define BM_WINDOW_DATA_KEY "bookmarks-window-data"
typedef struct {
- GMenu *bookmarks_menu;
guint toolbar_menu;
} BookmarksWindowData;
@@ -59,114 +57,6 @@ enum {
static GHashTable *properties_dialogs = 0;
-static GMenu *
-find_bookmarks_menu (EphyWindow *window)
-{
- GtkWidget *page_menu_button;
- GMenuModel *page_menu;
- gint n_items, i;
-
- /* Page menu */
- page_menu_button = ephy_header_bar_get_page_menu_button (EPHY_HEADER_BAR (ephy_window_get_header_bar
(window)));
- page_menu = gtk_menu_button_get_menu_model (GTK_MENU_BUTTON (page_menu_button));
-
- /* Number of sections in the model */
- n_items = g_menu_model_get_n_items (page_menu);
-
- for (i = 0; i < n_items; i++) {
- GVariant *section_label;
-
- /* Looking for the bookmarks section */
- section_label = g_menu_model_get_item_attribute_value (page_menu, i, "id", G_VARIANT_TYPE_STRING);
- if (section_label != NULL && g_strcmp0 (g_variant_get_string (section_label, NULL), "bookmarks-section")
== 0) {
- GMenuModel *bookmarks_section_model;
- GMenuModel *bookmarks_menu_model;
-
- /* Bookmarks section should contain the bookmarks menu */
- bookmarks_section_model = g_menu_model_get_item_link (page_menu, i, G_MENU_LINK_SECTION);
- bookmarks_menu_model = g_menu_model_get_item_link (bookmarks_section_model, 0, G_MENU_LINK_SUBMENU);
-
- return G_MENU (bookmarks_menu_model);
- }
- }
-
- return NULL;
-}
-
-static bool
-activate_bookmarks_menu (GSimpleAction *action,
- GdkEvent *event,
- gpointer user_data)
-{
- GMenu *menu;
- BookmarksWindowData *data = g_object_get_data (G_OBJECT (user_data), BM_WINDOW_DATA_KEY);
-
- if (event->type != GDK_BUTTON_PRESS)
- return G_SOURCE_REMOVE;
-
- if (data && !data->bookmarks_menu) {
- menu = g_menu_new ();
- ephy_bookmarks_menu_build (menu, 0);
-
- data->bookmarks_menu = G_MENU (find_bookmarks_menu (EPHY_WINDOW (user_data)));
- if (data->bookmarks_menu == NULL)
- return G_SOURCE_REMOVE;
-
- g_menu_append_section (data->bookmarks_menu, NULL, G_MENU_MODEL (menu));
- }
-
- return G_SOURCE_REMOVE;
-}
-
-static void
-erase_bookmarks_menu (EphyWindow *window)
-{
- BookmarksWindowData *data;
-
- data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
-
- if (data != NULL && data->bookmarks_menu != NULL) {
- g_menu_remove_all (data->bookmarks_menu);
- g_clear_object (&data->bookmarks_menu);
- }
-}
-
-static void
-tree_changed_cb (EphyBookmarks *bookmarks,
- EphyWindow *window)
-{
- erase_bookmarks_menu (window);
-}
-
-static void
-node_added_cb (EphyNode *parent,
- EphyNode *child,
- EphyWindow *window)
-{
- erase_bookmarks_menu (window);
-}
-
-static void
-node_changed_cb (EphyNode *parent,
- EphyNode *child,
- guint property_id,
- EphyWindow *window)
-{
- if (property_id == EPHY_NODE_KEYWORD_PROP_NAME ||
- property_id == EPHY_NODE_BMK_PROP_TITLE) {
- erase_bookmarks_menu (window);
- }
-}
-
-static void
-node_removed_cb (EphyNode *parent,
- EphyNode *child,
- guint index,
- EphyWindow *window)
-{
- erase_bookmarks_menu (window);
-}
-
void
ephy_bookmarks_ui_attach_window (EphyWindow *window)
{
@@ -176,7 +66,6 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
BookmarksWindowData *data;
GtkUIManager *manager;
GtkActionGroup *actions;
- GtkWidget *page_menu_button;
eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
bookmarks = ephy_bookmarks_get_bookmarks (eb);
@@ -207,35 +96,6 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
G_CALLBACK (ephy_link_open), G_OBJECT (window),
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
g_object_unref (actions);
-
- /* Add signal handlers for the bookmark database */
- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
- (EphyNodeCallback)node_added_cb,
- G_OBJECT (window));
- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_ADDED,
- (EphyNodeCallback)node_added_cb,
- G_OBJECT (window));
-
- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
- (EphyNodeCallback)node_removed_cb,
- G_OBJECT (window));
- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_REMOVED,
- (EphyNodeCallback)node_removed_cb,
- G_OBJECT (window));
-
- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
- (EphyNodeCallback)node_changed_cb,
- G_OBJECT (window));
- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_CHANGED,
- (EphyNodeCallback)node_changed_cb,
- G_OBJECT (window));
-
- g_signal_connect_object (eb, "tree_changed",
- G_CALLBACK (tree_changed_cb),
- G_OBJECT (window), 0);
-
- page_menu_button = ephy_header_bar_get_page_menu_button (EPHY_HEADER_BAR (ephy_window_get_header_bar
(window)));
- g_signal_connect (GTK_WIDGET (page_menu_button), "button-press-event", G_CALLBACK
(activate_bookmarks_menu), window);
}
void
@@ -246,44 +106,10 @@ ephy_bookmarks_ui_detach_window (EphyWindow *window)
EphyNode *topics = ephy_bookmarks_get_keywords (eb);
BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
- GtkWidget *page_menu_button;
g_return_if_fail (data != 0);
- if (data->bookmarks_menu) {
- g_menu_remove_all (data->bookmarks_menu);
- g_object_unref (data->bookmarks_menu);
- data->bookmarks_menu = NULL;
- }
-
g_object_set_data (G_OBJECT (window), BM_WINDOW_DATA_KEY, 0);
-
- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
- (EphyNodeCallback)node_added_cb,
- G_OBJECT (window));
- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_ADDED,
- (EphyNodeCallback)node_added_cb,
- G_OBJECT (window));
-
- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
- (EphyNodeCallback)node_removed_cb,
- G_OBJECT (window));
- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_REMOVED,
- (EphyNodeCallback)node_removed_cb,
- G_OBJECT (window));
-
- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
- (EphyNodeCallback)node_changed_cb,
- G_OBJECT (window));
- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_CHANGED,
- (EphyNodeCallback)node_changed_cb,
- G_OBJECT (window));
-
- g_signal_handlers_disconnect_by_func
- (G_OBJECT (eb), G_CALLBACK (tree_changed_cb), G_OBJECT (window));
-
- page_menu_button = ephy_header_bar_get_page_menu_button (EPHY_HEADER_BAR (ephy_window_get_header_bar
(window)));
- g_signal_handlers_disconnect_by_func (GTK_WIDGET (page_menu_button), G_CALLBACK (activate_bookmarks_menu),
window);
}
static void
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 077bf00..cde615c 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -25,7 +25,6 @@
#include "ephy-nodes-cover.h"
#include "ephy-bookmarks.h"
#include "ephy-bookmarks-ui.h"
-#include "ephy-bookmarks-menu.h"
#include "ephy-shell.h"
#include "ephy-gui.h"
#include "ephy-debug.h"
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 17c8516..6d6c269 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -548,8 +548,7 @@ ephy_header_bar_constructed (GObject *object)
{
EphyHeaderBar *header_bar = EPHY_HEADER_BAR (object);
GtkWidget *box, *button;
- GtkMenu *menu;
- GMenu *page_menu;
+ GtkWidget *page_menu_popover;
EphyDownloadsManager *downloads_manager;
GtkBuilder *builder;
EphyHistoryService *history_service;
@@ -644,15 +643,12 @@ ephy_header_bar_constructed (GObject *object)
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("open-menu-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
- builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/menus.ui");
- page_menu = G_MENU (gtk_builder_get_object (builder, "page-menu"));
- gtk_menu_button_set_use_popover (GTK_MENU_BUTTON (button), FALSE);
- gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button),
- G_MENU_MODEL (page_menu));
+ g_type_ensure(G_TYPE_THEMED_ICON);
+ builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/page-menu-popover.ui");
+ page_menu_popover = GTK_WIDGET (gtk_builder_get_object (builder, "page-menu-popover"));
+ gtk_menu_button_set_popover (GTK_MENU_BUTTON (button), page_menu_popover);
g_object_unref (builder);
- menu = gtk_menu_button_get_popup (GTK_MENU_BUTTON (button));
- gtk_widget_set_halign (GTK_WIDGET (menu), GTK_ALIGN_END);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), button);
/* Downloads */
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 2ee2337..3ace399 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -772,27 +772,6 @@ enable_edit_actions_sensitivity (EphyWindow *window)
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), TRUE);
}
-static void
-edit_menu_toggle_cb (GtkWidget *menu,
- EphyWindow *window)
-{
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (menu)))
- update_edit_actions_sensitivity (window, FALSE);
- else
- enable_edit_actions_sensitivity (window);
-}
-
-static void
-init_menu_updaters (EphyWindow *window)
-{
- GtkWidget *page_menu;
-
- page_menu = ephy_header_bar_get_page_menu_button (EPHY_HEADER_BAR (window->header_bar));
-
- g_signal_connect (page_menu, "toggled",
- G_CALLBACK (edit_menu_toggle_cb), window);
-}
-
static const GActionEntry window_entries [] =
{
{ "new-tab", window_cmd_new_tab },
@@ -942,7 +921,10 @@ const struct {
{ "copy-audio-location", N_("_Copy Audio Address") },
/* Selection */
- { "search-selection", NULL }
+ { "search-selection", NULL },
+
+ { "save-as", N_("Save Pa_ge As…") },
+ { "page-source", N_("_Page Source") }
};
static char *
@@ -1030,12 +1012,40 @@ sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
GAction *action;
gboolean can_zoom_in = TRUE, can_zoom_out = TRUE, can_zoom_normal = FALSE;
double zoom;
+ GtkWidget *page_menu_button;
+ GtkPopover *page_menu_popover;
+ GtkWidget *widget;
+ GtkWidget *zoom_level_entry;
+ GList *children;
+ char *zoom_level_text;
if (window->closing)
return;
zoom = webkit_web_view_get_zoom_level (web_view);
+ /* Update the zoom level entry in the page menu popover:
+ * - obtain the popover from the page menu button
+ * - obtain the box (the first children of the popover)
+ * - obtain the "zoom box" (the first children of the box above)
+ * - obtain the GtkEntry which is the second children of
+ */
+ page_menu_button = ephy_header_bar_get_page_menu_button (EPHY_HEADER_BAR (window->header_bar));
+ page_menu_popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (page_menu_button));
+ children = gtk_container_get_children (GTK_CONTAINER (page_menu_popover));
+ widget = g_list_nth_data (children, 0);
+ g_assert (GTK_IS_BOX (widget));
+ children = gtk_container_get_children (GTK_CONTAINER (widget));
+ widget = g_list_nth_data (children, 0);
+ g_assert (GTK_IS_BOX (widget));
+ children = gtk_container_get_children (GTK_CONTAINER (widget));
+ zoom_level_entry = g_list_nth_data (children, 1);
+ g_assert (GTK_IS_ENTRY (zoom_level_entry));
+
+ zoom_level_text = g_strdup_printf ("%.0lf%%", zoom * 100);
+ gtk_entry_set_text (GTK_ENTRY (zoom_level_entry), zoom_level_text);
+ g_free (zoom_level_text);
+
if (zoom >= ZOOM_MAXIMAL) {
can_zoom_in = FALSE;
}
@@ -1671,6 +1681,13 @@ populate_context_menu (WebKitWebView *web_view,
webkit_context_menu_append (context_menu,
webkit_context_menu_item_new_separator ());
+ add_action_to_context_menu (context_menu, window_action_group,
+ "save-as", window);
+
+ webkit_context_menu_append (context_menu,
+ webkit_context_menu_item_new_separator ());
+ add_action_to_context_menu (context_menu, window_action_group,
+ "page-source", window);
webkit_context_menu_append (context_menu,
webkit_context_menu_item_new_from_stock_action
(WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT));
@@ -3024,8 +3041,6 @@ ephy_window_constructed (GObject *object)
chrome &= ~(EPHY_WINDOW_CHROME_LOCATION | EPHY_WINDOW_CHROME_MENU | EPHY_WINDOW_CHROME_TABSBAR);
}
- init_menu_updaters (window);
-
ephy_window_set_chrome (window, chrome);
}
@@ -3207,15 +3222,13 @@ ephy_window_set_zoom (EphyWindow *window,
current_zoom = webkit_web_view_get_zoom_level (web_view);
- if (zoom == ZOOM_IN) {
+ if (zoom == ZOOM_IN)
zoom = ephy_zoom_get_changed_zoom_level (current_zoom, 1);
- } else if (zoom == ZOOM_OUT) {
+ else if (zoom == ZOOM_OUT)
zoom = ephy_zoom_get_changed_zoom_level (current_zoom, -1);
- }
- if (zoom != current_zoom) {
+ if (zoom != current_zoom)
webkit_web_view_set_zoom_level (web_view, zoom);
- }
}
static void
diff --git a/src/epiphany.gresource.xml b/src/epiphany.gresource.xml
index dbf2afb..0391977 100644
--- a/src/epiphany.gresource.xml
+++ b/src/epiphany.gresource.xml
@@ -13,6 +13,7 @@
<file preprocess="xml-stripblanks" compressed="true">passwords-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">shortcuts-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/menus.ui</file>
+ <file preprocess="xml-stripblanks" compressed="true">gtk/page-menu-popover.ui</file>
<file preprocess="xml-stripblanks">epiphany-application-menu.ui</file>
<file preprocess="xml-stripblanks">epiphany-bookmark-editor-ui.xml</file>
<file>epiphany.css</file>
diff --git a/src/resources/gtk/menus.ui b/src/resources/gtk/menus.ui
index e66f2cc..7c46b35 100644
--- a/src/resources/gtk/menus.ui
+++ b/src/resources/gtk/menus.ui
@@ -1,102 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <menu id="page-menu">
- <section>
- <item>
- <attribute name="label" translatable="yes">New Tab</attribute>
- <attribute name="action">win.new-tab</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Open…</attribute>
- <attribute name="action">win.open</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Save _As…</attribute>
- <attribute name="action">win.save-as</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Save As _Web Application…</attribute>
- <attribute name="action">win.save-as-application</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Undo</attribute>
- <attribute name="action">win.undo</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Re_do</attribute>
- <attribute name="action">win.redo</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Cu_t</attribute>
- <attribute name="action">win.cut</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Copy</attribute>
- <attribute name="action">win.copy</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Paste</attribute>
- <attribute name="action">win.paste</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Zoom _In</attribute>
- <attribute name="action">win.zoom-in</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Zoom _Out</attribute>
- <attribute name="action">win.zoom-out</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Print…</attribute>
- <attribute name="action">win.print</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Find…</attribute>
- <attribute name="action">win.find</attribute>
- </item>
- </section>
- <section id="bookmarks-section">
- <attribute name="id">bookmarks-section</attribute>
- <submenu id="bookmarks-menu">
- <attribute name="label" translatable="yes">_Bookmarks</attribute>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Add Bookmark…</attribute>
- <attribute name="action">win.bookmark-page</attribute>
- </item>
- </section>
- <section id="bookmarks-section">
- </section>
- </submenu>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Text _Encoding</attribute>
- <attribute name="action">win.encoding</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">_Page Source</attribute>
- <attribute name="action">win.page-source</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Close</attribute>
- <attribute name="action">tab.close</attribute>
- </item>
- </section>
- </menu>
<menu id="notebook-menu">
<section>
<item>
diff --git a/src/resources/gtk/page-menu-popover.ui b/src/resources/gtk/page-menu-popover.ui
new file mode 100644
index 0000000..9dc6d94
--- /dev/null
+++ b/src/resources/gtk/page-menu-popover.ui
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkPopoverMenu" id="page-menu-popover">
+ <child>
+ <object class="GtkBox">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkBox" id="zoom-box">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="homogeneous">True</property>
+ <property name="margin-bottom">6</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkModelButton">
+ <property name="text">Zoom Out</property>
+ <property name="action-name">win.zoom-out</property>
+ <property name="iconic">True</property>
+ <property name="centered">True</property>
+ <property name="icon">zoom_out</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="zoom-level">
+ <property name="xalign">0.5</property>
+ <property name="sensitive">False</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="text">Zoom In</property>
+ <property name="action-name">win.zoom-in</property>
+ <property name="iconic">True</property>
+ <property name="centered">True</property>
+ <property name="icon">zoom_in</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <property name="homogeneous">True</property>
+ <property name="margin-bottom">6</property>
+ <child>
+ <object class="GtkModelButton">
+ <property name="text">Zoom Out</property>
+ <property name="action-name">win.print</property>
+ <property name="iconic">True</property>
+ <property name="centered">True</property>
+ <property name="icon">print</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="text">Zoom Out</property>
+ <property name="action-name">win.find</property>
+ <property name="iconic">True</property>
+ <property name="centered">True</property>
+ <property name="icon">find</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="text">Zoom In</property>
+ <property name="action-name">win.fullscreen</property>
+ <property name="iconic">True</property>
+ <property name="centered">True</property>
+ <property name="icon">fullscreen</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="orientation">horizontal</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">_New Tab</property>
+ <property name="action-name">win.new-tab</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">New _Window</property>
+ <property name="action-name">app.new-window</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">New _Incognito Window</property>
+ <property name="action-name">app.new-incognito</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="orientation">horizontal</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">Text _Encoding</property>
+ <property name="action-name">win.encoding</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="orientation">horizontal</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">Install Site as Web _Application…</property>
+ <property name="action-name">win.save-as-application</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GThemedIcon" id="zoom_out">
+ <property name="name">zoom-out-symbolic</property>
+ </object>
+ <object class="GThemedIcon" id="zoom_in">
+ <property name="name">zoom-in-symbolic</property>
+ </object>
+ <object class="GThemedIcon" id="print">
+ <property name="name">document-print-symbolic</property>
+ </object>
+ <object class="GThemedIcon" id="find">
+ <property name="name">system-search-symbolic</property>
+ </object>
+ <object class="GThemedIcon" id="fullscreen">
+ <property name="name">view-fullscreen-symbolic</property>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]