seahorse r2733 - in trunk: . daemon
- From: sadam svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2733 - in trunk: . daemon
- Date: Sun, 1 Feb 2009 18:30:28 +0000 (UTC)
Author: sadam
Date: Sun Feb 1 18:30:27 2009
New Revision: 2733
URL: http://svn.gnome.org/viewvc/seahorse?rev=2733&view=rev
Log:
2009-02-01 Adam Schreiber <sadam clemson edu>
* daemon/Makefile.am:
* daemon/seahorse-daemon.c: Register properly with the session
manager.
Fixes bug #569636
Modified:
trunk/ChangeLog
trunk/daemon/Makefile.am
trunk/daemon/seahorse-daemon.c
Modified: trunk/daemon/Makefile.am
==============================================================================
--- trunk/daemon/Makefile.am (original)
+++ trunk/daemon/Makefile.am Sun Feb 1 18:30:27 2009
@@ -6,13 +6,15 @@
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/libcryptui \
+ -I$(top_srcdir)/libegg \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_GLADEDIR=\""$(gladedir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DPIXMAPSDIR=\""$(pixmapsdir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE
+ -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
+ -DAUTOSTARTDIR=\""$(sysconfdir)/xdg/autostart"\"
bin_PROGRAMS = seahorse-daemon
@@ -56,6 +58,7 @@
$(top_builddir)/common/libseahorse-common.la \
$(top_builddir)/libcryptui/libcryptui.la \
$(top_builddir)/libegg/libeggdatetime.la \
+ $(top_builddir)/libegg/libeggsmclient.la \
$(SEAHORSE_LIBS)
man_MANS = seahorse-daemon.1
Modified: trunk/daemon/seahorse-daemon.c
==============================================================================
--- trunk/daemon/seahorse-daemon.c (original)
+++ trunk/daemon/seahorse-daemon.c Sun Feb 1 18:30:27 2009
@@ -39,6 +39,9 @@
#include "ssh/seahorse-ssh-module.h"
#endif
+#include "libegg/eggsmclient.h"
+#include "libegg/eggdesktopfile.h"
+
#include <glib/gi18n.h>
#include <sys/types.h>
@@ -124,6 +127,14 @@
}
static void
+smclient_quit (EggSMClient *smclient, gpointer data)
+{
+ daemon_quit = TRUE;
+ if (daemon_running)
+ gtk_main_quit ();
+}
+
+static void
log_handler (const gchar *log_domain, GLogLevelFlags log_level,
const gchar *message, gpointer user_data)
{
@@ -191,6 +202,7 @@
octx = g_option_context_new ("");
g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
+ g_option_context_add_group (octx, egg_sm_client_get_option_group ());
if (!gtk_init_with_args (&argc, &argv, _("Encryption Daemon (Seahorse)"),
(GOptionEntry *)options, GETTEXT_PACKAGE, &error)) {
@@ -198,11 +210,13 @@
g_error_free (error);
exit (1);
}
-
-
- /*
- * All functions after this point have to print messages
- * nicely and not just called exit()
+
+ g_signal_connect (egg_sm_client_get (), "quit", G_CALLBACK (smclient_quit), NULL);
+ egg_set_desktop_file(AUTOSTARTDIR "/seahorse-daemon.desktop");
+
+ /*
+ * All functions after this point have to print messages
+ * nicely and not just called exit()
*/
daemonize ();
@@ -212,15 +226,15 @@
/* Force gconf to reconnect after daemonizing */
if (!daemon_no_daemonize)
- seahorse_gconf_disconnect ();
-
+ seahorse_gconf_disconnect ();
+
/* We log to the syslog */
prepare_logging ();
/* Insert Icons into Stock */
seahorse_gtkstock_init ();
- seahorse_gtkstock_add_icons (daemon_icons);
-
+ seahorse_gtkstock_add_icons (daemon_icons);
+
/* Make the default SeahorseContext */
seahorse_context_new (SEAHORSE_CONTEXT_APP | SEAHORSE_CONTEXT_DAEMON);
@@ -255,6 +269,7 @@
seahorse_dbus_server_cleanup ();
+ g_option_context_free (octx);
seahorse_context_destroy (SCTX_APP ());
seahorse_cleanup_perform ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]