]> www.fi.muni.cz Git - evince.git/blobdiff - shell/main.c
Make smclient optional
[evince.git] / shell / main.c
index 43fca484baf5d36662f17850ff28bc732fbeb924..41fd85f12a6fa08d54bf22fecf4e1ae23308bb04 100644 (file)
 #include "ev-init.h"
 #include "ev-file-helpers.h"
 #include "ev-stock-icons.h"
+
+#ifdef WITH_SMCLIENT
 #include "eggsmclient.h"
 #ifndef G_OS_WIN32
 #include "eggdesktopfile.h"
 #endif
+#endif /* WITH_SMCLIENT */
 
 static gchar   *ev_page_label;
 static gchar   *ev_find_string;
@@ -398,8 +401,11 @@ main (int argc, char *argv[])
        context = g_option_context_new (N_("GNOME Document Viewer"));
        g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
        g_option_context_add_main_entries (context, goption_options, GETTEXT_PACKAGE);
-       
+
+#ifdef WITH_SMCLIENT
        g_option_context_add_group (context, egg_sm_client_get_option_group ());
+#endif
+
        g_option_context_add_group (context, gtk_get_option_group (TRUE));
 
        if (!g_option_context_parse (context, &argc, &argv, &error)) {
@@ -436,13 +442,13 @@ main (int argc, char *argv[])
 
        ev_stock_icons_init ();
 
-#ifdef G_OS_WIN32
-       /* Manually set name and icon in win32 */
-       g_set_application_name (_("Evince"));
-       gtk_window_set_default_icon_name ("evince");
-#else
+#if defined(WITH_SMCLIENT) && !defined(G_OS_WIN32)
        egg_set_desktop_file (GNOMEDATADIR "/applications/evince.desktop");
-#endif /* G_OS_WIN32 */
+#else
+       /* Manually set name and icon */
+       g_set_application_name (_("Document Viewer"));
+       gtk_window_set_default_icon_name ("evince");
+#endif /* WITH_SMCLIENT && !G_OS_WIN32 */
 
        ev_application_load_session (EV_APP);
        load_files (file_arguments, args);