Mercurial > pidgin
changeset 21580:07588cb48434
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.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 17 Nov 2007 20:58:56 +0000 |
parents | b582549d18c2 |
children | 5b97451dade2 |
files | libpurple/util.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/util.c Sat Nov 17 20:09:15 2007 +0000 +++ b/libpurple/util.c Sat Nov 17 20:58:56 2007 +0000 @@ -2937,7 +2937,9 @@ 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