From d0bc41d7eed814d98a1c3f2f3f154c5f5083d57c Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Sun, 6 Apr 2014 19:44:47 +0000 Subject: [PATCH] Allow user to specify the GUI start up tag style on the command line git-svn-id: http://comictagger.googlecode.com/svn/trunk@701 6c5673fe-1810-88d6-992b-cd32ca31540c --- comictaggerlib/main.py | 2 +- comictaggerlib/taggerwindow.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 8a00236..883603b 100755 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -64,7 +64,7 @@ def ctmain(): app.processEvents() try: - tagger_window = TaggerWindow( opts.file_list, settings ) + tagger_window = TaggerWindow( opts.file_list, settings, opts=opts ) tagger_window.show() if platform.system() != "Linux": diff --git a/comictaggerlib/taggerwindow.py b/comictaggerlib/taggerwindow.py index b0d23bf..5391f25 100644 --- a/comictaggerlib/taggerwindow.py +++ b/comictaggerlib/taggerwindow.py @@ -79,7 +79,7 @@ class TaggerWindow( QtGui.QMainWindow): appName = "ComicTagger" version = ctversion.version - def __init__(self, file_list, settings, parent = None): + def __init__(self, file_list, settings, parent = None, opts=None): super(TaggerWindow, self).__init__(parent) uic.loadUi(ComicTaggerSettings.getUIFile('taggerwindow.ui' ), self) @@ -119,6 +119,11 @@ class TaggerWindow( QtGui.QMainWindow): self.setWindowIcon(QtGui.QIcon( ComicTaggerSettings.getGraphic('app.png'))) + if opts is not None and opts.data_style is not None and opts.data_style != MetaDataStyle.COMET: + #respect the command line option tag type + settings.last_selected_save_data_style = opts.data_style + settings.last_selected_load_data_style = opts.data_style + self.save_data_style = settings.last_selected_save_data_style self.load_data_style = settings.last_selected_load_data_style