[gnome-flashback] libstatus-notifier: fix scroll method
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] libstatus-notifier: fix scroll method
- Date: Sat, 5 Nov 2016 21:31:05 +0000 (UTC)
commit fa42cabb3c054ec8646b961f3ef4d0f2c197fc2b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Nov 5 23:27:12 2016 +0200
libstatus-notifier: fix scroll method
libstatus-notifier/sn-dbus-item-server-v0.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libstatus-notifier/sn-dbus-item-server-v0.c b/libstatus-notifier/sn-dbus-item-server-v0.c
index 307c177..24455f8 100644
--- a/libstatus-notifier/sn-dbus-item-server-v0.c
+++ b/libstatus-notifier/sn-dbus-item-server-v0.c
@@ -92,23 +92,23 @@ static gboolean
handle_scroll (SnItemV0Gen *item_v0_gen,
GDBusMethodInvocation *invocation,
gint delta,
- SnItemOrientation orientation,
+ const gchar *orientation,
SnDBusItemServerV0 *server_v0)
{
- switch (orientation)
- {
- case SN_ITEM_ORIENTATION_VERTICAL:
- case SN_ITEM_ORIENTATION_HORIZONTAL:
- break;
+ SnItemOrientation scroll_orientation;
- default:
- orientation = SN_ITEM_ORIENTATION_HORIZONTAL;
- break;
- }
+ scroll_orientation = SN_ITEM_ORIENTATION_HORIZONTAL;
+
+ if (g_strcmp0 (orientation, "Vertical") == 0)
+ scroll_orientation = SN_ITEM_ORIENTATION_VERTICAL;
+ else if (g_strcmp0 (orientation, "Horizontal") == 0)
+ scroll_orientation = SN_ITEM_ORIENTATION_HORIZONTAL;
+ else
+ g_warning ("Unknown scroll orientation: %s", orientation);
sn_item_v0_gen_complete_scroll (item_v0_gen, invocation);
sn_dbus_item_server_emit_scroll (SN_DBUS_ITEM_SERVER (server_v0),
- delta, orientation);
+ delta, scroll_orientation);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]