# HG changeset patch # User Matti Hamalainen # Date 1208753144 -10800 # Node ID 55262ebeba2ddceeab0b4d362dea339a9913e998 # Parent 42575ed86c9f1f2620e85c74000453dd7d96d800 Conditional support for SM (libeggsmclient). diff -r 42575ed86c9f -r 55262ebeba2d src/audacious/main.c --- 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(); diff -r 42575ed86c9f -r 55262ebeba2d src/audacious/signals.c --- 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) {