1. Daniel Poelzleithner
  2. pida-poelzi-main

Commits

Daniel Poelzleithner  committed b381cdb Merge

merge

  • Participants
  • Parent commits c8e6372, 663c140
  • Branches default

Comments (0)

Files changed (2)

File pida/services/commander/commander.py

View file
 
 class CommanderCommandsConfig(CommandsConfig):
 
-    def execute(self, commandargs, env=[], cwd=os.getcwd(), title=_('Command'),
+    def execute(self, commandargs, env=(), cwd=os.getcwd(), title=_('Command'),
                       icon='terminal', eof_handler=None, use_python_fork=False,
                       parser_func=None):
         return self.svc.execute(commandargs, env, cwd, title, icon,
                                 eof_handler, use_python_fork, parser_func)
 
-    def execute_shell(self, env=[], cwd=os.getcwd(), title='Shell'):
+    def execute_shell(self, env=(), cwd=os.getcwd(), title='Shell'):
         shell_command = self.svc.opt('shell_command')
         shell_args = self.svc.opt('shell_command_args')
         commandargs = [shell_command] + shell_args
 
     def execute(self, commandargs, env, cwd, title, icon, eof_handler=None,
                 use_python_fork=False, parser_func=None):
-        env_pida = env[:]
+        env_pida = list(env)
         env_pida.append('PIDA_VERSION=%s' % pida.version)
         current_project = self.boss.cmd('project', 'get_current_project')
         if current_project:

File pida/services/filemanager/filemanager.py

View file
 
         self.create_ancest_tree()
 
-    # This is painful, and will always break
-    # So use the following method instead
-    def update_single_file(self, name, basepath):
-        def _update_file(oname, obasepath, state):
-            if oname == name and basepath == obasepath:
-                if name not in self.entries:
-                    self.entries[oname] = FileEntry(oname, obasepath, self)
-                self.entries[oname].state = state
-                self.show_or_hide(self.entries[oname])
-        for lister in self.svc.features['file_lister']:
-            GeneratorTask(lister, _update_file).start(self.path)
-
     def update_single_file(self, name, basepath, select=False):
         if basepath != self.path:
             return
         if name not in self.entries:
-            self.entries[name] = FileEntry(name, basepath, self)
-            self.show_or_hide(self.entries[name], select=select)
+            self.add_or_update_file(name, basepath, 'normal', select=select)
 
     def update_removed_file(self, filename):
         entry = self.entries.pop(filename, None)
 
     def _on_menu_down(self, menu, action):
         action.set_active(False)
-        print "down"
     
     def on_toggle_hidden(self, action):
         self.svc.set_opt('show_hidden', action.get_active())