Author: reinhard Date: 2009-10-26 17:16:56 -0500 (Mon, 26 Oct 2009) New Revision: 10009
Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py trunk/gnue-forms/src/uidrivers/qt4/widgets/entry.py Log: Don't try to focus "label" style entries. Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py =================================================================== --- trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2009-10-26 22:12:46 UTC (rev 10008) +++ trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2009-10-26 22:16:56 UTC (rev 10009) @@ -460,12 +460,16 @@ # Find the widget this label belongs to for (index, item) in enumerate(self.ui_widget.widgets): if item._gnue_label_ == self: - if item.isEnabled(): + if item.isEnabled() and self._gfObject.style.lower() != 'label': # This replaces the label with the actual entry and sets # the focus on the entry self.ui_widget._gfObject.set_focus(index) self.ui_widget._ui_set_focus_(index) - + else: + # This entry is not focusable, so we at least move the + # database cursor to the record behind this entry. + self._gfObject._event_jump_records( + self.widgets.index(item)) break Modified: trunk/gnue-forms/src/uidrivers/qt4/widgets/entry.py =================================================================== --- trunk/gnue-forms/src/uidrivers/qt4/widgets/entry.py 2009-10-26 22:12:46 UTC (rev 10008) +++ trunk/gnue-forms/src/uidrivers/qt4/widgets/entry.py 2009-10-26 22:16:56 UTC (rev 10009) @@ -418,12 +418,16 @@ # Find the widget this label belongs to for (index, item) in enumerate(self.ui_widget.widgets): if item._gnue_label_ == self: - if item.isEnabled(): + if item.isEnabled() and self._gfObject.style.lower() != 'label': # This replaces the label with the actual entry and sets # the focus on the entry self.ui_widget._gfObject.set_focus(index) self.ui_widget._ui_set_focus_(index) - + else: + # This entry is not focusable, so we at least move the + # database cursor to the record behind this entry. + self._gfObject._event_jump_records( + self.widgets.index(item)) break _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue