diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-desktop-utils.c | 11 | ||||
-rw-r--r-- | src/ephy-desktop-utils.h | 1 | ||||
-rw-r--r-- | src/ephy-shell.c | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/ephy-desktop-utils.c b/src/ephy-desktop-utils.c index 54f21a1dd..008ed4d6c 100644 --- a/src/ephy-desktop-utils.c +++ b/src/ephy-desktop-utils.c @@ -35,6 +35,17 @@ is_desktop_pantheon (void) return strstr (xdg_current_desktop, "Pantheon") != NULL; } +gboolean +is_desktop_gnome (void) +{ + const gchar *xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); + + if (!xdg_current_desktop) + return FALSE; + + return strstr (xdg_current_desktop, "GNOME") != NULL; +} + GtkIconSize get_icon_size (void) { diff --git a/src/ephy-desktop-utils.h b/src/ephy-desktop-utils.h index c6fb04cad..c162f3f5a 100644 --- a/src/ephy-desktop-utils.h +++ b/src/ephy-desktop-utils.h @@ -31,6 +31,7 @@ typedef enum { } EphyFaviconType; gboolean is_desktop_pantheon (void); +gboolean is_desktop_gnome (void); GtkIconSize get_icon_size (void); diff --git a/src/ephy-shell.c b/src/ephy-shell.c index d0c85d0bd..ada829f38 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -24,6 +24,7 @@ #include "ephy-shell.h" #include "ephy-debug.h" +#include "ephy-desktop-utils.h" #include "ephy-embed-container.h" #include "ephy-embed-utils.h" #include "ephy-file-helpers.h" @@ -611,8 +612,10 @@ ephy_shell_activate (GApplication *application) EphyShell *shell = EPHY_SHELL (application); EphyEmbedShell *embed_shell = EPHY_EMBED_SHELL (shell); - g_signal_connect (ephy_shell_get_net_monitor (shell), "notify::connectivity", G_CALLBACK (connectivity_changed), shell); - portal_check (shell); + if (!is_desktop_gnome ()) { + g_signal_connect (ephy_shell_get_net_monitor (shell), "notify::connectivity", G_CALLBACK (connectivity_changed), shell); + portal_check (shell); + } if (ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_AUTOMATION) { WebKitWebContext *web_context = ephy_embed_shell_get_web_context (embed_shell); |