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 <marco@localhost.localdomain>2007-07-10 13:37:04 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-07-10 13:37:04 (GMT)
commitc3c0810def66526653608a0b7c381e4c902cadb5 (patch)
tree5aff99b005db19ce79c12bbf1047a3648b896ed2 /shell
parent587c1347e1cfe82fc883f4cfe1353c769243571b (diff)
Implement tooltips for the zoom levels.
Diffstat (limited to 'shell')
-rw-r--r--shell/view/frame/Makefile.am4
-rw-r--r--shell/view/frame/frame.py2
-rw-r--r--shell/view/frame/zoombox.py (renamed from shell/view/frame/ZoomBox.py)24
3 files changed, 27 insertions, 3 deletions
diff --git a/shell/view/frame/Makefile.am b/shell/view/frame/Makefile.am
index ff2bff3..4a7083b 100644
--- a/shell/view/frame/Makefile.am
+++ b/shell/view/frame/Makefile.am
@@ -8,6 +8,6 @@ sugar_PYTHON = \
FriendsBox.py \
eventarea.py \
frame.py \
- ZoomBox.py \
overlaybox.py \
- framewindow.py
+ framewindow.py \
+ zoombox.py
diff --git a/shell/view/frame/frame.py b/shell/view/frame/frame.py
index 5210f57..2a94754 100644
--- a/shell/view/frame/frame.py
+++ b/shell/view/frame/frame.py
@@ -27,7 +27,7 @@ from sugar.clipboard import clipboardservice
from view.frame.eventarea import EventArea
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.FriendsBox import FriendsBox
from view.frame.framewindow import FrameWindow
diff --git a/shell/view/frame/ZoomBox.py b/shell/view/frame/zoombox.py
index 5bfb0e7..f4b8535 100644
--- a/shell/view/frame/ZoomBox.py
+++ b/shell/view/frame/zoombox.py
@@ -14,10 +14,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+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
from model.shellmodel import ShellModel
@@ -35,6 +39,11 @@ class ZoomBox(hippo.CanvasBox):
ShellModel.ZOOM_MESH)
self.append(icon)
+ palette = Palette(_('Neighborhood'))
+ palette.props.invoker = FrameCanvasInvoker(icon)
+ palette.set_group_id('frame')
+ icon.set_palette(palette)
+
icon = IconButton(icon_name='theme:stock-zoom-friends',
stroke_color=color.BLACK,
fill_color=color.WHITE)
@@ -43,6 +52,11 @@ class ZoomBox(hippo.CanvasBox):
ShellModel.ZOOM_FRIENDS)
self.append(icon)
+ palette = Palette(_('Group'))
+ palette.props.invoker = FrameCanvasInvoker(icon)
+ palette.set_group_id('frame')
+ icon.set_palette(palette)
+
icon = IconButton(icon_name='theme:stock-zoom-home',
stroke_color=color.BLACK,
fill_color=color.WHITE)
@@ -51,6 +65,11 @@ class ZoomBox(hippo.CanvasBox):
ShellModel.ZOOM_HOME)
self.append(icon)
+ palette = Palette(_('Home'))
+ palette.props.invoker = FrameCanvasInvoker(icon)
+ palette.set_group_id('frame')
+ icon.set_palette(palette)
+
icon = IconButton(icon_name='theme:stock-zoom-activity',
stroke_color=color.BLACK,
fill_color=color.WHITE)
@@ -59,5 +78,10 @@ class ZoomBox(hippo.CanvasBox):
ShellModel.ZOOM_ACTIVITY)
self.append(icon)
+ palette = Palette(_('Activity'))
+ palette.props.invoker = FrameCanvasInvoker(icon)
+ palette.set_group_id('frame')
+ icon.set_palette(palette)
+
def _level_clicked_cb(self, item, level):
self._shell.set_zoom_level(level)