@@ -33,7 +33,7 @@ def fn_name(): return sys._getframe(1).f_code.co_name
3333from  matplotlib .backend_bases  import  (ShowBase , ToolContainerBase ,
3434                                      StatusbarBase )
3535from  matplotlib .backend_managers  import  ToolManager 
36- import  matplotlib . backend_tools   as   tools 
36+ from  matplotlib   import   backend_tools 
3737
3838from  matplotlib .cbook  import  is_string_like , is_writable_file_like 
3939from  matplotlib .colors  import  colorConverter 
@@ -432,8 +432,8 @@ def add_widget(child, expand, fill, padding):
432432            return  size_request .height 
433433
434434        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 )
437437            self .statusbar  =  StatusbarGTK3 (self .toolmanager )
438438            h  +=  add_widget (self .statusbar , False , False , 0 )
439439            h  +=  add_widget (Gtk .HSeparator (), False , False , 0 )
@@ -731,9 +731,9 @@ def get_filename_from_user (self):
731731        return  filename , self .ext 
732732
733733
734- class  RubberbandGTK3 (tools .RubberbandBase ):
734+ class  RubberbandGTK3 (backend_tools .RubberbandBase ):
735735    def  __init__ (self , * args , ** kwargs ):
736-         tools .RubberbandBase .__init__ (self , * args , ** kwargs )
736+         backend_tools .RubberbandBase .__init__ (self , * args , ** kwargs )
737737        self .ctx  =  None 
738738
739739    def  draw_rubberband (self , x0 , y0 , x1 , y1 ):
@@ -846,7 +846,7 @@ def set_message(self, s):
846846        self .push (self ._context , s )
847847
848848
849- class  SaveFigureGTK3 (tools .SaveFigureBase ):
849+ class  SaveFigureGTK3 (backend_tools .SaveFigureBase ):
850850
851851    def  get_filechooser (self ):
852852        fc  =  FileChooserDialog (
@@ -878,14 +878,14 @@ def trigger(self, *args, **kwargs):
878878                error_msg_gtk (str (e ), parent = self )
879879
880880
881- class  SetCursorGTK3 (tools .SetCursorBase ):
881+ class  SetCursorGTK3 (backend_tools .SetCursorBase ):
882882    def  set_cursor (self , cursor ):
883883        self .figure .canvas .get_property ("window" ).set_cursor (cursord [cursor ])
884884
885885
886- class  ConfigureSubplotsGTK3 (tools .ConfigureSubplotsBase , Gtk .Window ):
886+ class  ConfigureSubplotsGTK3 (backend_tools .ConfigureSubplotsBase , Gtk .Window ):
887887    def  __init__ (self , * args , ** kwargs ):
888-         tools .ConfigureSubplotsBase .__init__ (self , * args , ** kwargs )
888+         backend_tools .ConfigureSubplotsBase .__init__ (self , * args , ** kwargs )
889889        self .window  =  None 
890890
891891    def  init_window (self ):
@@ -1122,10 +1122,10 @@ def error_msg_gtk(msg, parent=None):
11221122    dialog .destroy ()
11231123
11241124
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 
11291129
11301130Toolbar  =  ToolbarGTK3 
11311131FigureCanvas  =  FigureCanvasGTK3 
0 commit comments