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

Update Diagrams to Open in Gtk.Notebook Pages #65

Merged
merged 15 commits into from Feb 4, 2019
Merged

Update Diagrams to Open in Gtk.Notebook Pages #65

merged 15 commits into from Feb 4, 2019

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Jan 9, 2019

Added to what @amolenaar started by completing some of the conversion to make the main window use a normal Gtk.Notebook. It now works to open and close multiple diagrams.

@amolenaar How do I launch the checkmetamodel plugin to test that it is working correctly? When I try to run python checkmodelgui.py, it immediately closes.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Issue Number: continue work towards fixing #49

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
When closing a tab or exiting the app, it was throwing the above
GTK-CRITICAL error. This error was resolved by unshowing the tabs prior
to removing a page, and then showing them again after the page is
removed. I need to look in to more why this is necessary.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw requested a review from amolenaar January 9, 2019 02:49
The updated main window always displays the Toolbox and Namespace, so
an option to show them is not needed.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw changed the title Update Diagrams to Open in Gtk.Notebook Pages [WIP] Update Diagrams to Open in Gtk.Notebook Pages Jan 10, 2019
@danyeaw
Copy link
Member Author

danyeaw commented Jan 10, 2019

Updating this to work-in-progress. There are some other areas like the auto diagram formatter that also depends on the diagram page, so I would like to make some more updates prior to merging this.

@danyeaw danyeaw added the not-quite-right This feature is not ready yet label Jan 10, 2019
@@ -777,7 +662,7 @@ def tree_view_create_package(self):

@action(
name="tree-view-delete-package",
label=_("Delete pac_kage"),
label=_("Delete package"),
Copy link
Member

Choose a reason for hiding this comment

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

Why did you drop the underscore? This used to be used for quick access keys in the menu. Is that no longer working like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the correction, that's definitely why I needed your help reviewing this. I just figured it was a typo 😄

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
The toolbox was using a custom wrapbox that provided similar
functionality to the Gtk ToolPalette widget. Switched to the base Gtk+
widget to improve Gtk compatibility and fix the wrapbox not wrapping
the buttons down to the next row when shrinking the toolbox.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Refactored the hand draw style action from the MainWindow to the Diagram
class, since the action was unable to get the list of tabs from the
MainWindow.

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw removed the not-quite-right This feature is not ready yet label Feb 4, 2019
@danyeaw danyeaw changed the title [WIP] Update Diagrams to Open in Gtk.Notebook Pages Update Diagrams to Open in Gtk.Notebook Pages Feb 4, 2019
@danyeaw danyeaw merged commit 7c71039 into gaphor:master Feb 4, 2019
@danyeaw danyeaw deleted the fix-tabs-diagrams branch February 26, 2019 17:08
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.

None yet

2 participants