Comment 31 for bug 1274740

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Why don't we use it like gedit? i.e

+static gboolean
+in_desktop (const gchar *name)
+{
+ const gchar *desktop_name_list;
+ gchar **names;
+ gboolean in_list = FALSE;
+ gint i;
+
+ desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP");
+ if (!desktop_name_list)
+ return FALSE;
+
+ names = g_strsplit (desktop_name_list, ":", -1);
+ for (i = 0; names[i] && !in_list; i++)
+ if (strcmp (names[i], name) == 0) {
+ in_list = TRUE;
+ break;
+ }
+ g_strfreev (names);
+
+ return in_list;
+}

Then we can use : if (in_desktop ("Unity"))

And no I don't like going back to GNOME-Flashback:GNOME. Many things will be broken. Lots of things need to be patched which we don't want in LTS.

(BTW, In Ubuntu, we can still reach nautilus preference if we add indicator-applet-appmenu to the panel. Although its a personal choice)