comparison libpurple/util.c @ 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 39231317310a
children 87387eac4348
comparison
equal deleted inserted replaced
21579:b582549d18c2 21580:07588cb48434
2935 2935
2936 if (tmp == NULL) 2936 if (tmp == NULL)
2937 return FALSE; 2937 return FALSE;
2938 g_free(tmp); 2938 g_free(tmp);
2939 2939
2940 return (g_getenv("GNOME_DESKTOP_SESSION_ID") != NULL); 2940 tmp = (gchar *)g_getenv("GNOME_DESKTOP_SESSION_ID");
2941
2942 return ((tmp != NULL) && (*tmp != '\0'));
2941 #else 2943 #else
2942 return FALSE; 2944 return FALSE;
2943 #endif 2945 #endif
2944 } 2946 }
2945 2947