changeset 4492:55262ebeba2d

Conditional support for SM (libeggsmclient).
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Apr 2008 07:45:44 +0300
parents 42575ed86c9f
children a3566b1f5222
files src/audacious/main.c src/audacious/signals.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/main.c	Mon Apr 21 07:40:14 2008 +0300
+++ b/src/audacious/main.c	Mon Apr 21 07:45:44 2008 +0300
@@ -81,8 +81,10 @@
 #include "util.h"
 
 #include "libSAD.h"
+#ifdef USE_EGGSM
 #include "eggsmclient.h"
 #include "eggdesktopfile.h"
+#endif
 
 #include "icons-stock.h"
 #include "images/audacious_player.xpm"
@@ -346,7 +348,9 @@
     context = g_option_context_new(_("- play multimedia files"));
     g_option_context_add_main_entries(context, cmd_entries, PACKAGE_NAME);
     g_option_context_add_group(context, gtk_get_option_group(FALSE));
+#ifdef USE_EGGSM
     g_option_context_add_group(context, egg_sm_client_get_option_group());
+#endif
     if (!g_option_context_parse(context, argc, argv, &error))
         /* checking for MacOS X -psn_0_* errors*/
         if (error->message && !g_strrstr(error->message,"-psn_0_"))
@@ -725,7 +729,7 @@
     bind_textdomain_codeset(PACKAGE_NAME "-plugins", "UTF-8");
     textdomain(PACKAGE_NAME);
 
-#ifndef _WIN32
+#if !defined(_WIN32) && defined(USE_EGGSM)
     egg_set_desktop_file(AUDACIOUS_DESKTOP_FILE);
 #endif
     aud_init_paths();
--- a/src/audacious/signals.c	Mon Apr 21 07:40:14 2008 +0300
+++ b/src/audacious/signals.c	Mon Apr 21 07:45:44 2008 +0300
@@ -35,7 +35,9 @@
 #include "main.h"
 #include "signals.h"
 #include "build_stamp.h"
+#ifdef USE_EGGSM
 #include "eggsmclient.h"
+#endif
 
 gint linuxthread_signal_number = 0;
 
@@ -251,6 +253,7 @@
     return FALSE;
 }
 
+#ifdef USE_EGGSM
 static void
 signal_session_quit_cb(EggSMClient *client, gpointer user_data)
 {
@@ -264,10 +267,12 @@
     g_print("Session save requested. Saving state.\n");    
     aud_config_save();
 }
+#endif
 
 void 
 signal_handlers_init(void)
 {
+#ifdef USE_EGGSM
     EggSMClient *client;
 
     client = egg_sm_client_get ();
@@ -280,6 +285,7 @@
                           G_CALLBACK (signal_session_save_cb), NULL);
     
     }
+#endif
 
     if (signal_check_for_broken_impl() != TRUE)
     {