Merge lp:~amaranth/gnome-panel/scroll_with_viewports into lp:~ubuntu-desktop/gnome-panel/ubuntu

Proposed by Travis Watkins
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~amaranth/gnome-panel/scroll_with_viewports
Merge into: lp:~ubuntu-desktop/gnome-panel/ubuntu
Diff against target: 242 lines (+211/-0) (has conflicts)
3 files modified
debian/changelog (+12/-0)
debian/patches/29_make_scrolling_work_with_viewports.patch (+192/-0)
debian/patches/series (+7/-0)
Text conflict in debian/changelog
Text conflict in debian/patches/series
To merge this branch: bzr merge lp:~amaranth/gnome-panel/scroll_with_viewports
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Fixing
Michael Vogt Pending
Review via email: mp+10803@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your work, that merge request has conflicts though and would need to be updated, setting to needs fixing so it gets out of the reviews list

review: Needs Fixing

Unmerged revisions

22. By Travis Watkins

* debian/patches/29_make_scrolling_work_with_viewports.patch:
  - change workspace switcher applet to change viewports with
    the mousewhell just like with virual desktops

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-03-30 10:40:14 +0000
3+++ debian/changelog 2010-04-09 22:12:27 +0000
4@@ -1,3 +1,4 @@
5+<<<<<<< TREE
6 gnome-panel (1:2.30.0-0ubuntu1) lucid; urgency=low
7
8 * New upstream version
9@@ -312,6 +313,17 @@
10 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 01 Sep 2009 10:47:58 +0200
11
12 gnome-panel (1:2.27.91-0ubuntu1) karmic; urgency=low
13+=======
14+gnome-panel (1:2.27.91-0ubuntu2) karmic; urgency=low
15+
16+ * debian/patches/29_make_scrolling_work_with_viewports.patch:
17+ - change workspace switcher applet to change viewports with
18+ the mousewhell just like with virual desktops
19+
20+ -- Travis Watkins <amaranth@ubuntu.com> Thu, 27 Aug 2009 11:25:20 -0500
21+
22+gnome-panel (1:2.27.91-0ubuntu1) UNRELEASED; urgency=low
23+>>>>>>> MERGE-SOURCE
24
25 * New upstream release (LP: #418975)
26 Panel
27
28=== added file 'debian/patches/29_make_scrolling_work_with_viewports.patch'
29--- debian/patches/29_make_scrolling_work_with_viewports.patch 1970-01-01 00:00:00 +0000
30+++ debian/patches/29_make_scrolling_work_with_viewports.patch 2010-04-09 22:12:27 +0000
31@@ -0,0 +1,192 @@
32+--- gnome-panel-2.21.92/applets/wncklet/workspace-switcher.c 2008-02-26 07:17:48.000000000 -0600
33++++ gnome-panel-2.21.92.new/applets/wncklet/workspace-switcher.c 2008-03-06 10:29:32.000000000 -0600
34+@@ -242,21 +242,15 @@
35+ PagerData *pager)
36+ {
37+ GdkScrollDirection absolute_direction;
38+- int index;
39+- int n_workspaces;
40+- int n_columns;
41+- int in_last_row;
42++ gboolean viewport_mode;
43+
44+ if (event->type != GDK_SCROLL)
45+ return FALSE;
46+
47+- index = wnck_workspace_get_number (wnck_screen_get_active_workspace (pager->screen));
48+- n_workspaces = wnck_screen_get_workspace_count (pager->screen);
49+- n_columns = n_workspaces / pager->n_rows;
50+- if (n_workspaces % pager->n_rows != 0)
51+- n_columns++;
52+- in_last_row = n_workspaces % n_columns;
53+-
54++ viewport_mode = wnck_screen_get_workspace_count (pager->screen) == 1 &&
55++ wnck_workspace_is_virtual (wnck_screen_get_workspace (pager->screen,
56++ 0));
57++
58+ absolute_direction = event->direction;
59+ if (gtk_widget_get_direction (GTK_WIDGET (applet)) == GTK_TEXT_DIR_RTL) {
60+ switch (event->direction) {
61+@@ -272,44 +266,130 @@
62+ }
63+ }
64+
65+- switch (absolute_direction) {
66+- case GDK_SCROLL_DOWN:
67+- if (index + n_columns < n_workspaces)
68+- index += n_columns;
69+- else if ((index < n_workspaces - 1
70+- && index + in_last_row != n_workspaces - 1) ||
71+- (index == n_workspaces - 1
72+- && in_last_row != 0))
73+- index = (index % n_columns) + 1;
74+- break;
75++ if (!viewport_mode) {
76++ int index;
77++ int n_workspaces;
78++ int n_columns;
79++ int in_last_row;
80++
81++ index = wnck_workspace_get_number (wnck_screen_get_active_workspace (pager->screen));
82++ n_workspaces = wnck_screen_get_workspace_count (pager->screen);
83++ n_columns = n_workspaces / pager->n_rows;
84++ if (n_workspaces % pager->n_rows != 0)
85++ n_columns++;
86++ in_last_row = n_workspaces % n_columns;
87++
88++ switch (absolute_direction) {
89++ case GDK_SCROLL_DOWN:
90++ if (index + n_columns < n_workspaces)
91++ index += n_columns;
92++ else if ((index < n_workspaces - 1
93++ && index + in_last_row != n_workspaces - 1) ||
94++ (index == n_workspaces - 1
95++ && in_last_row != 0))
96++ index = (index % n_columns) + 1;
97++ break;
98+
99+- case GDK_SCROLL_RIGHT:
100+- if (index < n_workspaces - 1)
101+- index++;
102+- break;
103++ case GDK_SCROLL_RIGHT:
104++ if (index < n_workspaces - 1)
105++ index++;
106++ break;
107+
108+- case GDK_SCROLL_UP:
109+- if (index - n_columns >= 0)
110+- index -= n_columns;
111+- else if (index > 0)
112+- index = ((pager->n_rows - 1) * n_columns) + (index % n_columns) - 1;
113+- if (index >= n_workspaces)
114++ case GDK_SCROLL_UP:
115++ if (index - n_columns >= 0)
116+ index -= n_columns;
117+- break;
118++ else if (index > 0)
119++ index = ((pager->n_rows - 1) * n_columns) + (index % n_columns) - 1;
120++ if (index >= n_workspaces)
121++ index -= n_columns;
122++ break;
123+
124+- case GDK_SCROLL_LEFT:
125+- if (index > 0)
126+- index--;
127+- break;
128+- default:
129+- g_assert_not_reached ();
130+- break;
131++ case GDK_SCROLL_LEFT:
132++ if (index > 0)
133++ index--;
134++ break;
135++ default:
136++ g_assert_not_reached ();
137++ break;
138++ }
139++
140++ wnck_workspace_activate (wnck_screen_get_workspace (pager->screen,
141++ index),
142++ event->time);
143++ }
144++ else {
145++ int viewport_x, viewport_y;
146++ int viewport_width, viewport_height;
147++ int screen_width, screen_height;
148++ int n_columns, n_rows;
149++ gboolean in_last_row, in_last_col;
150++ WnckWorkspace *workspace;
151++
152++ workspace = wnck_screen_get_workspace (pager->screen, 0);
153++
154++ viewport_x = wnck_workspace_get_viewport_x (workspace);
155++ viewport_y = wnck_workspace_get_viewport_y (workspace);
156++
157++ viewport_width = wnck_workspace_get_width (workspace);
158++ viewport_height = wnck_workspace_get_height (workspace);
159++
160++ screen_width = wnck_screen_get_width (pager->screen);
161++ screen_height = wnck_screen_get_height (pager->screen);
162++
163++ n_columns = viewport_width / screen_width;
164++ n_rows = viewport_height / screen_height;
165++ in_last_row = viewport_y == viewport_height - screen_height;
166++ in_last_col = viewport_x == viewport_width - screen_width;
167++
168++ switch (absolute_direction) {
169++ case GDK_SCROLL_DOWN:
170++ if (in_last_col) {
171++ if (in_last_row)
172++ break;
173++ else
174++ viewport_y += screen_height;
175++ viewport_x = 0;
176++ }
177++ else {
178++ viewport_x += screen_width;
179++ }
180++ break;
181++
182++ case GDK_SCROLL_RIGHT:
183++ if (viewport_y == 0)
184++ viewport_y = viewport_height - screen_height;
185++ else
186++ viewport_y -= screen_height;
187++ break;
188++
189++ case GDK_SCROLL_UP:
190++ if (viewport_x == 0)
191++ {
192++ if (viewport_y == 0)
193++ break;
194++ else
195++ viewport_y -= screen_height;
196++ viewport_x = viewport_width - screen_width;
197++ }
198++ else {
199++ viewport_x -= screen_width;
200++ }
201++ break;
202++
203++ case GDK_SCROLL_LEFT:
204++ if (in_last_row)
205++ viewport_y = 0;
206++ else
207++ viewport_y += screen_height;
208++ break;
209++ default:
210++ g_assert_not_reached ();
211++ break;
212++ }
213++
214++ wnck_screen_move_viewport (pager->screen, viewport_x, viewport_y);
215+ }
216+
217+- wnck_workspace_activate (wnck_screen_get_workspace (pager->screen,
218+- index),
219+- event->time);
220+-
221+ return TRUE;
222+ }
223+
224
225=== modified file 'debian/patches/series'
226--- debian/patches/series 2010-03-19 14:21:16 +0000
227+++ debian/patches/series 2010-04-09 22:12:27 +0000
228@@ -9,7 +9,14 @@
229 18_lockdown_lock_editor.patch
230 20_fusa_migration_note_i18n.patch
231 25_inode_directory_fixup.patch
232+<<<<<<< TREE
233 25_dynamic_fusa_detection.patch
234+=======
235+#25_dynamic_fusa_detection.patch
236+#27_handle_overlapping_monitors.patch
237+#28_prefer_lvds_monitor.patch
238+29_make_scrolling_work_with_viewports.patch
239+>>>>>>> MERGE-SOURCE
240 30_disable-initial-animation.patch
241 70_relibtoolize.patch
242 71_change_bookmark_submenu_limit_value.patch

Subscribers

People subscribed via source and target branches

to all changes: