Commit 10a49879 authored by Stefan Walter's avatar Stefan Walter

Fix reading of gconf keys for daemons after forking. See bug #384781

    * agent/seahorse-agent-main.c:
    * daemon/seahorse-daemon.c:
    * libseahorse/seahorse-gconf.c:
    * libseahorse/seahorse-gconf.h: Fix reading of gconf keys for daemons
    after forking. See bug #384781
parent 008e185d
2006-12-11 Nate Nielsen <nielsen@memberwebs.com>
* agent/seahorse-agent-main.c:
* daemon/seahorse-daemon.c:
* libseahorse/seahorse-gconf.c:
* libseahorse/seahorse-gconf.h: Fix reading of gconf keys for daemons
after forking. See bug #384781
2006-12-11 Nate Nielsen <nielsen@memberwebs.com>
* agent/seahorse-agent-status.c:
......
......@@ -35,6 +35,7 @@
#include "config.h"
#include "seahorse-context.h"
#include "seahorse-gtkstock.h"
#include "seahorse-gconf.h"
#include "seahorse-agent.h"
#include "seahorse-secure-memory.h"
......@@ -235,7 +236,7 @@ int main(int argc, char* argv[])
program = gnome_program_init("seahorse-agent", VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_POPT_TABLE, options,
GNOME_PARAM_HUMAN_READABLE_NAME, _("Key Agent (Seahorse)"),
GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Key Agent (Seahorse)"),
GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
seahorse_agent_prefork ();
......@@ -261,6 +262,10 @@ int main(int argc, char* argv[])
/* Handle some signals */
signal (SIGINT, on_quit);
signal (SIGTERM, on_quit);
/* Force gconf to reconnect after daemonizing */
if (g_daemonize)
seahorse_gconf_disconnect ();
client = gnome_master_client();
g_signal_connect(client, "die", G_CALLBACK(client_die), NULL);
......
......@@ -35,6 +35,7 @@
#include "config.h"
#include "seahorse-daemon.h"
#include "seahorse-secure-memory.h"
#include "seahorse-gconf.h"
#include "seahorse-gtkstock.h"
#include "seahorse-context.h"
......@@ -235,7 +236,11 @@ int main(int argc, char* argv[])
/* Handle some signals */
signal (SIGINT, on_quit);
signal (SIGTERM, on_quit);
/* Force gconf to reconnect after daemonizing */
if (g_daemonize)
seahorse_gconf_disconnect ();
client = gnome_master_client();
g_signal_connect(client, "die", G_CALLBACK(client_die), NULL);
......
......@@ -61,7 +61,7 @@ get_global_client (void)
/* Initialize gconf if needed */
if (!gconf_is_initialized ()) {
char *argv[] = { "seahorse-preferences", NULL };
char *argv[] = { "seahorse", NULL };
if (!gconf_init (1, argv, &error)) {
if (handle_error (&error))
......@@ -87,6 +87,12 @@ get_global_client (void)
return global_gconf_client;
}
void
seahorse_gconf_disconnect ()
{
global_client_free ();
}
void
seahorse_gconf_set_boolean (const char *key, gboolean boolean_value)
{
......
......@@ -44,6 +44,8 @@
#define KEYSHARING_KEY SEAHORSE_SCHEMAS "/sharing/sharing_enabled"
void seahorse_gconf_disconnect ();
void seahorse_gconf_set_boolean (const char *key,
gboolean boolean_value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment