GNOME Bugzilla – Bug 700607
gnome: improve session detection.
Last modified: 2013-05-20 16:03:22 UTC
Detect "gnome", or anything beginning with "gnome-". Handles gnome-classic, and custom gnome-jhbuild or similar sessions.
Created attachment 244683 [details] [review] gnome: improve session detection.
Review of attachment 244683 [details] [review]: ::: proxy/gnome/gproxyresolvergnome.c @@ +319,3 @@ + + return strcmp (session, "gnome") == 0 || + strncmp (session, "gnome-", strlen("gnome-")) == 0; Missing space between strlen and (. Alternatively, you could use g_str_has_prefix (session, "gnome-"). You could even be a bit less precise and just return g_str_has_prefix (session, "gnome");
Created attachment 244726 [details] [review] gnome: improve session detection. Detect anything beginning with "gnome". Handles gnome-classic, and custom gnome-jhbuild or similar sessions.
Review of attachment 244726 [details] [review]: Looks ok to me (modulo my general unease for this kind of environment checks)
Comment on attachment 244726 [details] [review] gnome: improve session detection. This will crash now if DESKTOP_SESSION is unset. Probably best to just read it once, return FALSE if it's unset, then check against gnome and ubuntu.
Created attachment 244826 [details] [review] gnome: improve session detection. Detect anything beginning with "gnome". Handles gnome-classic, and custom gnome-jhbuild or similar sessions. How about this one, then?
Comment on attachment 244826 [details] [review] gnome: improve session detection. looks good
Attachment 244826 [details] pushed as 1b1e333 - gnome: improve session detection.