Merge lp:~miki-tebeka/gwibber/space into lp:gwibber

Proposed by tebeka
Status: Rejected
Rejected by: Robert Bruce Park
Proposed branch: lp:~miki-tebeka/gwibber/space
Merge into: lp:gwibber
Diff against target: 54 lines (+16/-17)
2 files modified
gwibber/gwui.py (+15/-17)
libgwibber-gtk/stream-view.vala (+1/-0)
To merge this branch: bzr merge lp:~miki-tebeka/gwibber/space
Reviewer Review Type Date Requested Status
Robert Bruce Park Approve
Ken VanDine Needs Fixing
Review via email: mp+70686@code.launchpad.net

Description of the change

Allow "space" to be used for scrolling down. This is what most web browsers do when you hit "space".

To post a comment you must log in.
lp:~miki-tebeka/gwibber/space updated
1105. By tebeka

None is the default for get

Revision history for this message
Ken VanDine (ken-vandine) wrote :

gwui.py is no longer used in the client. Scrolling is in libgwibber-gtk/stream-view.vala

Thanks!

review: Needs Fixing
lp:~miki-tebeka/gwibber/space updated
1106. By tebeka

Use space to scroll down

Revision history for this message
tebeka (miki-tebeka) wrote :

OK, updated the branch.

On Sun, Aug 7, 2011 at 4:31 PM, Ken VanDine <email address hidden> wrote:
> Review: Needs Fixing
> gwui.py is no longer used in the client.  Scrolling is in libgwibber-gtk/stream-view.vala
>
> Thanks!
> --
> https://code.launchpad.net/~miki-tebeka/gwibber/space/+merge/70686
> You are the owner of lp:~miki-tebeka/gwibber/space.
>

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I noticed the key for Space is actually 0x0020, however in testing that I remembered that space is used to activate a widget. So if one of the buttons in the button bar has focus, pressing space will act like a click on that widget. I need to talk to an accessibility expert to see what implications there would be with using Space as a Page_Down, and forcing the StreamView to grab_focus.

Revision history for this message
Robert Bruce Park (robru) wrote :

Thanks for taking the time to submit this patch, AND thanks even more for taking the time to port this patch to the new codebase after we replaced the Python UI code with Vala UI code.

Unfortunately, we have replaced the Vala UI code with Qml UI code, and your patch no longer applies.

HOWEVER, I will not ask you to port your patch to the new codebase, because I did that already for you. I've also submitted a new merge proposal for it on your behalf, which you can find here:

https://code.launchpad.net/~robru/friends-app/spacebar-scrolling/+merge/156211

Thanks for your contribution to Gwibber!

review: Approve

Unmerged revisions

1106. By tebeka

Use space to scroll down

1105. By tebeka

None is the default for get

1104. By tebeka

Use space to scroll down

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gwibber/gwui.py'
2--- gwibber/gwui.py 2011-04-22 21:00:15 +0000
3+++ gwibber/gwui.py 2011-08-08 00:32:38 +0000
4@@ -683,23 +683,21 @@
5
6 def on_viewport_key(self, widget, event):
7 if not event.state & gtk.gdk.SHIFT_MASK: return
8- if 'Down' == gtk.gdk.keyval_name(event.keyval):
9- value = int(self.scrollbar.get_value()) + 1
10- self.scrollbar.set_value(value)
11- elif 'Page_Down' == gtk.gdk.keyval_name(event.keyval):
12- value = int(self.scrollbar.get_value()) + 3
13- self.scrollbar.set_value(value)
14- elif 'Up' == gtk.gdk.keyval_name(event.keyval):
15- value = int(self.scrollbar.get_value()) - 1
16- self.scrollbar.set_value(value)
17- elif 'Page_Up' == gtk.gdk.keyval_name(event.keyval):
18- value = int(self.scrollbar.get_value()) - 3
19- self.scrollbar.set_value(value)
20- elif 'Home' == gtk.gdk.keyval_name(event.keyval):
21- self.scrollbar.set_value(0)
22- elif 'End' == gtk.gdk.keyval_name(event.keyval):
23- self.scrollbar.set_value(100)
24-
25+ key_name = gtk.gdk.keyval_name(event.keyval)
26+ current = int(self.scrollbar.get_value())
27+ value = {
28+ 'Down' : current + 1,
29+ 'Page_Down' : current + 3,
30+ 'space' : current + 3,
31+ 'Up' : current - 1,
32+ 'Page_Up' : current - 3,
33+ 'Home' : 0,
34+ 'End' : 100,
35+ }.get(key_name)
36+
37+ if value is not None:
38+ self.scrollbar.set_value(value)
39+
40 def on_viewport_scroll(self, widget, event):
41 value = int(self.scrollbar.get_value())
42
43
44=== modified file 'libgwibber-gtk/stream-view.vala'
45--- libgwibber-gtk/stream-view.vala 2011-08-04 21:14:03 +0000
46+++ libgwibber-gtk/stream-view.vala 2011-08-08 00:32:38 +0000
47@@ -258,6 +258,7 @@
48 break;
49 case 0xff56: // *_Page_Down
50 case 0xff9b:
51+ case 0x14: // Space
52 position += tiles_visible;
53 break;
54 case 0xff54: // *_Down

Subscribers

People subscribed via source and target branches