im.pidgin.pidgin: 845de91fd376d47dc9892baa4506c0519234a536

nosnilmot at pidgin.im nosnilmot at pidgin.im
Sat Nov 17 16:00:43 EST 2007


-----------------------------------------------------------------
Revision: 845de91fd376d47dc9892baa4506c0519234a536
Ancestor: a776d241bfd47adaa15a1ae4cc90d3aa8be2651c
Author: nosnilmot at pidgin.im
Date: 2007-11-17T20:58:56
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c

ChangeLog: 

Allow empty GNOME_DESKTOP_SESSION_ID to "fail" the running_gnome check as
well as it being completely unset. This allows testing non-GNOME
functionality under GNOME by running
   GNOME_DESKTOP_SESSION_ID= pidgin
instead of having to actually unset it.

-------------- next part --------------
============================================================
--- libpurple/util.c	4b9c47b49f09c05348b23abc64286f652299b2c6
+++ libpurple/util.c	51b455da971e63188f5c8af1eee6ef9b5c9e8952
@@ -2937,7 +2937,9 @@ purple_running_gnome(void)
 		return FALSE;
 	g_free(tmp);
 
-	return (g_getenv("GNOME_DESKTOP_SESSION_ID") != NULL);
+	tmp = (gchar *)g_getenv("GNOME_DESKTOP_SESSION_ID");
+
+	return ((tmp != NULL) && (*tmp != '\0'));
 #else
 	return FALSE;
 #endif


More information about the Commits mailing list