[epiphany/wip/exalm/elementary: 4/5] notebook: Add a new tab button on Pantheon



commit 2464fb449c4a3c26c8e8db83f18558fd43609ded
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Sep 22 21:18:05 2019 +0500

    notebook: Add a new tab button on Pantheon

 src/ephy-notebook.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 24c9ceffe..7d4dccaf0 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -574,6 +574,16 @@ ephy_notebook_constructed (GObject *object)
 
   G_OBJECT_CLASS (ephy_notebook_parent_class)->constructed (object);
 
+  if (is_desktop_pantheon ()) {
+    button = gtk_button_new_from_icon_name ("tab-new-symbolic", GTK_ICON_SIZE_MENU);
+    /* Translators: tooltip for the new tab button */
+    gtk_widget_set_tooltip_text (button, _("Open a new tab"));
+    gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "win.new-tab");
+    gtk_style_context_add_class (gtk_widget_get_style_context (button), "flat");
+    gtk_notebook_set_action_widget (GTK_NOTEBOOK (notebook), button, GTK_PACK_START);
+    gtk_widget_show (button);
+  }
+
   button = gtk_menu_button_new ();
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
   /* Translators: tooltip for the tab switcher menu button */


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