Some refactoring to get styles right

This commit is contained in:
Marco Pesenti Gritti 2007-05-01 18:26:26 +02:00
parent 152361c592
commit bc4b051af2
5 changed files with 9 additions and 10 deletions

View File

@ -9,5 +9,5 @@ sugar_PYTHON = \
frame.py \ frame.py \
ZoomBox.py \ ZoomBox.py \
overlaybox.py \ overlaybox.py \
PanelWindow.py \ framewindow.py \
framepopupcontext.py framepopupcontext.py

View File

@ -2,14 +2,14 @@ import logging
import gtk import gtk
import hippo import hippo
from view.frame.PanelWindow import PanelWindow from view.frame.framewindow import FrameWindow
from view.frame.clipboardbox import ClipboardBox from view.frame.clipboardbox import ClipboardBox
from sugar.clipboard import clipboardservice from sugar.clipboard import clipboardservice
from sugar import util from sugar import util
class ClipboardPanelWindow(PanelWindow): class ClipboardPanelWindow(FrameWindow):
def __init__(self, frame, orientation): def __init__(self, frame, orientation):
PanelWindow.__init__(self, orientation) FrameWindow.__init__(self, orientation)
self._frame = frame self._frame = frame

View File

@ -24,7 +24,7 @@ from view.frame.ActivitiesBox import ActivitiesBox
from view.frame.ZoomBox import ZoomBox from view.frame.ZoomBox import ZoomBox
from view.frame.overlaybox import OverlayBox from view.frame.overlaybox import OverlayBox
from view.frame.FriendsBox import FriendsBox from view.frame.FriendsBox import FriendsBox
from view.frame.PanelWindow import PanelWindow from view.frame.framewindow import FrameWindow
from view.frame.clipboardpanelwindow import ClipboardPanelWindow from view.frame.clipboardpanelwindow import ClipboardPanelWindow
from view.frame.framepopupcontext import FramePopupContext from view.frame.framepopupcontext import FramePopupContext
from model.ShellModel import ShellModel from model.ShellModel import ShellModel
@ -257,7 +257,7 @@ class Frame(object):
self._timeline.goto('slide_out', True) self._timeline.goto('slide_out', True)
def _create_panel(self, orientation): def _create_panel(self, orientation):
panel = PanelWindow(orientation) panel = FrameWindow(orientation)
self._connect_to_panel(panel) self._connect_to_panel(panel)
return panel return panel

View File

@ -19,7 +19,8 @@ import hippo
from sugar.graphics import units from sugar.graphics import units
class PanelWindow(gtk.Window): class FrameWindow(gtk.Window):
__gtype_name__ = 'SugarFrameWindow'
def __init__(self, orientation): def __init__(self, orientation):
gtk.Window.__init__(self) gtk.Window.__init__(self)
self.hover = False self.hover = False
@ -35,8 +36,7 @@ class PanelWindow(gtk.Window):
self.add(self._canvas) self.add(self._canvas)
self._canvas.show() self._canvas.show()
self._bg = hippo.CanvasBox(background_color=0x414141ff, self._bg = hippo.CanvasBox(orientation=self._orientation)
orientation=self._orientation)
self._canvas.set_root(self._bg) self._canvas.set_root(self._bg)
self._update_size() self._update_size()

View File

@ -29,7 +29,6 @@ class Toolbox(gtk.VBox):
gtk.VBox.__init__(self) gtk.VBox.__init__(self)
self._notebook = gtk.Notebook() self._notebook = gtk.Notebook()
self._notebook.set_name('sugar-toolbox-notebook')
self._notebook.set_tab_pos(gtk.POS_BOTTOM) self._notebook.set_tab_pos(gtk.POS_BOTTOM)
self._notebook.set_show_border(False) self._notebook.set_show_border(False)
self.pack_start(self._notebook) self.pack_start(self._notebook)