Small fixes to gtk3 examples. by anntzer · Pull Request #10679 · matplotlib/matplotlib · GitHub
Skip to content

Small fixes to gtk3 examples. - #10679

Closed
anntzer wants to merge 1 commit into
matplotlib:masterfrom
anntzer:gtk3examples
Closed

anntzer wants to merge 1 commit into
matplotlib:masterfrom
anntzer:gtk3examples

Conversation

@anntzer

@anntzer anntzer commented Mar 5, 2018

Copy link
Copy Markdown
Contributor
  • Move import of gi.repository.Gtk after matplotlib: this avoids the
    warning "Gtk was imported without specifying a version first.", as
    Matplotlib itself calls gi.require_version("Gtk", "3.0"). The
    examples could be modified to also include the call to require_version
    but I'd rather decrease line noise as much as possible.

  • Make mpl_with_glade_316_sgskip work even when the example is not run
    from its folder (by looking for the glade file next to the source file).

Milestoning to 3.0 as these files were already modified during the py3fication.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

- Move import of gi.repository.Gtk *after* matplotlib: this avoids the
warning "Gtk was imported without specifying a version first.", as
Matplotlib itself calls `gi.require_version("Gtk", "3.0")`.  The
examples could be modified to also include the call to require_version
but I'd rather decrease line noise as much as possible.

- Make mpl_with_glade_316_sgskip work even when the example is not run
from its folder (by looking for the glade file next to the source file).
@anntzer anntzer added this to the v3.0 milestone Mar 5, 2018
@QuLogic

QuLogic commented Mar 5, 2018

Copy link
Copy Markdown
Member

@anntzer

anntzer commented Mar 5, 2018

Copy link
Copy Markdown
Contributor Author

No worries, that one can go in first then I can update or close this one. (Or please just close this if it is totally redundant.)

@anntzer

anntzer commented Mar 5, 2018

Copy link
Copy Markdown
Contributor Author

@anntzer anntzer closed this Mar 5, 2018
@anntzer
anntzer deleted the gtk3examples branch March 5, 2018 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants