geography - forgot to suppress debug lines, forgot the config option

This commit is contained in:
noirauds 2015-02-15 23:51:01 +01:00
parent 7393b483e3
commit 9396be3cad
2 changed files with 6 additions and 2 deletions

View File

@ -1082,4 +1082,10 @@ class GeoGraphyView(OsmGps, NavigationView):
_('The maximum number of places to show'),
4, 'geography.max_places',
(1000, 10000))
configdialog.add_checkbox(grid,
_('Use keypad for shortcuts :\n'
'Either we choose the + and - from the keypad if we select this,\n'
'or we use the characters from the keyboard.'),
5, 'geography.use-keypad',
extra_callback=self.update_shortcuts)
return _('The map'), grid

View File

@ -176,11 +176,9 @@ class OsmGps():
config.set('geography.use-keypad',
self._config.get('geography.use-keypad'))
if config.get('geography.use-keypad'):
print "use keypad", config.get('geography.use-keypad')
self.osm.set_keyboard_shortcut(osmgpsmap.MapKey_t.ZOOMIN, Gdk.keyval_from_name("KP_Add"))
self.osm.set_keyboard_shortcut(osmgpsmap.MapKey_t.ZOOMOUT, Gdk.keyval_from_name("KP_Subtract"))
else:
print "use keyboard", config.get('geography.use-keypad')
self.osm.set_keyboard_shortcut(osmgpsmap.MapKey_t.ZOOMIN, Gdk.keyval_from_name("plus"))
self.osm.set_keyboard_shortcut(osmgpsmap.MapKey_t.ZOOMOUT, Gdk.keyval_from_name("minus"))