Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-07-31 12:05:14 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-07-31 12:05:14 (GMT)
commitcca69e70125c2550b36e0136de0154b88dae256a (patch)
tree8f4ccac5f948d358877067e79b73644e526c62ac /shell
parent1845435e8ce3f634c30c303112876c98865bf0b6 (diff)
Remove obsolete sugar.graphics.color.
Diffstat (limited to 'shell')
-rw-r--r--shell/view/clipboardicon.py5
-rw-r--r--shell/view/clipboardmenu.py1
-rw-r--r--shell/view/devices/network/mesh.py10
-rw-r--r--shell/view/devices/network/wireless.py10
-rw-r--r--shell/view/frame/FriendsBox.py6
-rw-r--r--shell/view/frame/zoombox.py17
-rw-r--r--shell/view/home/HomeBox.py12
-rw-r--r--shell/view/home/MeshBox.py42
8 files changed, 42 insertions, 61 deletions
diff --git a/shell/view/clipboardicon.py b/shell/view/clipboardicon.py
index fa0bd61..5ee5467 100644
--- a/shell/view/clipboardicon.py
+++ b/shell/view/clipboardicon.py
@@ -24,7 +24,6 @@ from sugar.graphics.canvasicon import CanvasIcon
from view.clipboardmenu import ClipboardMenu
from sugar.graphics.xocolor import XoColor
from sugar.graphics import units
-from sugar.graphics import color
from sugar.clipboard import clipboardservice
from sugar import util
from sugar import profile
@@ -76,9 +75,9 @@ class ClipboardIcon(CanvasIcon):
self._selected = selected
if selected:
if not self._hover:
- self.props.background_color = color.DESKTOP_BACKGROUND.get_int()
+ self.props.background_color = style.COLOR_PANEL_GREY.get_int()
else:
- self.props.background_color = color.TOOLBAR_BACKGROUND.get_int()
+ self.props.background_color = style.COLOR_TOOLBAR_GREY.get_int()
def set_state(self, name, percent, icon_name, preview, activity):
cb_service = clipboardservice.get_instance()
diff --git a/shell/view/clipboardmenu.py b/shell/view/clipboardmenu.py
index 95e6192..35802dc 100644
--- a/shell/view/clipboardmenu.py
+++ b/shell/view/clipboardmenu.py
@@ -25,7 +25,6 @@ import hippo
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
-from sugar.graphics import color
from sugar.graphics import style
from sugar.clipboard import clipboardservice
from sugar.datastore import datastore
diff --git a/shell/view/devices/network/mesh.py b/shell/view/devices/network/mesh.py
index e5b0a43..0a0bdce 100644
--- a/shell/view/devices/network/mesh.py
+++ b/shell/view/devices/network/mesh.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from sugar.graphics import canvasicon
-from sugar.graphics import color
+from sugar.graphics import style
from sugar.graphics import units
from model.devices import device
@@ -36,11 +36,11 @@ class DeviceView(canvasicon.CanvasIcon):
# FIXME Change icon colors once we have real icons
state = self._model.props.state
if state == device.STATE_ACTIVATING:
- self.props.fill_color = color.ICON_FILL_INACTIVE
- self.props.stroke_color = color.ICON_STROKE_INACTIVE
+ self.props.fill_color = style.COLOR_INACTIVE_FILL
+ self.props.stroke_color = style.COLOR_INACTIVE_STROKE
elif state == device.STATE_ACTIVATED:
self.props.fill_color = None
self.props.stroke_color = None
elif state == device.STATE_INACTIVE:
- self.props.fill_color = color.ICON_FILL_INACTIVE
- self.props.stroke_color = color.ICON_STROKE_INACTIVE
+ self.props.fill_color = style.COLOR_INACTIVE_FILL
+ self.props.stroke_color = style.COLOR_INACTIVE_STROKE
diff --git a/shell/view/devices/network/wireless.py b/shell/view/devices/network/wireless.py
index defbae8..498a603 100644
--- a/shell/view/devices/network/wireless.py
+++ b/shell/view/devices/network/wireless.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from sugar.graphics import canvasicon
-from sugar.graphics import color
+from sugar.graphics import style
from sugar.graphics import units
from model.devices.network import wireless
from sugar.graphics.canvasicon import CanvasIcon
@@ -56,11 +56,11 @@ class DeviceView(CanvasIcon):
# FIXME Change icon colors once we have real icons
state = self._model.props.state
if state == device.STATE_ACTIVATING:
- self.props.fill_color = color.ICON_FILL_INACTIVE
- self.props.stroke_color = color.ICON_STROKE_INACTIVE
+ self.props.fill_color = style.COLOR_INACTIVE_FILL
+ self.props.stroke_color = style.COLOR_INACTIVE_STROKE
elif state == device.STATE_ACTIVATED:
self.props.fill_color = None
self.props.stroke_color = None
elif state == device.STATE_INACTIVE:
- self.props.fill_color = color.ICON_FILL_INACTIVE
- self.props.stroke_color = color.ICON_STROKE_INACTIVE
+ self.props.fill_color = style.COLOR_INACTIVE_FILL
+ self.props.stroke_color = style.COLOR_INACTIVE_STROKE
diff --git a/shell/view/frame/FriendsBox.py b/shell/view/frame/FriendsBox.py
index 7b7dc60..562c042 100644
--- a/shell/view/frame/FriendsBox.py
+++ b/shell/view/frame/FriendsBox.py
@@ -17,7 +17,7 @@
import hippo
from sugar.graphics.canvasicon import CanvasIcon
-from sugar.graphics import color
+from sugar.graphics import style
from sugar.presence import presenceservice
from view.BuddyIcon import BuddyIcon
from model.BuddyModel import BuddyModel
@@ -29,9 +29,9 @@ class FriendIcon(BuddyIcon):
def prelight(self, enter):
if enter:
- self.props.background_color = color.BLACK.get_int()
+ self.props.background_color = style.COLOR_BLACK.get_int()
else:
- self.props.background_color = color.TOOLBAR_BACKGROUND.get_int()
+ self.props.background_color = style.COLOR_TOOLBAR.GREY.get_int()
class FriendsBox(hippo.CanvasBox):
def __init__(self, shell):
diff --git a/shell/view/frame/zoombox.py b/shell/view/frame/zoombox.py
index 858bb96..5634f56 100644
--- a/shell/view/frame/zoombox.py
+++ b/shell/view/frame/zoombox.py
@@ -18,7 +18,6 @@ from gettext import gettext as _
import hippo
-from sugar.graphics import color
from sugar.graphics.palette import Palette
from sugar.graphics.iconbutton import IconButton
from frameinvoker import FrameCanvasInvoker
@@ -31,9 +30,7 @@ class ZoomBox(hippo.CanvasBox):
self._shell = shell
- icon = IconButton(icon_name='theme:zoom-mesh',
- stroke_color=color.BLACK,
- fill_color=color.WHITE)
+ icon = IconButton(icon_name='theme:zoom-mesh')
icon.connect('activated',
self._level_clicked_cb,
ShellModel.ZOOM_MESH)
@@ -44,9 +41,7 @@ class ZoomBox(hippo.CanvasBox):
palette.set_group_id('frame')
icon.set_palette(palette)
- icon = IconButton(icon_name='theme:zoom-friends',
- stroke_color=color.BLACK,
- fill_color=color.WHITE)
+ icon = IconButton(icon_name='theme:zoom-friends')
icon.connect('activated',
self._level_clicked_cb,
ShellModel.ZOOM_FRIENDS)
@@ -57,9 +52,7 @@ class ZoomBox(hippo.CanvasBox):
palette.set_group_id('frame')
icon.set_palette(palette)
- icon = IconButton(icon_name='theme:zoom-home',
- stroke_color=color.BLACK,
- fill_color=color.WHITE)
+ icon = IconButton(icon_name='theme:zoom-home')
icon.connect('activated',
self._level_clicked_cb,
ShellModel.ZOOM_HOME)
@@ -70,9 +63,7 @@ class ZoomBox(hippo.CanvasBox):
palette.set_group_id('frame')
icon.set_palette(palette)
- icon = IconButton(icon_name='theme:zoom-activity',
- stroke_color=color.BLACK,
- fill_color=color.WHITE)
+ icon = IconButton(icon_name='theme:zoom-activity')
icon.connect('activated',
self._level_clicked_cb,
ShellModel.ZOOM_ACTIVITY)
diff --git a/shell/view/home/HomeBox.py b/shell/view/home/HomeBox.py
index cae3760..c851d1c 100644
--- a/shell/view/home/HomeBox.py
+++ b/shell/view/home/HomeBox.py
@@ -25,7 +25,6 @@ import hippo
import dbus
from sugar.graphics import units
-from sugar.graphics import color
from sugar.graphics.xocolor import XoColor
from sugar.graphics.palette import Palette, CanvasInvoker
from sugar import profile
@@ -81,16 +80,9 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem):
self._remove_device(device)
def _shell_state_changed_cb(self, model, pspec):
- # FIXME handle all possible mode switches
+ # FIXME implement this
if model.props.state == ShellModel.STATE_SHUTDOWN:
- if self._donut:
- self.remove(self._donut)
- self._donut = None
- self._my_icon.props.stroke_color = color.ICON_STROKE_INACTIVE
- self._my_icon.props.fill_color = \
- color.ICON_FILL_INACTIVE
- self._my_icon.props.background_color = \
- color.ICON_FILL_INACTIVE.get_int()
+ pass
def do_allocate(self, width, height, origin_changed):
hippo.CanvasBox.do_allocate(self, width, height, origin_changed)
diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py
index 43411d1..6ea255c 100644
--- a/shell/view/home/MeshBox.py
+++ b/shell/view/home/MeshBox.py
@@ -22,7 +22,7 @@ from gettext import gettext as _
from sugar.graphics.spreadlayout import SpreadLayout
from sugar.graphics.canvasicon import CanvasIcon
-from sugar.graphics import color
+from sugar.graphics import style
from sugar.graphics import xocolor
from sugar.graphics import canvasicon
from sugar.graphics import units
@@ -95,24 +95,24 @@ class AccessPointView(PulsingIcon):
if self._model.props.state == accesspointmodel.STATE_CONNECTING:
self.props.pulse_time = 1.0
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ],
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor('#e2e2e2') ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ],
+ [ style.Color(self._device_stroke),
+ style.Color('#e2e2e2') ]
]
elif self._model.props.state == accesspointmodel.STATE_CONNECTED:
self.props.pulse_time = 2.0
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ],
- [ color.HTMLColor('#ffffff'),
- color.HTMLColor(self._device_fill) ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ],
+ [ style.Color('#ffffff'),
+ style.Color(self._device_fill) ]
]
elif self._model.props.state == accesspointmodel.STATE_NOTCONNECTED:
self.props.pulse_time = 0.0
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ]
]
@@ -146,24 +146,24 @@ class MeshDeviceView(PulsingIcon):
if state == nmclient.DEVICE_STATE_ACTIVATING:
self.props.pulse_time = 0.75
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ],
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor('#e2e2e2') ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ],
+ [ style.Color(self._device_stroke),
+ style.Color('#e2e2e2') ]
]
elif state == nmclient.DEVICE_STATE_ACTIVATED:
self.props.pulse_time = 1.5
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ],
- [ color.HTMLColor('#ffffff'),
- color.HTMLColor(self._device_fill) ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ],
+ [ style.Color('#ffffff'),
+ style.Color(self._device_fill) ]
]
elif state == nmclient.DEVICE_STATE_INACTIVE:
self.props.pulse_time = 0.0
self.props.colors = [
- [ color.HTMLColor(self._device_stroke),
- color.HTMLColor(self._device_fill) ]
+ [ style.Color(self._device_stroke),
+ style.Color(self._device_fill) ]
]
class ActivityView(hippo.CanvasBox):