-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fill in missing global run config options #2198
Conversation
Hi @blink1073 , question,: are the options in both dialog hard/hand coded? If yes would it be possible to reuse the dialog content inside the file level dialog to the one in the config one?, in order to keep things DRY? |
@goanpeca, they are hand coded in two places. I did not see a way to reuse the Editor plugin code in the Preferences Page because the preferences page uses the helper methods to create the widgets and register the config/callbacks. There could be work done in the future to make Plugins and Preference Panels play better together. |
@blink1073 True!, ok I will test this tomorrow :) |
BTW thanks for doing this, I've wanted to be able to set those options as default for a while now, but never got around to fixing it myself. |
@Eric89GXL, my pleasure. |
wdir_layout.addWidget(dirname_radio) | ||
wdir_layout.addLayout(thisdir_layout) | ||
wdir_group.setLayout(wdir_layout) | ||
post_mortem = self.create_checkbox(_("Enter post mortem debugging for uncaught exceptions"), 'post_mortem', False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
79 columns here, please :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'd like to reword the message a bit (given that our audience is mostly scientists). What about:
Enter debugging mode when errors appear during execution
Other than my minor comments, I think this is ok. @blink1073 do you have something to say about the question @goanpeca asked in the first comment? |
@ccordoba12, I did address his comment (I believe), in the comment following his. |
@ccordoba12, @blink1073 did address the comment, for the moment should be good to go, but it really raises the issue of making different parts inside Spyder reusable. I have some ideas for this, some refactoring would be needed so that we can have the GUI defined as dics with the info of the widget (organization) and set the defaults and signals (as another dic maybe...) so that the GUI elements could be completely recycled without having to code by hand (in different ways...) in two or more places. Or we could start using Opinions? |
@goanpeca, we have formlayout which creates a GUI based on dicts, so you could start from there. |
@blink1073, I will take a look. Just some comments we could elaborate on this Own solutionPros
Cons
QtDesignerPros
Cons
|
@goanpeca, I am personally not a fan of QtDesigner. |
@goanpeca, I don't like QtDesigner either. Having our code as pure Python makes it really easy to hack on it. |
@ccordoba12 , @blink1073 , I understand :), I am myself not a super fan :p. I will look to what Steven suggests and think of something to allow us reuse GUI components more easily. |
@blink1073, is this ready to merge? |
Fire away! |
Am I the only one to like QtDesigner ? It's very good to quickly build interfaces. But it's very bad at handling lots of custom widgets. :( Btw you can load @goanpeca I think that in this case using the DRY principle would do more harm than good. The preferences uses the stadard way of setting global options, and the run dialog doesn't have to use it. If every panel was duplicated we would have to reuse more, but that's just a single one... |
@Nodd I am not a fan of designer but I do not dislike it ;-) This is maybe a first case, but if a second case shows up... or a third.. well maybe we will have to come back to this one. The standard way of building stuff for the preferences dialog is not that appealing to me, I know the idea is to have helper functions to add all widgets but at the end it feels that structure is too rigid.... |
This seems good, merging. |
Fill in missing global run config options
This extends the global Run config to match the file-level one.
Results in: