Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2010-05-10 12:16:11 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-05-25 07:38:30 (GMT)
commit3afaa8ad7c4f63b67e0caa4c0bfc3b832de8e351 (patch)
treea5c36b194a5b2cea7d887e2c021fa572de925247 /shell
parent3eb988973d60bcfc1eb15752ff61f248775701f5 (diff)
[daemon] Fix RegisterDocument
Was returning the wrong type. Also use g_set_prgname() in main().
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-daemon.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index 315636a..9aed23e 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -246,15 +246,11 @@ method_call_cb (GDBusConnection *connection,
if (g_strcmp0 (method_name, "RegisterDocument") == 0) {
EvDoc *doc;
const gchar *uri;
- const gchar *owner = NULL;
g_variant_get (parameters, "(&s)", &uri);
doc = ev_daemon_find_doc (uri);
- if (doc) {
- /* Already registered */
- owner = doc->dbus_name;
- } else {
+ if (doc == NULL) {
ev_daemon_stop_killtimer ();
doc = g_new (EvDoc, 1);
@@ -272,7 +268,7 @@ method_call_cb (GDBusConnection *connection,
}
g_dbus_method_invocation_return_value (invocation,
- g_variant_new_string (owner));
+ g_variant_new ("(s)", doc->dbus_name));
return;
} else if (g_strcmp0 (method_name, "UnregisterDocument") == 0) {
@@ -357,6 +353,8 @@ main (gint argc, gchar **argv)
guint registration_id, owner_id;
GDBusNodeInfo *introspection_data;
+ g_set_prgname ("evince-daemon");
+
g_type_init ();
connection = g_bus_get_sync (G_BUS_TYPE_STARTER, NULL, &error);