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

Dialog Objects #24

Merged
merged 13 commits into from
Feb 26, 2018
Merged

Dialog Objects #24

merged 13 commits into from
Feb 26, 2018

Conversation

cjmayo
Copy link
Collaborator

@cjmayo cjmayo commented Feb 15, 2018

I'd seen various bits of odd behaviour, first with the fourway's leading to a89e39c.
Also GTK+ Critical errors on the command line and Python exceptions.

And something strange in the code:
https://github.com/edyoung/gnofract4d/blob/572dbeecde9cef266167a479368675c710e77926/fract4dgui/browser.py#L162-L163

I can't find any other examples of testing the existence of GtkTreeSelection, indeed the GTK+ docs say:
"The GtkTreeSelection object is automatically created when a new GtkTreeView widget is created, and cannot exist independently of this widget."

I think this is all the result of a confusion of classes, objects, static methods and scope. This set attempts to fix that.

There are a couple of improvements too:

  • The formula browser now opens with the current file and formula selected
  • The fractal settings can now be dragged wider by the user (but not shrunk).

Hope that makes sense. There a few comments in the commit messages.

Creating objects as a side effect of importing a module creates a new
object each time and can lead to unexpected behaviour.

Remove attempted workaround.
Simplify the layout using Gtk.Paned and reduce the number of Gtk.Boxes.

Allows user to expand the settings.
Fix strange behaviour from partially initialised dialogs by replacing
global management code with straightforward use of objects.
PainterDialog needs to be non-modal to allow the user to click on the
fractal.
BrowserDialog objects are parentless to allow the user to reposition
away from the fractal and see applied changes.

Current formula and file are selected when the dialog is opened.

A new dialog is created on each use. Converting to an object level
dialog that is hidden between uses would require a review of the dialog
and browser_model.
Ensure they remain fully in scope after adding to the MainWindow
toolbar.
This reverts commit a89e39c.

A workaround no longer needed now that fourway is a widget.
@cjmayo
Copy link
Collaborator Author

cjmayo commented Feb 16, 2018

@cjmayo cjmayo mentioned this pull request Feb 19, 2018
@edyoung edyoung merged commit 1edb639 into fract4d:python3 Feb 26, 2018
@cjmayo cjmayo deleted the objects branch November 21, 2018 17:30
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Feb 17, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Feb 17, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Feb 17, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Feb 20, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 9, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 9, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 9, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 20, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 20, 2020
da2ce7 pushed a commit to da2ce7/fract4d-gnofract4d that referenced this pull request Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants