[gnome-settings-daemon/docking-stations] Split out function to handle method calls from the XRANDR_2 interface
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/docking-stations] Split out function to handle method calls from the XRANDR_2 interface
- Date: Tue, 22 Nov 2011 23:24:37 +0000 (UTC)
commit f065b60ffbe4bfeead8c358d23182ce0776c0e29
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Nov 22 10:10:52 2011 -0600
Split out function to handle method calls from the XRANDR_2 interface
We'll add a new, internal interface, so let's handle each iface's methods
in a separate function.
Signed-off-by: Federico Mena Quintero <federico gnome org>
plugins/xrandr/gsd-xrandr-manager.c | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index b0cf2b8..8a2aa4d 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -2118,20 +2118,15 @@ gsd_xrandr_manager_finalize (GObject *object)
}
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
- GDBusMethodInvocation *invocation,
- gpointer user_data)
+handle_method_call_xrandr_2 (GsdXrandrManager *manager,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation)
{
- GsdXrandrManager *manager = (GsdXrandrManager *) user_data;
gint64 timestamp;
GError *error = NULL;
- g_debug ("Calling method '%s' for XRandR", method_name);
+ g_debug ("Calling method '%s' for org.gnome.SettingsDaemon.XRANDR_2", method_name);
if (g_strcmp0 (method_name, "ApplyConfiguration") == 0) {
gint64 parent_window_id;
@@ -2159,6 +2154,26 @@ handle_method_call (GDBusConnection *connection,
}
}
+static void
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ GsdXrandrManager *manager = (GsdXrandrManager *) user_data;
+
+ g_debug ("Handling method call %s.%s", interface_name, method_name);
+
+ if (g_strcmp0 (interface_name, "org.gnome.SettingsDaemon.XRANDR_2") == 0)
+ handle_method_call_xrandr_2 (manager, method_name, parameters, invocation);
+ else
+ g_warning ("unknown interface: %s", interface_name);
+}
+
static const GDBusInterfaceVTable interface_vtable =
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]