[epiphany/wip/exalm/elementary: 2/3] notebook: Add a new tab button on Pantheon
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/elementary: 2/3] notebook: Add a new tab button on Pantheon
- Date: Sun, 22 Sep 2019 16:19:04 +0000 (UTC)
commit e91806535a206af0b4ba4368a0ed7ea15de0eef0
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 | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 85a68e766..64a23b4f1 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -24,6 +24,7 @@
#include "ephy-notebook.h"
#include "ephy-debug.h"
+#include "ephy-desktop-utils.h"
#include "ephy-dnd.h"
#include "ephy-embed-utils.h"
#include "ephy-embed.h"
@@ -562,6 +563,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]