[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.1-7-g33dcbe3
Luca Bruno
lethalman88 at gmail.com
Mon Apr 13 20:48:41 UTC 2009
The following commit has been merged in the master branch:
commit 806bb697ea1d3379c182052cfa7227cc069e0661
Author: Luca Bruno <lethalman88 at gmail.com>
Date: Thu Mar 26 22:19:41 2009 +0100
forward page when the user hits ENTER either on an entry or a menu. Partially fixes #521162/2, can't do more without using ugly hacks
diff --git a/debian/changelog b/debian/changelog
index 227fc58..742e6db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -44,7 +44,8 @@ reportbug (4.1) unstable; urgency=low
- fix display_failure handling
- make BTS query tree columns sortable
- display report message in a dialog at the end, in substitution of pager and stdout
- - ui layout improvements
+ - forward page when the user hits ENTER either on an entry or a menu
+ - ui focus and layout improvements
* reportbug/ui/urwid_ui.py
- fix default severity (to normal) in non-multiple menus; Closes: #496969
* debian/control
diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 4618ce0..0752b02 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -505,6 +505,7 @@ class Page (ReportbugConnector):
self.empty_ok = kwargs.pop ('empty_ok', False)
self.execute (*args, **kwargs)
self.assistant.show ()
+ self.setup_focus ()
def connect_signals (self):
pass
@@ -533,6 +534,11 @@ class Page (ReportbugConnector):
def setup_focus (self):
self.widget.grab_focus ()
+ # Forward page when a widget is activated (e.g. GtkEntry) only if page is complete
+ def activate_forward (self, *args):
+ if self.assistant.get_page_complete (self.widget):
+ self.assistant.forward_page ()
+
# The user forwarded the assistant to see the next page
def switch_out (self):
pass
@@ -588,6 +594,7 @@ class GetStringPage (Page):
def connect_signals (self):
self.entry.connect ('changed', self.validate)
+ self.entry.connect ('activate', self.activate_forward)
def get_value (self):
return self.entry.get_text ()
@@ -759,6 +766,10 @@ class MenuPage (TreePage):
vbox.show_all ()
return vbox
+ def connect_signals (self):
+ TreePage.connect_signals (self)
+ self.view.connect ('row-activated', self.activate_forward)
+
def execute (self, par, options, prompt, default=None, any_ok=False,
order=None, extras=None, multiple=False):
self.label.set_text (par)
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list