@@ -347,7 +347,6 @@ def __init__(self, canvas, num):
347347 h = int (self .canvas .figure .bbox .height )
348348
349349 self .toolbar = self ._get_toolbar ()
350- self .statusbar = None
351350
352351 def add_widget (child ):
353352 child .show ()
@@ -359,9 +358,6 @@ def add_widget(child):
359358 backend_tools .add_tools_to_manager (self .toolmanager )
360359 if self .toolbar :
361360 backend_tools .add_tools_to_container (self .toolbar )
362- self .statusbar = StatusbarGTK3 (self .toolmanager )
363- h += add_widget (self .statusbar )
364- h += add_widget (Gtk .HSeparator ())
365361
366362 if self .toolbar is not None :
367363 self .toolbar .show ()
@@ -433,9 +429,6 @@ def resize(self, width, height):
433429 if self .toolbar :
434430 toolbar_size = self .toolbar .size_request ()
435431 height += toolbar_size .height
436- if self .statusbar :
437- statusbar_size = self .statusbar .size_request ()
438- height += statusbar_size .height
439432 canvas_size = self .canvas .get_allocation ()
440433 if canvas_size .width == canvas_size .height == 1 :
441434 # A canvas size of (1, 1) cannot exist in most cases, because
@@ -623,12 +616,10 @@ class ToolbarGTK3(ToolContainerBase, Gtk.Box):
623616 def __init__ (self , toolmanager ):
624617 ToolContainerBase .__init__ (self , toolmanager )
625618 Gtk .Box .__init__ (self )
626- self .set_property ("orientation" , Gtk .Orientation .VERTICAL )
627-
628- self ._toolarea = Gtk .Box ()
629- self ._toolarea .set_property ('orientation' , Gtk .Orientation .HORIZONTAL )
630- self .pack_start (self ._toolarea , False , False , 0 )
631- self ._toolarea .show_all ()
619+ self .set_property ('orientation' , Gtk .Orientation .HORIZONTAL )
620+ self ._message = Gtk .Label ()
621+ self .pack_end (self ._message , False , False , 0 )
622+ self .show_all ()
632623 self ._groups = {}
633624 self ._toolitems = {}
634625
@@ -661,7 +652,7 @@ def _add_button(self, button, group, position):
661652 self ._add_separator ()
662653 toolbar = Gtk .Toolbar ()
663654 toolbar .set_style (Gtk .ToolbarStyle .ICONS )
664- self ._toolarea . pack_start (toolbar , False , False , 0 )
655+ self .pack_start (toolbar , False , False , 0 )
665656 toolbar .show_all ()
666657 self ._groups [group ] = toolbar
667658 self ._groups [group ].insert (button , position )
@@ -691,10 +682,14 @@ def remove_toolitem(self, name):
691682 def _add_separator (self ):
692683 sep = Gtk .Separator ()
693684 sep .set_property ("orientation" , Gtk .Orientation .VERTICAL )
694- self ._toolarea . pack_start (sep , False , True , 0 )
685+ self .pack_start (sep , False , True , 0 )
695686 sep .show_all ()
696687
688+ def set_message (self , s ):
689+ self ._message .set_label (s )
690+
697691
692+ @cbook .deprecated ("3.3" )
698693class StatusbarGTK3 (StatusbarBase , Gtk .Statusbar ):
699694 def __init__ (self , * args , ** kwargs ):
700695 StatusbarBase .__init__ (self , * args , ** kwargs )
0 commit comments