Numérigraphe has proposed merging
lp:~numerigraphe/openobject-client/6.1-configurable-spinbuttons into
lp:openobject-client.
Requested reviews:
OpenERP sa GTK client R&D (openerp-dev-gtk)
Related bugs:
Bug #575616 in OpenERP GTK Client: "spinbutton scroll changes prices and
quantities"
https://bugs.launchpad.net/openobject-client/+bug/575616
For more details, see:
https://code.launchpad.net/~numerigraphe/openobject-client/6.1-configurable-spinbuttons/+merge/133067
I propose to add a configuration key to set the spin buttons' increment.
By setting it to 0 in the configuration file, one can disable spinning
altogether. This is seen as a useful improvement by several of our users,
because using the wheelmouse to scroll the form actually spins int/float
widgets instead if the mouse cursor is on such a widget.
The default remains to increment/decrement by 1.0 on spin.
Lionel Sausin.
--
https://code.launchpad.net/~numerigraphe/openobject-client/6.1-configurable-spinbuttons/+merge/133067
Your team OpenERP sa GTK client R&D is requested to review the proposed merge
of lp:~numerigraphe/openobject-client/6.1-configurable-spinbuttons into
lp:openobject-client.
=== modified file 'bin/options.py'
--- bin/options.py 2011-10-13 06:29:51 +0000
+++ bin/options.py 2012-11-06 14:08:18 +0000
@@ -117,6 +117,7 @@
'help.context': 'http://doc.openerp.com/index.php?model=%(model)s&lang=%(lang)s',
'client.timeout': 3600,
'client.form_text_spellcheck': True,
+ 'client.spinbutton_increment': 1.0,
}
loglevels = ('critical', 'error', 'warning', 'info', 'debug', 'debug_rpc', 'debug_rpc_answer', 'notset')
parser = optparse.OptionParser(version=_("OpenERP Client %s" % openerp_version))
=== modified file 'bin/widget/view/form_gtk/spinbutton.py'
--- bin/widget/view/form_gtk/spinbutton.py 2012-07-11 10:43:23 +0000
+++ bin/widget/view/form_gtk/spinbutton.py 2012-11-06 14:08:18 +0000
@@ -25,12 +25,14 @@
import interface
import tools
from tools import user_locale_format
+import options
class spinbutton(interface.widget_interface):
def __init__(self, window, parent, model, attrs={}, label=None):
interface.widget_interface.__init__(self, window, parent, model, attrs, label_ebox=label)
- adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)
+ adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint,
+ float(options.options['client.spinbutton_increment']), 5.0)
self.widget = gtk.SpinButton(adj, 1.0, digits=int( attrs.get('digits',(14,2))[1] ) )
self.widget.set_activates_default(True)
self.widget.connect('populate-popup', self._menu_open)
=== modified file 'bin/widget/view/form_gtk/spinint.py'
--- bin/widget/view/form_gtk/spinint.py 2012-07-11 10:43:23 +0000
+++ bin/widget/view/form_gtk/spinint.py 2012-11-06 14:08:18 +0000
@@ -25,13 +25,15 @@
import interface
import tools
from tools import user_locale_format
+import options
class spinint(interface.widget_interface):
def __init__(self, window, parent, model, attrs={}, label=None):
interface.widget_interface.__init__(self, window, parent, model, attrs, label_ebox=label)
- adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)
+ adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint,
+ float(options.options['client.spinbutton_increment']), 5.0)
self.widget = gtk.SpinButton(adj, 1, digits=0)
self.widget.set_width_chars(5)
self.widget.set_activates_default(True)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp