Refactor frame stuff naming some

This commit is contained in:
Marco Pesenti Gritti 2006-09-01 15:11:52 +02:00
parent 4c80db6da0
commit a6f9241e95
10 changed files with 21 additions and 21 deletions

View File

@ -48,7 +48,7 @@ bindings/threadframe/Makefile
shell/Makefile shell/Makefile
shell/data/Makefile shell/data/Makefile
shell/home/Makefile shell/home/Makefile
shell/panel/Makefile shell/frame/Makefile
shell/session/Makefile shell/session/Makefile
shell/PresenceService/Makefile shell/PresenceService/Makefile
sugar/Makefile sugar/Makefile

View File

@ -1,4 +1,4 @@
SUBDIRS = data session home panel PresenceService SUBDIRS = data session frame home PresenceService
bin_SCRIPTS = \ bin_SCRIPTS = \
sugar \ sugar \

View File

@ -15,7 +15,7 @@ from ChatController import ChatController
from sugar.activity import ActivityFactory from sugar.activity import ActivityFactory
from sugar.activity import Activity from sugar.activity import Activity
from FirstTimeDialog import FirstTimeDialog from FirstTimeDialog import FirstTimeDialog
from panel.PanelManager import PanelManager from frame.Frame import Frame
from globalkeys import KeyGrabber from globalkeys import KeyGrabber
from sugar import conf from sugar import conf
from sugar import env from sugar import env
@ -86,7 +86,7 @@ class Shell(gobject.GObject):
elif key == 'F4': elif key == 'F4':
self.set_zoom_level(sugar.ZOOM_MESH) self.set_zoom_level(sugar.ZOOM_MESH)
elif key == 'F5': elif key == 'F5':
self._panel_manager.toggle_visibility() self._frame.toggle_visibility()
def __first_time_dialog_destroy_cb(self, dialog): def __first_time_dialog_destroy_cb(self, dialog):
conf.get_profile().save() conf.get_profile().save()
@ -108,8 +108,8 @@ class Shell(gobject.GObject):
self._chat_controller = ChatController(self) self._chat_controller = ChatController(self)
self._chat_controller.listen() self._chat_controller.listen()
self._panel_manager = PanelManager(self, self._owner) self._frame = Frame(self, self._owner)
self._panel_manager.show_and_hide(10) self._frame.show_and_hide(10)
def set_console(self, console): def set_console(self, console):
self._console = console self._console = console

View File

@ -4,7 +4,7 @@ import goocanvas
from sugar.canvas.IconItem import IconItem from sugar.canvas.IconItem import IconItem
from sugar.canvas.IconColor import IconColor from sugar.canvas.IconColor import IconColor
from sugar import conf from sugar import conf
from panel.Panel import Panel from frame.Panel import Panel
import logging import logging
class ActivityItem(IconItem): class ActivityItem(IconItem):
@ -47,7 +47,7 @@ class ActivityBar(goocanvas.Group):
self.add_child(item) self.add_child(item)
class VerbsPanel(Panel): class BottomPanel(Panel):
def __init__(self, shell): def __init__(self, shell):
Panel.__init__(self) Panel.__init__(self)

View File

@ -1,21 +1,21 @@
import gtk import gtk
import gobject import gobject
from panel.VerbsPanel import VerbsPanel from frame.BottomPanel import BottomPanel
from panel.FriendsPanel import FriendsPanel from frame.RightPanel import RightPanel
from panel.TopPanel import TopPanel from frame.TopPanel import TopPanel
from panel.Panel import Panel from frame.Panel import Panel
class PanelManager: class Frame:
def __init__(self, shell, owner): def __init__(self, shell, owner):
size = 30 size = 30
self._verbs_panel = VerbsPanel(shell) self._verbs_panel = BottomPanel(shell)
self._verbs_panel.set_position(size, 0) self._verbs_panel.set_position(size, 0)
self._verbs_panel.move(0, gtk.gdk.screen_height() - size) self._verbs_panel.move(0, gtk.gdk.screen_height() - size)
self._verbs_panel.resize(gtk.gdk.screen_width(), size) self._verbs_panel.resize(gtk.gdk.screen_width(), size)
self._friends_panel = FriendsPanel(shell, owner.get_friends()) self._friends_panel = RightPanel(shell, owner.get_friends())
self._friends_panel.move(gtk.gdk.screen_width() - size, size) self._friends_panel.move(gtk.gdk.screen_width() - size, size)
self._friends_panel.resize(size, gtk.gdk.screen_height() - size * 2) self._friends_panel.resize(size, gtk.gdk.screen_height() - size * 2)

View File

@ -1,8 +1,8 @@
sugardir = $(pkgdatadir)/shell/panel sugardir = $(pkgdatadir)/shell/panel
sugar_PYTHON = \ sugar_PYTHON = \
__init__.py \ __init__.py \
FriendsPanel.py \ RightPanel.py \
Panel.py \ Panel.py \
PanelManager.py \ Frame.py \
TopPanel.py \ TopPanel.py \
VerbsPanel.py BottomPanel.py

View File

@ -1,6 +1,6 @@
import goocanvas import goocanvas
from panel.Panel import Panel from frame.Panel import Panel
from sugar.canvas.IconItem import IconItem from sugar.canvas.IconItem import IconItem
from sugar.canvas.IconColor import IconColor from sugar.canvas.IconColor import IconColor
from sugar.presence import PresenceService from sugar.presence import PresenceService
@ -153,7 +153,7 @@ class ActionsBar(goocanvas.Group):
def __chat_clicked_cb(self, item): def __chat_clicked_cb(self, item):
pass pass
class FriendsPanel(Panel): class RightPanel(Panel):
def __init__(self, shell, friends): def __init__(self, shell, friends):
Panel.__init__(self) Panel.__init__(self)
self._shell = shell self._shell = shell

View File

@ -1,6 +1,6 @@
import goocanvas import goocanvas
from panel.Panel import Panel from frame.Panel import Panel
from sugar.canvas.IconItem import IconItem from sugar.canvas.IconItem import IconItem
import sugar import sugar