Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0324d8

Browse files
committed
Explicitly require GTK 3.0 in GTK3 examples.
This silences a warning from PyGI.
1 parent 1d45632 commit c0324d8

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
Demonstrate NavigationToolbar with GTK3 accessed via pygobject.
77
"""
88

9+
import gi
10+
gi.require_version('Gtk', '3.0')
911
from gi.repository import Gtk
1012

1113
from matplotlib.backends.backend_gtk3 import (

examples/user_interfaces/embedding_in_gtk3_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
GTK3 accessed via pygobject.
88
"""
99

10+
import gi
11+
gi.require_version('Gtk', '3.0')
1012
from gi.repository import Gtk
1113

1214
from matplotlib.backends.backend_gtk3agg import (

examples/user_interfaces/mpl_with_glade3_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import os
99

10+
import gi
11+
gi.require_version('Gtk', '3.0')
1012
from gi.repository import Gtk
1113

1214
from matplotlib.figure import Figure

0 commit comments

Comments
 (0)