aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2011-01-29 03:26:08 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2011-01-29 03:26:08 +0100
commitdf3e14484ca574da270a2e7d38a82e25e6b86ca1 (patch)
tree269c8f4dd01bf3cd6a9195d9aec318639e825648 /src/application-service-appstore.c
parent016feb948f488012ec87a2ac9036f041b1e81f94 (diff)
downloadayatana-indicator-application-df3e14484ca574da270a2e7d38a82e25e6b86ca1.tar.gz
ayatana-indicator-application-df3e14484ca574da270a2e7d38a82e25e6b86ca1.tar.bz2
ayatana-indicator-application-df3e14484ca574da270a2e7d38a82e25e6b86ca1.zip
Using the SNI method "Scroll" instead of "XAyatanaScrollAction"
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index abe0089..e6169a0 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -260,10 +260,11 @@ bus_method_call (GDBusConnection * connection, const gchar * sender,
if (g_strcmp0(method, "GetApplications") == 0) {
retval = get_applications(service);
- } else if (g_strcmp0(method, "ApplicationScrollSignal") == 0) {
+ } else if (g_strcmp0(method, "ApplicationScrollEvent") == 0) {
Application *app = NULL;
const gchar *dbusaddress;
const gchar *dbusobject;
+ gchar *orientation = NULL;
gint delta;
guint direction;
@@ -281,9 +282,22 @@ bus_method_call (GDBusConnection * connection, const gchar * sender,
}
}
- if (app != NULL && app->dbus_proxy != NULL) {
- g_dbus_proxy_call(app->dbus_proxy, "XAyatanaScrollAction",
- g_variant_new("(iu)", delta, direction),
+ switch (direction) {
+ case GDK_SCROLL_UP:
+ delta = -delta;
+ case GDK_SCROLL_DOWN:
+ orientation = "vertical";
+ break;
+
+ case GDK_SCROLL_LEFT:
+ delta = -delta;
+ case GDK_SCROLL_RIGHT:
+ orientation = "horizontal";
+ }
+
+ if (app != NULL && app->dbus_proxy != NULL && orientation != NULL) {
+ g_dbus_proxy_call(app->dbus_proxy, "Scroll",
+ g_variant_new("(is)", delta, orientation),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL);
}
} else {