changeset 171:a34693c5905f

Use common name scheme for keybinding key names Use KEY_%SUBJECT_%ACTION as scheme for keybinding key names.
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 13 Dec 2012 08:25:09 +0100
parents fa3f6cd394db
children b8abca7714fd
files getan/config.py getan/states.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/getan/config.py	Mon Dec 10 09:43:06 2012 +0100
+++ b/getan/config.py	Thu Dec 13 08:25:09 2012 +0100
@@ -86,7 +86,7 @@
     KEY_ENTRY_EDIT = "entry_edit"
     KEY_ADD_TIME = "add_time"
     KEY_SUBTRACT_TIME = "subtract_time"
-    KEY_PAUSE_PROJECT = "pause_project"
+    KEY_PROJECT_PAUSE = "project_pause"
 
     DEFAULT_KEYBINDINGS = {
             KEY_SWITCH_TIME_MODE : "f1",
@@ -103,7 +103,7 @@
             KEY_ENTRY_EDIT : "e",
             KEY_ADD_TIME : "+",
             KEY_SUBTRACT_TIME : "-",
-            KEY_PAUSE_PROJECT : " ",
+            KEY_PROJECT_PAUSE : " ",
             }
 
 
@@ -164,5 +164,5 @@
     def get_subtract_time(self):
         return self.get_binding(self.KEY_SUBTRACT_TIME)
 
-    def get_pause_project(self):
-        return self.get_binding(self.KEY_PAUSE_PROJECT)
+    def get_project_pause(self):
+        return self.get_binding(self.KEY_PROJECT_PAUSE)
--- a/getan/states.py	Mon Dec 10 09:43:06 2012 +0100
+++ b/getan/states.py	Thu Dec 13 08:25:09 2012 +0100
@@ -219,7 +219,7 @@
             self.view.set_footer_text(
                 self.msg('paused') %
                 (human_time((datetime.now()-self.break_start).seconds),
-                 self.msg('continue') % keys.get_pause_project()),
+                 self.msg('continue') % keys.get_project_pause()),
                 'paused_running')
             self.controller.view.loop.draw_screen()
 
@@ -246,7 +246,7 @@
             self.view.frame.set_focus('footer')
             return SubtractTimeState(self.controller, self.view, self)
 
-        if keys.get_pause_project() in key:
+        if keys.get_project_pause() in key:
             if not self.break_start:
                 self.break_start = datetime.now()
                 return self
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)