summaryrefslogtreecommitdiff
path: root/cut-n-paste-code/libegg/eggsmclient.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-11-22 15:02:51 -0500
committerlukefromdc <[email protected]>2016-11-22 15:02:51 -0500
commit276eb145ce96d5f75f8d3901daf6310f60ddbb81 (patch)
tree544f41e76c9a91973867065696fc2e414ca60170 /cut-n-paste-code/libegg/eggsmclient.c
parent969e4d021fe49654fe6e5ee7e88c920fec126505 (diff)
downloadcaja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.bz2
caja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.xz
move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build option
*Remove GTK_VERSION_CHECK (3, 0, 0) and libunique selectors *Remove GTK2 and libunique specific code. *Leaves selector for specific GTK3 versions. *Remove #DEFINES for vbox/hbox previously required for GTK2 compatability *Keep vbox in caja-spatial-window.c, it is necessary for the desktop to work *spatial-window vbox issue at https://github.com/mate-desktop/caja/issues/591
Diffstat (limited to 'cut-n-paste-code/libegg/eggsmclient.c')
-rw-r--r--cut-n-paste-code/libegg/eggsmclient.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cut-n-paste-code/libegg/eggsmclient.c b/cut-n-paste-code/libegg/eggsmclient.c
index 153d98e8..7dc0f8a8 100644
--- a/cut-n-paste-code/libegg/eggsmclient.c
+++ b/cut-n-paste-code/libegg/eggsmclient.c
@@ -53,7 +53,6 @@ G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client;
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL;
-#if ENABLE_LIBUNIQUE == (0)
static gboolean
running_in_mate (void)
{
@@ -61,7 +60,6 @@ running_in_mate (void)
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
}
-#endif
static void
egg_sm_client_init (EggSMClient *client)
@@ -366,11 +364,10 @@ egg_sm_client_get (void)
/*as egg_sm_client_set_mode must be called prior to start of main loop
/*to stop caja restart but this is diffcult in GtkApplication
*/
-#if ENABLE_LIBUNIQUE == (0)
+
if (geteuid () == 0 || !running_in_mate ()){
global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL);
}
-#endif
}
return global_client;