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) -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to nautilus in Ubuntu. https://bugs.launchpad.net/bugs/1274740 Title: Re-enable traditional titlebar on 'gnome-but-not-shell' sessions too Status in nautilus package in Ubuntu: Confirmed Bug description: Hello and thank you for maintaining Nautilus packages, I'm using Ubuntu on a Cairo-Dock session. With the latest version of Nautilus, we have the new titlebar (CSD) specially made for Gnome-Shell. Is it maybe possible to re-enable the traditional titlebar on 'gnome-but-not-shell' sessions too? (and then only use the new titlebar on Gnome-Shell sessions) On my session, XDG_CURRENT_DESKTOP=GNOME but DESKTOP_SESSION=cairo- dock Best Regards, Matt ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: nautilus 1:3.10.1-0ubuntu2 ProcVersionSignature: Ubuntu 3.13.0-5.20-generic 3.13.0 Uname: Linux 3.13.0-5-generic x86_64 ApportVersion: 2.13.2-0ubuntu2 Architecture: amd64 CurrentDesktop: GNOME Date: Thu Jan 30 23:43:46 2014 GsettingsChanges: b'org.gnome.nautilus.list-view' b'default-column-order' b"['name', 'size', 'type', 'date_modified', 'where', 'group', 'permissions', 'owner', 'mime_type']" InstallationDate: Installed on 2011-08-10 (904 days ago) InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1) SourcePackage: nautilus UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1274740/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp