/pidgin/main: 3549ff786eab: util: Fix purple_running_gnome() to ...

Mike Ruprecht <[email protected]> Sat, 17 Sep 2016 12:43:53 -0400
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 3549ff786eabdb1586b600385461f029eb0407d2
Author:	 Mike Ruprecht <[email protected]>
Date:	 2016-09-15 12:18 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3549ff786eab

Description:

util: Fix purple_running_gnome() to check for gvfs-open too

Modern GNOME systems have gvfs-open instead of gnome-open. This
patch updates purple_running_gnome() to check for both.
GNOME_DESKTOP_SESSION_ID is deprecated, but it's still set on my
machine for the time being. A better solution should probably be
found before long.

diffstat:

 libpurple/util.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (24 lines):

diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -3222,10 +3222,16 @@ gboolean
 purple_running_gnome(void)
 {
 #ifndef _WIN32
-	gchar *tmp = g_find_program_in_path("gnome-open");
-
-	if (tmp == NULL)
-		return FALSE;
+	gchar *tmp = g_find_program_in_path("gvfs-open");
+
+	if (tmp == NULL) {
+		tmp = g_find_program_in_path("gnome-open");
+
+		if (tmp == NULL) {
+			return FALSE;
+		}
+	}
+
 	g_free(tmp);
 
 	tmp = (gchar *)g_getenv("GNOME_DESKTOP_SESSION_ID");

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits