This commit is contained in:
Marco Pesenti Gritti 2006-09-01 15:33:55 +02:00
parent a6f9241e95
commit b15fb5ad50

View File

@ -10,23 +10,29 @@ class Frame:
def __init__(self, shell, owner): def __init__(self, shell, owner):
size = 30 size = 30
self._verbs_panel = BottomPanel(shell) self._panels = []
self._verbs_panel.set_position(size, 0)
self._verbs_panel.move(0, gtk.gdk.screen_height() - size)
self._verbs_panel.resize(gtk.gdk.screen_width(), size)
self._friends_panel = RightPanel(shell, owner.get_friends()) panel = BottomPanel(shell)
self._friends_panel.move(gtk.gdk.screen_width() - size, size) panel.set_position(size, 0)
self._friends_panel.resize(size, gtk.gdk.screen_height() - size * 2) panel.move(0, gtk.gdk.screen_height() - size)
panel.resize(gtk.gdk.screen_width(), size)
self._panels.append(panel)
self._top_panel = TopPanel(shell) panel = RightPanel(shell, owner.get_friends())
self._top_panel.set_position(size, 0) panel.move(gtk.gdk.screen_width() - size, size)
self._top_panel.move(0, 0) panel.resize(size, gtk.gdk.screen_height() - size * 2)
self._top_panel.resize(gtk.gdk.screen_width(), size) self._panels.append(panel)
self._left_panel = Panel() panel = TopPanel(shell)
self._left_panel.move(0, size) panel.set_position(size, 0)
self._left_panel.resize(size, gtk.gdk.screen_height() - size * 2) panel.move(0, 0)
panel.resize(gtk.gdk.screen_width(), size)
self._panels.append(panel)
panel = Panel()
panel.move(0, size)
panel.resize(size, gtk.gdk.screen_height() - size * 2)
self._panels.append(panel)
def __hide_timeout_cb(self): def __hide_timeout_cb(self):
self.hide() self.hide()
@ -37,19 +43,16 @@ class Frame:
gobject.timeout_add(seconds * 1000, self.__hide_timeout_cb) gobject.timeout_add(seconds * 1000, self.__hide_timeout_cb)
def show(self): def show(self):
self._verbs_panel.show() for panel in self._panels:
self._friends_panel.show() panel.show()
self._top_panel.show()
self._left_panel.show()
def hide(self): def hide(self):
self._verbs_panel.hide() for panel in self._panels:
self._friends_panel.hide() panel.hide()
self._top_panel.hide()
self._left_panel.hide()
def toggle_visibility(self): def toggle_visibility(self):
if self._verbs_panel.props.visible: for panel in self._panels:
self.hide() if panel.props.visible:
else: panel.hide()
self.show() else:
panel.show()