Merge lp:~3v1n0/unity/indicator-scroll-nux-sync into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 1317
Proposed branch: lp:~3v1n0/unity/indicator-scroll-nux-sync
Merge into: lp:unity
Prerequisite: lp:~3v1n0/unity/secondary-activate-support
Diff against target: 25 lines (+3/-1)
2 files modified
plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp (+2/-0)
services/panel-service.c (+1/-1)
To merge this branch: bzr merge lp:~3v1n0/unity/indicator-scroll-nux-sync
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+68847@code.launchpad.net

Commit message

Scrolling in the indicators: sync with latest Nux changes

A nux area needs SetAcceptMouseWheelEvent(true) to get the
mouse wheel events.

Plus, the nux delta value now is less than 0 when down, and greater
when it's up. Updading the panel service.

Description of the change

Recent Nux changes cause the scroll event over the indicators not to work anymore. This branch fixes it.

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

:)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp'
2--- plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp 2011-07-22 14:09:55 +0000
3+++ plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp 2011-07-22 14:09:55 +0000
4@@ -66,6 +66,8 @@
5
6 InputArea::OnMouseDown.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::OnMouseDown));
7 InputArea::OnMouseUp.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::OnMouseUp));
8+
9+ InputArea::SetAcceptMouseWheelEvent(true);
10 InputArea::OnMouseWheel.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::OnMouseWheel));
11
12 on_panelstyle_changed_connection_ = PanelStyle::GetDefault()->changed.connect(sigc::mem_fun(this, &PanelIndicatorObjectEntryView::Refresh));
13
14=== modified file 'services/panel-service.c'
15--- services/panel-service.c 2011-07-22 14:09:55 +0000
16+++ services/panel-service.c 2011-07-22 14:09:55 +0000
17@@ -1179,7 +1179,7 @@
18 PanelServicePrivate *priv = self->priv;
19 IndicatorObjectEntry *entry = g_hash_table_lookup (priv->id2entry_hash, entry_id);
20 IndicatorObject *object = g_hash_table_lookup (priv->entry2indicator_hash, entry);
21- GdkScrollDirection direction = delta > 0 ? GDK_SCROLL_DOWN : GDK_SCROLL_UP;
22+ GdkScrollDirection direction = delta < 0 ? GDK_SCROLL_DOWN : GDK_SCROLL_UP;
23
24 g_signal_emit_by_name(object, INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED, entry,
25 abs(delta/120), direction);