Skip to content
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

wxGUI: Split widget initialization from notebook logic #1591

Conversation

lindakarlovska
Copy link
Contributor

Splits widget initialization (data catalog, display etc.) from notebook logic. Makes smaller methods for each widget creation.

@lindakarlovska lindakarlovska added the GUI wxGUI related label May 22, 2021
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it yet, but in general makes sense, although I am not sure actually how helpful this will be. There are couple things to address.

@@ -149,7 +149,9 @@ def show_menu_errors(messages):
# create widgets
self._createMenuBar()
self.statusbar = self.CreateStatusBar(number=1)
self.notebook = self._createNoteBook()
notebook = self._createNotebook()
self._createWidgets(notebook)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless createWidgets is used also elesewhere, I think it's unnecessary function, I would just put there its content directly, it will be more readable.

self.notebook = self._createNoteBook()
notebook = self._createNotebook()
self._createWidgets(notebook)
self.notebook = self._addPagesToNotebook(notebook)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function probably shouldn't return the notebook.

Comment on lines 426 to 430
self._createDataCatalogWidget(parent)
self._createDisplayWidget(parent)
self._createSearchModuleWidget(parent)
self._createConsoleWidget(parent)
self._createPythonShellWidget(parent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The work widget seems to be redundant in the function names.

@petrasovaa petrasovaa merged commit e5379bb into OSGeo:master May 30, 2021
@lindakarlovska lindakarlovska added the gsoc Reserved for Google Summer of Code student(s) label Jun 5, 2021
@wenzeslaus wenzeslaus added this to In progress in Single Window Layout GUI via automation Jun 9, 2021
@wenzeslaus wenzeslaus moved this from In progress to Done in Single Window Layout GUI Jun 9, 2021
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Reserved for Google Summer of Code student(s) GUI wxGUI related
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants