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
=== modified file 'debian/changelog'
--- debian/changelog 2010-03-30 10:40:14 +0000
+++ debian/changelog 2010-04-09 22:12:27 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1gnome-panel (1:2.30.0-0ubuntu1) lucid; urgency=low2gnome-panel (1:2.30.0-0ubuntu1) lucid; urgency=low
23
3 * New upstream version4 * New upstream version
@@ -312,6 +313,17 @@
312 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 01 Sep 2009 10:47:58 +0200313 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 01 Sep 2009 10:47:58 +0200
313314
314gnome-panel (1:2.27.91-0ubuntu1) karmic; urgency=low315gnome-panel (1:2.27.91-0ubuntu1) karmic; urgency=low
316=======
317gnome-panel (1:2.27.91-0ubuntu2) karmic; urgency=low
318
319 * debian/patches/29_make_scrolling_work_with_viewports.patch:
320 - change workspace switcher applet to change viewports with
321 the mousewhell just like with virual desktops
322
323 -- Travis Watkins <amaranth@ubuntu.com> Thu, 27 Aug 2009 11:25:20 -0500
324
325gnome-panel (1:2.27.91-0ubuntu1) UNRELEASED; urgency=low
326>>>>>>> MERGE-SOURCE
315327
316 * New upstream release (LP: #418975)328 * New upstream release (LP: #418975)
317 Panel329 Panel
318330
=== added file 'debian/patches/29_make_scrolling_work_with_viewports.patch'
--- debian/patches/29_make_scrolling_work_with_viewports.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/29_make_scrolling_work_with_viewports.patch 2010-04-09 22:12:27 +0000
@@ -0,0 +1,192 @@
1--- gnome-panel-2.21.92/applets/wncklet/workspace-switcher.c 2008-02-26 07:17:48.000000000 -0600
2+++ gnome-panel-2.21.92.new/applets/wncklet/workspace-switcher.c 2008-03-06 10:29:32.000000000 -0600
3@@ -242,21 +242,15 @@
4 PagerData *pager)
5 {
6 GdkScrollDirection absolute_direction;
7- int index;
8- int n_workspaces;
9- int n_columns;
10- int in_last_row;
11+ gboolean viewport_mode;
12
13 if (event->type != GDK_SCROLL)
14 return FALSE;
15
16- index = wnck_workspace_get_number (wnck_screen_get_active_workspace (pager->screen));
17- n_workspaces = wnck_screen_get_workspace_count (pager->screen);
18- n_columns = n_workspaces / pager->n_rows;
19- if (n_workspaces % pager->n_rows != 0)
20- n_columns++;
21- in_last_row = n_workspaces % n_columns;
22-
23+ viewport_mode = wnck_screen_get_workspace_count (pager->screen) == 1 &&
24+ wnck_workspace_is_virtual (wnck_screen_get_workspace (pager->screen,
25+ 0));
26+
27 absolute_direction = event->direction;
28 if (gtk_widget_get_direction (GTK_WIDGET (applet)) == GTK_TEXT_DIR_RTL) {
29 switch (event->direction) {
30@@ -272,44 +266,130 @@
31 }
32 }
33
34- switch (absolute_direction) {
35- case GDK_SCROLL_DOWN:
36- if (index + n_columns < n_workspaces)
37- index += n_columns;
38- else if ((index < n_workspaces - 1
39- && index + in_last_row != n_workspaces - 1) ||
40- (index == n_workspaces - 1
41- && in_last_row != 0))
42- index = (index % n_columns) + 1;
43- break;
44+ if (!viewport_mode) {
45+ int index;
46+ int n_workspaces;
47+ int n_columns;
48+ int in_last_row;
49+
50+ index = wnck_workspace_get_number (wnck_screen_get_active_workspace (pager->screen));
51+ n_workspaces = wnck_screen_get_workspace_count (pager->screen);
52+ n_columns = n_workspaces / pager->n_rows;
53+ if (n_workspaces % pager->n_rows != 0)
54+ n_columns++;
55+ in_last_row = n_workspaces % n_columns;
56+
57+ switch (absolute_direction) {
58+ case GDK_SCROLL_DOWN:
59+ if (index + n_columns < n_workspaces)
60+ index += n_columns;
61+ else if ((index < n_workspaces - 1
62+ && index + in_last_row != n_workspaces - 1) ||
63+ (index == n_workspaces - 1
64+ && in_last_row != 0))
65+ index = (index % n_columns) + 1;
66+ break;
67
68- case GDK_SCROLL_RIGHT:
69- if (index < n_workspaces - 1)
70- index++;
71- break;
72+ case GDK_SCROLL_RIGHT:
73+ if (index < n_workspaces - 1)
74+ index++;
75+ break;
76
77- case GDK_SCROLL_UP:
78- if (index - n_columns >= 0)
79- index -= n_columns;
80- else if (index > 0)
81- index = ((pager->n_rows - 1) * n_columns) + (index % n_columns) - 1;
82- if (index >= n_workspaces)
83+ case GDK_SCROLL_UP:
84+ if (index - n_columns >= 0)
85 index -= n_columns;
86- break;
87+ else if (index > 0)
88+ index = ((pager->n_rows - 1) * n_columns) + (index % n_columns) - 1;
89+ if (index >= n_workspaces)
90+ index -= n_columns;
91+ break;
92
93- case GDK_SCROLL_LEFT:
94- if (index > 0)
95- index--;
96- break;
97- default:
98- g_assert_not_reached ();
99- break;
100+ case GDK_SCROLL_LEFT:
101+ if (index > 0)
102+ index--;
103+ break;
104+ default:
105+ g_assert_not_reached ();
106+ break;
107+ }
108+
109+ wnck_workspace_activate (wnck_screen_get_workspace (pager->screen,
110+ index),
111+ event->time);
112+ }
113+ else {
114+ int viewport_x, viewport_y;
115+ int viewport_width, viewport_height;
116+ int screen_width, screen_height;
117+ int n_columns, n_rows;
118+ gboolean in_last_row, in_last_col;
119+ WnckWorkspace *workspace;
120+
121+ workspace = wnck_screen_get_workspace (pager->screen, 0);
122+
123+ viewport_x = wnck_workspace_get_viewport_x (workspace);
124+ viewport_y = wnck_workspace_get_viewport_y (workspace);
125+
126+ viewport_width = wnck_workspace_get_width (workspace);
127+ viewport_height = wnck_workspace_get_height (workspace);
128+
129+ screen_width = wnck_screen_get_width (pager->screen);
130+ screen_height = wnck_screen_get_height (pager->screen);
131+
132+ n_columns = viewport_width / screen_width;
133+ n_rows = viewport_height / screen_height;
134+ in_last_row = viewport_y == viewport_height - screen_height;
135+ in_last_col = viewport_x == viewport_width - screen_width;
136+
137+ switch (absolute_direction) {
138+ case GDK_SCROLL_DOWN:
139+ if (in_last_col) {
140+ if (in_last_row)
141+ break;
142+ else
143+ viewport_y += screen_height;
144+ viewport_x = 0;
145+ }
146+ else {
147+ viewport_x += screen_width;
148+ }
149+ break;
150+
151+ case GDK_SCROLL_RIGHT:
152+ if (viewport_y == 0)
153+ viewport_y = viewport_height - screen_height;
154+ else
155+ viewport_y -= screen_height;
156+ break;
157+
158+ case GDK_SCROLL_UP:
159+ if (viewport_x == 0)
160+ {
161+ if (viewport_y == 0)
162+ break;
163+ else
164+ viewport_y -= screen_height;
165+ viewport_x = viewport_width - screen_width;
166+ }
167+ else {
168+ viewport_x -= screen_width;
169+ }
170+ break;
171+
172+ case GDK_SCROLL_LEFT:
173+ if (in_last_row)
174+ viewport_y = 0;
175+ else
176+ viewport_y += screen_height;
177+ break;
178+ default:
179+ g_assert_not_reached ();
180+ break;
181+ }
182+
183+ wnck_screen_move_viewport (pager->screen, viewport_x, viewport_y);
184 }
185
186- wnck_workspace_activate (wnck_screen_get_workspace (pager->screen,
187- index),
188- event->time);
189-
190 return TRUE;
191 }
192
0193
=== modified file 'debian/patches/series'
--- debian/patches/series 2010-03-19 14:21:16 +0000
+++ debian/patches/series 2010-04-09 22:12:27 +0000
@@ -9,7 +9,14 @@
918_lockdown_lock_editor.patch918_lockdown_lock_editor.patch
1020_fusa_migration_note_i18n.patch1020_fusa_migration_note_i18n.patch
1125_inode_directory_fixup.patch1125_inode_directory_fixup.patch
12<<<<<<< TREE
1225_dynamic_fusa_detection.patch1325_dynamic_fusa_detection.patch
14=======
15#25_dynamic_fusa_detection.patch
16#27_handle_overlapping_monitors.patch
17#28_prefer_lvds_monitor.patch
1829_make_scrolling_work_with_viewports.patch
19>>>>>>> MERGE-SOURCE
1330_disable-initial-animation.patch2030_disable-initial-animation.patch
1470_relibtoolize.patch2170_relibtoolize.patch
1571_change_bookmark_submenu_limit_value.patch2271_change_bookmark_submenu_limit_value.patch

Subscribers

People subscribed via source and target branches

to all changes: