@@ -33,7 +33,7 @@ def fn_name(): return sys._getframe(1).f_code.co_name
33
33
from matplotlib .backend_bases import (ShowBase , ToolContainerBase ,
34
34
StatusbarBase )
35
35
from matplotlib .backend_managers import ToolManager
36
- import matplotlib . backend_tools as tools
36
+ from matplotlib import backend_tools
37
37
38
38
from matplotlib .cbook import is_string_like , is_writable_file_like
39
39
from matplotlib .colors import colorConverter
@@ -432,8 +432,8 @@ def add_widget(child, expand, fill, padding):
432
432
return size_request .height
433
433
434
434
if matplotlib .rcParams ['toolbar' ] == 'toolmanager' :
435
- tools .add_tools_2_toolmanager (self .toolmanager )
436
- tools .add_tools_2_container (self .toolbar )
435
+ backend_tools .add_tools_2_toolmanager (self .toolmanager )
436
+ backend_tools .add_tools_2_container (self .toolbar )
437
437
self .statusbar = StatusbarGTK3 (self .toolmanager )
438
438
h += add_widget (self .statusbar , False , False , 0 )
439
439
h += add_widget (Gtk .HSeparator (), False , False , 0 )
@@ -731,9 +731,9 @@ def get_filename_from_user (self):
731
731
return filename , self .ext
732
732
733
733
734
- class RubberbandGTK3 (tools .RubberbandBase ):
734
+ class RubberbandGTK3 (backend_tools .RubberbandBase ):
735
735
def __init__ (self , * args , ** kwargs ):
736
- tools .RubberbandBase .__init__ (self , * args , ** kwargs )
736
+ backend_tools .RubberbandBase .__init__ (self , * args , ** kwargs )
737
737
self .ctx = None
738
738
739
739
def draw_rubberband (self , x0 , y0 , x1 , y1 ):
@@ -846,7 +846,7 @@ def set_message(self, s):
846
846
self .push (self ._context , s )
847
847
848
848
849
- class SaveFigureGTK3 (tools .SaveFigureBase ):
849
+ class SaveFigureGTK3 (backend_tools .SaveFigureBase ):
850
850
851
851
def get_filechooser (self ):
852
852
fc = FileChooserDialog (
@@ -878,14 +878,14 @@ def trigger(self, *args, **kwargs):
878
878
error_msg_gtk (str (e ), parent = self )
879
879
880
880
881
- class SetCursorGTK3 (tools .SetCursorBase ):
881
+ class SetCursorGTK3 (backend_tools .SetCursorBase ):
882
882
def set_cursor (self , cursor ):
883
883
self .figure .canvas .get_property ("window" ).set_cursor (cursord [cursor ])
884
884
885
885
886
- class ConfigureSubplotsGTK3 (tools .ConfigureSubplotsBase , Gtk .Window ):
886
+ class ConfigureSubplotsGTK3 (backend_tools .ConfigureSubplotsBase , Gtk .Window ):
887
887
def __init__ (self , * args , ** kwargs ):
888
- tools .ConfigureSubplotsBase .__init__ (self , * args , ** kwargs )
888
+ backend_tools .ConfigureSubplotsBase .__init__ (self , * args , ** kwargs )
889
889
self .window = None
890
890
891
891
def init_window (self ):
@@ -1122,10 +1122,10 @@ def error_msg_gtk(msg, parent=None):
1122
1122
dialog .destroy ()
1123
1123
1124
1124
1125
- tools .ToolSaveFigure = SaveFigureGTK3
1126
- tools .ToolConfigureSubplots = ConfigureSubplotsGTK3
1127
- tools .ToolSetCursor = SetCursorGTK3
1128
- tools .ToolRubberband = RubberbandGTK3
1125
+ backend_tools .ToolSaveFigure = SaveFigureGTK3
1126
+ backend_tools .ToolConfigureSubplots = ConfigureSubplotsGTK3
1127
+ backend_tools .ToolSetCursor = SetCursorGTK3
1128
+ backend_tools .ToolRubberband = RubberbandGTK3
1129
1129
1130
1130
Toolbar = ToolbarGTK3
1131
1131
FigureCanvas = FigureCanvasGTK3
0 commit comments