[epiphany] Drop "Help" entry in Pantheon
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Drop "Help" entry in Pantheon
- Date: Thu, 20 Dec 2018 17:24:26 +0000 (UTC)
commit 2a453024fe4c237261a4b5e59e2ddacc74ad0674
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Wed Dec 19 11:28:16 2018 +0100
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
src/ephy-header-bar.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]