From c656c6248e5daad410a52eeb2d43f55564f5c345 Mon Sep 17 00:00:00 2001 From: Chris Kiehl Date: Mon, 3 Feb 2014 23:01:01 -0500 Subject: [PATCH] Updated advanced_config --- src/app/dialogs/advanced_config.py | 2 +- src/app/dialogs/advanced_config.pyc | Bin 5233 -> 5222 bytes src/app/dialogs/base_window.py | 13 +++++++++---- src/app/dialogs/controller.py | 5 +++++ src/app/images/image_store.pyc | Bin 1295 -> 1295 bytes src/languages/eng.py | 1 - src/model/gooey.py | 23 +++++++++++++++-------- 7 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/app/dialogs/advanced_config.py b/src/app/dialogs/advanced_config.py index 7b696cb..ae41dcb 100644 --- a/src/app/dialogs/advanced_config.py +++ b/src/app/dialogs/advanced_config.py @@ -19,7 +19,7 @@ class AdvancedConfigPanel(ScrolledPanel, OptionReader): ''' Abstract class for the Footer panels. ''' - def __init__(self, parent, params, model=None, **kwargs): + def __init__(self, parent, model=None, **kwargs): ScrolledPanel.__init__(self, parent, **kwargs) self.SetupScrolling() diff --git a/src/app/dialogs/advanced_config.pyc b/src/app/dialogs/advanced_config.pyc index 8f34ad6c7d5fc1fd4360bd2d1b136517180ddf28..be400fd2e73e7dee60c5e7e78e724e515d8d4b60 100644 GIT binary patch delta 325 zcmeyU@l1oA`7J-`L z0SU`a7U0#AQU@|MSV4SY5Wxi^pwc0{*^FA75AZ57GOA5}#5af0ak3(7?B+ZCE18TX zfa*#>+T0Rzic^CWLE1n@1!;i@H4q^LA_74~IFQg_0BN2qDs09WHQ7hFmkq3ib@Do) Jw8^d_Ism+8Jo5km delta 367 zcmaE+@lk`F`7Sb-QsdjoNCK9DG3V8~)*s9|8J0g@~Xy-W;@ zKu#7DLo)-A#SD^(XJ#m2VW?r=T*t)A$jCamhgpJ)4XCvsu_!UOc=KXrXBIvQkWtJ) z!Z9T!NNVyIc3(#6%}yMyOpL~pJGg2YB`33SZ?#YZDhLt)5%M5H0YoT*2vs1V!46^x z1BnulD~mI$Qj3DPKw>hJKXZ35YD})-X=alJ3CK-m<<*kX05UZ|O2L{SN}gQr-{>;neZTNm8I|nNOCvF6H delta 16 XcmeC@>gQr-{>;m@=={5l>>R8BEq(=S diff --git a/src/languages/eng.py b/src/languages/eng.py index c071f4e..ac37a50 100644 --- a/src/languages/eng.py +++ b/src/languages/eng.py @@ -33,7 +33,6 @@ if __name__ == '__main__': 'optional_args_msg':'Optional Arguments', # popup dialogs - "sure_you_want_to_exit":"Are you sure you want to exit?", 'close_program': 'Close Program?', 'status':'Status', diff --git a/src/model/gooey.py b/src/model/gooey.py index f7dd9ff..f03b2fe 100644 --- a/src/model/gooey.py +++ b/src/model/gooey.py @@ -18,7 +18,9 @@ from model.i18n import I18N from functools import partial -def Gooey(f=None, advanced=False, language='english', noconfig=False): +def Gooey(f=None, advanced=True, + language='english', noconfig=True, + program_name=None): ''' Decorator for client code's main function. Entry point for the GUI generator. @@ -26,16 +28,18 @@ def Gooey(f=None, advanced=False, language='english', noconfig=False): Scans the client code for argparse data. If found, extracts it and build the proper configuration page (basic or advanced). + ''' - Launched + params= locals() - ''' - params = locals() - for k,v in params.iteritems(): - print k, v def build(f): def inner(): module_path = get_caller_path() + + # User doesn't want to display configuration screen + # Just straight to the run panel + + try: parser = source_parser.extract_parser(module_path) except source_parser.ParserError: @@ -50,7 +54,11 @@ def Gooey(f=None, advanced=False, language='english', noconfig=False): app = wx.App(False) frame = BaseWindow(BodyPanel, model, f, params) - frame.Show(True) # Show the frame. + if noconfig: + # gah, ugly.. not sure how else to go + # about it without rewriting a *bunch* of other stuff + frame.ManualStart() + frame.Show(True) app.MainLoop() inner.__name__ = f.__name__ @@ -62,7 +70,6 @@ def Gooey(f=None, advanced=False, language='english', noconfig=False): def get_program_name(path): return '{}'.format(os.path.split(path)[-1]) - def get_caller_path(): # utility func for decorator