[totem] Call egg_set_desktop_file on x11



commit 9d3e4e43f32be3a07907b85181ab646aa39147c9
Author: Christian Persch <chpe gnome org>
Date:   Sun Jun 14 15:55:59 2009 +0200

    Call egg_set_desktop_file on x11
    
    Also move eggdesktopfile.[ch] to WITH_SMCLIENT_XSMP case, since it
    depends on x11.
    Bug #585734.

 src/Makefile.am     |    7 ++++---
 src/totem-session.c |    9 +++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index f77b282..3bf69cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -115,8 +115,6 @@ libtotem_main_la_LIBADD = \
 
 if WITH_SMCLIENT
 libtotem_main_la_SOURCES += \
-	eggdesktopfile.c \
-	eggdesktopfile.h \
 	eggsmclient.c \
 	eggsmclient.h \
 	eggsmclient-private.h \
@@ -125,7 +123,10 @@ libtotem_main_la_CFLAGS += $(SMCLIENT_CFLAGS)
 libtotem_main_la_LIBADD += $(SMCLIENT_LIBS)
 
 if WITH_SMCLIENT_XSMP
-libtotem_main_la_SOURCES += eggsmclient-xsmp.c
+libtotem_main_la_SOURCES += \
+	eggdesktopfile.c \
+	eggdesktopfile.h \
+	eggsmclient-xsmp.c
 libtotem_main_la_CPPFLAGS += -DEGG_SM_CLIENT_BACKEND_XSMP
 endif
 if WITH_SMCLIENT_WIN32
diff --git a/src/totem-session.c b/src/totem-session.c
index 25f4558..4ffd845 100644
--- a/src/totem-session.c
+++ b/src/totem-session.c
@@ -30,8 +30,13 @@
 #ifdef WITH_SMCLIENT
 
 #include <unistd.h>
+
 #include "eggsmclient.h"
 
+#ifdef GDK_WINDOWING_X11
+#include "eggdesktopfile.h"
+#endif
+
 static char *
 totem_session_create_key (void)
 {
@@ -106,6 +111,10 @@ totem_quit_cb (EggSMClient *client,
 void
 totem_session_add_options (GOptionContext *context)
 {
+#ifdef GDK_WINDOWING_X11
+	egg_set_desktop_file (DATADIR "/applications/" PACKAGE ".desktop");
+#endif
+
 	g_option_context_add_group (context, egg_sm_client_get_option_group ());
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]