fix typo (two underscores for toolbar_box)

This commit is contained in:
Simon Schampijer 2009-08-12 16:45:06 +02:00
parent 10b5a30bc9
commit c1f5115b2a

View File

@ -1,4 +1,5 @@
# Copyright (C) 2007, Red Hat, Inc. # Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2009, Aleksey Lim, Sayamindu Dasgupta
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
@ -87,7 +88,7 @@ class Window(gtk.Window):
self.connect('window-state-event', self.__window_state_event_cb) self.connect('window-state-event', self.__window_state_event_cb)
self.connect('key-press-event', self.__key_press_cb) self.connect('key-press-event', self.__key_press_cb)
self.__toolbar_box = None self._toolbar_box = None
self._alerts = [] self._alerts = []
self._canvas = None self._canvas = None
self.tray = None self.tray = None
@ -128,16 +129,16 @@ class Window(gtk.Window):
canvas = property(get_canvas, set_canvas) canvas = property(get_canvas, set_canvas)
def get_toolbar_box(self): def get_toolbar_box(self):
return self.__toolbar_box return self._toolbar_box
def set_toolbar_box(self, toolbar_box): def set_toolbar_box(self, toolbar_box):
if self.__toolbar_box: if self._toolbar_box:
self._vbox.remove(self.__toolbar_box) self._vbox.remove(self._toolbar_box)
self._vbox.pack_start(toolbar_box, False) self._vbox.pack_start(toolbar_box, False)
self._vbox.reorder_child(toolbar_box, 0) self._vbox.reorder_child(toolbar_box, 0)
self.__toolbar_box = toolbar_box self._toolbar_box = toolbar_box
toolbar_box = property(get_toolbar_box, set_toolbar_box) toolbar_box = property(get_toolbar_box, set_toolbar_box)
@ -159,7 +160,7 @@ class Window(gtk.Window):
self._alerts.append(alert) self._alerts.append(alert)
if len(self._alerts) == 1: if len(self._alerts) == 1:
self._vbox.pack_start(alert, False) self._vbox.pack_start(alert, False)
if self.__toolbar_box is not None: if self._toolbar_box is not None:
self._vbox.reorder_child(alert, 1) self._vbox.reorder_child(alert, 1)
else: else:
self._vbox.reorder_child(alert, 0) self._vbox.reorder_child(alert, 0)
@ -172,7 +173,7 @@ class Window(gtk.Window):
self._vbox.remove(alert) self._vbox.remove(alert)
if len(self._alerts) >= 1: if len(self._alerts) >= 1:
self._vbox.pack_start(self._alerts[0], False) self._vbox.pack_start(self._alerts[0], False)
if self.__toolbar_box is not None: if self._toolbar_box is not None:
self._vbox.reorder_child(self._alerts[0], 1) self._vbox.reorder_child(self._alerts[0], 1)
else: else:
self._vbox.reorder_child(self._alert[0], 0) self._vbox.reorder_child(self._alert[0], 0)
@ -187,8 +188,8 @@ class Window(gtk.Window):
return False return False
if event.new_window_state & gtk.gdk.WINDOW_STATE_FULLSCREEN: if event.new_window_state & gtk.gdk.WINDOW_STATE_FULLSCREEN:
if self.__toolbar_box is not None: if self._toolbar_box is not None:
self.__toolbar_box.hide() self._toolbar_box.hide()
if self.tray is not None: if self.tray is not None:
self.tray.hide() self.tray.hide()
@ -206,8 +207,8 @@ class Window(gtk.Window):
self.__unfullscreen_button_timeout_cb) self.__unfullscreen_button_timeout_cb)
else: else:
if self.__toolbar_box is not None: if self._toolbar_box is not None:
self.__toolbar_box.show() self._toolbar_box.show()
if self.tray is not None: if self.tray is not None:
self.tray.show() self.tray.show()
@ -273,6 +274,6 @@ class Window(gtk.Window):
def get_toolbox(self): def get_toolbox(self):
warnings.warn('use toolbar_box instead of toolbox', DeprecationWarning) warnings.warn('use toolbar_box instead of toolbox', DeprecationWarning)
return self.__toolbar_box return self._toolbar_box
toolbox = property(get_toolbox, set_toolbox) toolbox = property(get_toolbox, set_toolbox)