Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-08-12 14:45:06 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-08-12 14:45:06 (GMT)
commitc1f5115b2a5576999d7ad1c39434470ded82bba9 (patch)
tree4e419d1f0dda2e7e5ce549343911d028e1faadf5
parent10b5a30bc9c2e2c05a5ae23a796e482db6169f85 (diff)
fix typo (two underscores for toolbar_box)
-rw-r--r--src/sugar/graphics/window.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py
index d1158a7..0d53776 100644
--- a/src/sugar/graphics/window.py
+++ b/src/sugar/graphics/window.py
@@ -1,4 +1,5 @@
# Copyright (C) 2007, Red Hat, Inc.
+# Copyright (C) 2009, Aleksey Lim, Sayamindu Dasgupta
#
# This library is free software; you can redistribute it and/or
# 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('key-press-event', self.__key_press_cb)
- self.__toolbar_box = None
+ self._toolbar_box = None
self._alerts = []
self._canvas = None
self.tray = None
@@ -128,16 +129,16 @@ class Window(gtk.Window):
canvas = property(get_canvas, set_canvas)
def get_toolbar_box(self):
- return self.__toolbar_box
+ return self._toolbar_box
def set_toolbar_box(self, toolbar_box):
- if self.__toolbar_box:
- self._vbox.remove(self.__toolbar_box)
+ if self._toolbar_box:
+ self._vbox.remove(self._toolbar_box)
self._vbox.pack_start(toolbar_box, False)
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)
@@ -159,7 +160,7 @@ class Window(gtk.Window):
self._alerts.append(alert)
if len(self._alerts) == 1:
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)
else:
self._vbox.reorder_child(alert, 0)
@@ -172,7 +173,7 @@ class Window(gtk.Window):
self._vbox.remove(alert)
if len(self._alerts) >= 1:
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)
else:
self._vbox.reorder_child(self._alert[0], 0)
@@ -187,8 +188,8 @@ class Window(gtk.Window):
return False
if event.new_window_state & gtk.gdk.WINDOW_STATE_FULLSCREEN:
- if self.__toolbar_box is not None:
- self.__toolbar_box.hide()
+ if self._toolbar_box is not None:
+ self._toolbar_box.hide()
if self.tray is not None:
self.tray.hide()
@@ -206,8 +207,8 @@ class Window(gtk.Window):
self.__unfullscreen_button_timeout_cb)
else:
- if self.__toolbar_box is not None:
- self.__toolbar_box.show()
+ if self._toolbar_box is not None:
+ self._toolbar_box.show()
if self.tray is not None:
self.tray.show()
@@ -273,6 +274,6 @@ class Window(gtk.Window):
def get_toolbox(self):
warnings.warn('use toolbar_box instead of toolbox', DeprecationWarning)
- return self.__toolbar_box
+ return self._toolbar_box
toolbox = property(get_toolbox, set_toolbox)