summaryrefslogtreecommitdiff
path: root/grc/gui/ActionHandler.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-07-28 14:32:45 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2016-07-28 14:32:45 -0700
commit7d09110f19cc9c9d4622b79b8f79c0f8d776b4f9 (patch)
tree03db01992e617d72d0736dcb265576a7bdbd0fa9 /grc/gui/ActionHandler.py
parent1c122cbb5cdb1a979fc60e81646a39cbe7b89adf (diff)
parent05bdf36c65dc6af32185053eb26cca793747d214 (diff)
Merge branch 'maint'
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r--grc/gui/ActionHandler.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 11e81c4613..f18fcea3e1 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -66,7 +66,7 @@ class ActionHandler:
Messages.register_messenger(self.main_window.add_console_line)
Messages.send_init(platform)
#initialize
- self.init_file_paths = file_paths
+ self.init_file_paths = [os.path.abspath(file_path) for file_path in file_paths]
self.init = False
Actions.APPLICATION_INITIALIZE()
@@ -116,13 +116,10 @@ class ActionHandler:
# Initialize/Quit
##################################################
if action == Actions.APPLICATION_INITIALIZE:
- if not self.init_file_paths:
- self.init_file_paths = filter(os.path.exists, Preferences.get_open_files())
- if not self.init_file_paths: self.init_file_paths = ['']
- for file_path in self.init_file_paths:
- if file_path: main.new_page(file_path) #load pages from file paths
- if Preferences.file_open() in self.init_file_paths:
- main.new_page(Preferences.file_open(), show=True)
+ file_path_to_show = Preferences.file_open()
+ for file_path in (self.init_file_paths or Preferences.get_open_files()):
+ if os.path.exists(file_path):
+ main.new_page(file_path, show=file_path_to_show == file_path)
if not self.get_page():
main.new_page() # ensure that at least a blank page exists