[gnome-mag/bonobo-less: 6/6] Fix getRoi call. Skeleton for setActive (not working yet)
- From: Fernando Herrera de las Heras <fherrera src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mag/bonobo-less: 6/6] Fix getRoi call. Skeleton for setActive (not working yet)
- Date: Mon, 5 Jul 2010 13:26:27 +0000 (UTC)
commit cbe2c47c128f76d96fc93ee6f8321f5e395c626c
Author: Fernando Herrera <fherrera onirica com>
Date: Mon Jul 5 15:16:10 2010 +0200
Fix getRoi call. Skeleton for setActive (not working yet)
magnifier/magnifier.c | 8 ++++++++
magnifier/zoom-region.c | 4 +++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/magnifier/magnifier.c b/magnifier/magnifier.c
index 8d08cff..13a9137 100644
--- a/magnifier/magnifier.c
+++ b/magnifier/magnifier.c
@@ -816,6 +816,11 @@ method_call_cb (GDBusConnection *connection,
}
g_dbus_method_invocation_return_value (invocation,
g_variant_new ("(b)", retval));
+ } else if (g_strcmp0 (method_name, "setActive") == 0) {
+ gboolean active;
+ g_variant_get (parameters, "(b)", &active);
+ // FIXME: Empty!
+ g_dbus_method_invocation_return_value (invocation, NULL);
} else if (g_strcmp0 (method_name, "fullScreenCapable") == 0) {
gboolean retval = FALSE;
@@ -1111,6 +1116,9 @@ static const gchar introspection_xml[] =
"<method name='isActive'>"
"<arg type='b' name='b-ret' direction='out'/>"
"</method>"
+ "<method name='setActive'>"
+ "<arg type='b' name='active' direction='in'/>"
+ "</method>"
"<method name='fullScreenCapable'>"
"<arg type='b' name='b-ret' direction='out'/>"
"</method>"
diff --git a/magnifier/zoom-region.c b/magnifier/zoom-region.c
index c21805d..832cb2c 100644
--- a/magnifier/zoom-region.c
+++ b/magnifier/zoom-region.c
@@ -2640,13 +2640,15 @@ method_call_cb (GDBusConnection *connection,
g_dbus_method_invocation_return_value (invocation, NULL);
} else if (g_strcmp0 (method_name, "getRoi") == 0) {
GVariant *children[4];
+ GVariant *array;
children[0] = g_variant_new_int32 (zoom_region->roi.x1);
children[1] = g_variant_new_int32 (zoom_region->roi.y1);
children[2] = g_variant_new_int32 (zoom_region->roi.x2);
children[3] = g_variant_new_int32 (zoom_region->roi.y2);
+ array = g_variant_new_array (G_VARIANT_TYPE_INT32, children, 4);
g_dbus_method_invocation_return_value (invocation,
- g_variant_new_array (G_VARIANT_TYPE_INT32, children, 4));
+ g_variant_new_tuple (&array, 1));
} else if (g_strcmp0 (method_name, "moveResize") == 0) {
RectBounds viewport;
GVariant *viewport_v;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]