Пример #1
0
 def action_go_event(self):
     """
     Changes the current dir to the one, that is given in the adress bar.
     """
     next_dir = QDir(self.adressbar.text())
     if (next_dir.isAbsolute() and next_dir.exists()):
         next_path = next_dir.path()
         self.update_current_path(next_path)
     else:
         dialog = utility.message_dialog('The path entered does not exist.',
                                         QMessageBox.Warning)
         dialog.exec()
Пример #2
0
 def action_up_event(self):
     """
     Changes the current dir to one dir up in the hierarchy
     """
     dir_up = QDir(self.current_path)
     if (dir_up.cdUp()):
         next_path = dir_up.path()
         self.update_current_path(next_path)
     else:
         logging.warning('There is no directory above the one you are in.'
                         + ' This message should not occur, because the'
                         + ' button triggering this should be deactivated'
                         + ' Please report this issue.')