diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2018-12-19 11:28:16 +0100 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2018-12-20 18:19:38 +0100 |
commit | 2a453024fe4c237261a4b5e59e2ddacc74ad0674 (patch) | |
tree | 390f3e4a66ad3a8b78f38140bfb7ab32935800b8 /src/ephy-header-bar.c | |
parent | 554a375e8a90d9fb0cffb10d3248b2a05767b456 (diff) | |
download | epiphany-2a453024fe4c237261a4b5e59e2ddacc74ad0674.tar.gz |
Drop "Help" entry in Pantheon
Add check for pantheon desktop function and remove help entry if needed
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/71
Diffstat (limited to 'src/ephy-header-bar.c')
-rw-r--r-- | src/ephy-header-bar.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c index f169c0548..c7f3fcc9a 100644 --- a/src/ephy-header-bar.c +++ b/src/ephy-header-bar.c @@ -138,6 +138,14 @@ update_revealer_visibility (GtkRevealer *revealer) gtk_revealer_get_child_revealed (revealer)); } +static gboolean +is_desktop_pantheon (void) +{ + const gchar *xdg_current_desktop = g_environ_getenv (g_get_environ (), "XDG_CURRENT_DESKTOP"); + + return strstr (xdg_current_desktop, "Pantheon") != NULL; +} + static void ephy_header_bar_constructed (GObject *object) { @@ -224,7 +232,11 @@ ephy_header_bar_constructed (GObject *object) gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "save-as-application-separator"))); gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "save-as-application-button"))); gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "application-manager-button"))); + + if (is_desktop_pantheon ()) + gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "help-button"))); } + gtk_menu_button_set_popover (GTK_MENU_BUTTON (button), page_menu_popover); g_object_unref (builder); |