Skip to content

Fix creating main window #3842

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

Merged
merged 2 commits into from
Apr 12, 2025
Merged

Fix creating main window #3842

merged 2 commits into from
Apr 12, 2025

Conversation

City-busz
Copy link
Contributor

The window property is used by conditions in multiple places, but it was always available due to the getter function, which is not the expected behavior. Turn it into an empty property, and assign the window only in the open() function, which is the only place where the window is supposed to be created.

This fixes the problem that set_application() has no effect, because it's called after the window is presented by _on_file_manager_state_changed().

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

The app_id property of the main window is "gaphor", because the window is not associated with the application before shown.

Issue Number: N/A

What is the new behavior?

The app_id property of the main window is "org.gaphor.Graphor", the window properly initialized and associated with the application before shown.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added the python Pull requests that update Python code label Apr 11, 2025
The window property is used by conditions in multiple places, but it was
always available due to the getter function, which is not the expected
behavior. Turn it into an empty property, and assign the window only in
the open() function, which is the only place where the window is supposed
to be created.

This fixes the problem that set_application() has no effect, because it's
called after the window is presented by _on_file_manager_state_changed().
@amolenaar
Copy link
Member

Thanks @City-busz

@amolenaar amolenaar merged commit c825a06 into gaphor:main Apr 12, 2025
13 of 20 checks passed
@danyeaw danyeaw added fix A fix for a bug and removed python Pull requests that update Python code labels May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants