Fix the project detail menu, by passing the default actions config.
[matthijs/upstream/mobilegtd.git] / src / gui / project_details / project_view.py
index bc36d77c6b14f83e382f2b0d4702102ed2b7b4a0..f1bc81af93351426d10f2af7b1be522bd61eeb58 100644 (file)
@@ -21,7 +21,7 @@ import key_codes
 
 from gui import *
 
-ACTION_LIST_KEYS_AND_MENU = Configuration(os.path.join(gtd_directory,"actions.cfg"))
+ACTION_LIST_KEYS_AND_MENU = Configuration(os.path.join(gtd_directory,"actions.cfg"), default_actions_menu)
 
 
 def ask_for_action(project_name,proposition=None):
@@ -63,7 +63,9 @@ class ProjectView(EditableListView):
     def __init__(self,project):
         self.project = project
         self.project.observers.append(self)
-        super(ProjectView, self).__init__(self.project.name, [lambda:self.project.actions.with_property(lambda a:a.status==action.active)], ACTION_LIST_KEYS_AND_MENU)
+        super(ProjectView, self).__init__([lambda:self.project.actions.with_property(lambda a:a.status==action.active)])
+        self.set_keybindings(ACTION_LIST_KEYS_AND_MENU)
+        self.set_title(self.project.name)
 
     def exit(self):
         self.project.observers.remove(self)