[nautilus/freedesktop-dbus: 4/9] Pass the NautilusApplication to the freedesktop DBus manager
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/freedesktop-dbus: 4/9] Pass the NautilusApplication to the freedesktop DBus manager
- Date: Tue, 6 Dec 2011 23:48:10 +0000 (UTC)
commit e1a2bcecf4d4dea845194c943f82c60f8c6c6d36
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 6 14:56:31 2011 -0600
Pass the NautilusApplication to the freedesktop DBus manager
Signed-off-by: Federico Mena Quintero <federico gnome org>
src/nautilus-freedesktop-dbus.c | 8 +++++++-
src/nautilus-freedesktop-dbus.h | 4 +++-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
index 29418eb..087350f 100644
--- a/src/nautilus-freedesktop-dbus.c
+++ b/src/nautilus-freedesktop-dbus.c
@@ -31,6 +31,9 @@
#include "gio/gio.h"
+/* Parent application */
+static NautilusApplication *application;
+
/* Id from g_dbus_own_name() */
static guint owner_id;
@@ -76,7 +79,7 @@ name_lost_cb (GDBusConnection *connection,
/* Tries to own the org.freedesktop.FileManager1 service name */
void
-nautilus_freedesktop_dbus_start (void)
+nautilus_freedesktop_dbus_start (NautilusApplication *app)
{
if (owner_id != 0)
return;
@@ -89,6 +92,8 @@ nautilus_freedesktop_dbus_start (void)
name_lost_cb,
NULL,
NULL);
+
+ application = app;
}
/* Releases the org.freedesktop.FileManager1 service name */
@@ -112,4 +117,5 @@ nautilus_freedesktop_dbus_stop (void)
}
g_clear_object (&connection);
+ application = NULL;
}
diff --git a/src/nautilus-freedesktop-dbus.h b/src/nautilus-freedesktop-dbus.h
index 3fb5005..2437286 100644
--- a/src/nautilus-freedesktop-dbus.h
+++ b/src/nautilus-freedesktop-dbus.h
@@ -23,7 +23,9 @@
#ifndef __NAUTILUS_FREEDESKTOP_DBUS_H__
#define __NAUTILUS_FREEDESKTOP_DBUS_H__
-void nautilus_freedesktop_dbus_start (void);
+#include "nautilus-application.h"
+
+void nautilus_freedesktop_dbus_start (NautilusApplication *app);
void nautilus_freedesktop_dbus_stop (void);
#endif /* __NAUTILUS_FREEDESKTOP_DBUS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]