From f63f53f71d24385f5ae0cc639d2c712dc0a2bcc1 Mon Sep 17 00:00:00 2001 From: Pootle Translation Date: Sun, 10 Feb 2008 13:57:33 +0000 Subject: Merge branch 'update-1' of git+ssh://dev.laptop.org/git/sugar into update-1 --- diff --git a/configure.ac b/configure.ac index 9d09276..646a49d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([Sugar],[0.75.11],[],[sugar]) +AC_INIT([Sugar],[0.75.12],[],[sugar]) AC_PREREQ([2.59]) diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index f6dbd37..da07e4f 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -44,7 +44,7 @@ will need for a real activity. # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -from gettext import gettext as _ +import gettext import logging import os import time @@ -72,6 +72,8 @@ from sugar import profile from sugar import _sugarbaseext from sugar import _sugarext +_ = lambda msg: gettext.dgettext('sugar', msg) + SCOPE_PRIVATE = "private" SCOPE_INVITE_ONLY = "invite" # shouldn't be shown in UI, it's implicit when you invite somebody SCOPE_NEIGHBORHOOD = "public" @@ -288,7 +290,7 @@ class ActivityToolbox(Toolbox): Toolbox.__init__(self) self._activity_toolbar = ActivityToolbar(activity) - self.add_toolbar('Activity', self._activity_toolbar) + self.add_toolbar(_('Activity'), self._activity_toolbar) self._activity_toolbar.show() def get_activity_toolbar(self): diff --git a/lib/sugar/graphics/alert.py b/lib/sugar/graphics/alert.py index ef649b2..7a3183b 100644 --- a/lib/sugar/graphics/alert.py +++ b/lib/sugar/graphics/alert.py @@ -15,7 +15,7 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -from gettext import gettext as _ +import gettext import gtk import gobject @@ -25,6 +25,7 @@ import math from sugar.graphics import style from sugar.graphics.icon import Icon +_ = lambda msg: gettext.dgettext('sugar', msg) class Alert(gtk.EventBox, gobject.GObject): """UI interface for Alerts diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py index a3a8ec5..ca9c703 100644 --- a/shell/view/home/MeshBox.py +++ b/shell/view/home/MeshBox.py @@ -267,7 +267,7 @@ class ActivityView(hippo.CanvasBox): self.set_layout(self._layout) self._icon = self._create_icon() - self._layout.add(self._icon, center=True) + self._layout.add_center(self._icon) self._update_palette() @@ -343,7 +343,7 @@ class ActivityView(hippo.CanvasBox): def _color_changed_cb(self, activity, pspec): self._layout.remove(self._icon) self._icon = self._create_icon() - self._layout.add(self._icon, center=True) + self._layout.add_center(self._icon) self._icon.set_palette(self._palette) def _private_changed_cb(self, activity, pspec): diff --git a/shell/view/home/snowflakelayout.py b/shell/view/home/snowflakelayout.py index 1eb58cf..7e59bf2 100644 --- a/shell/view/home/snowflakelayout.py +++ b/shell/view/home/snowflakelayout.py @@ -31,21 +31,18 @@ class SnowflakeLayout(gobject.GObject,hippo.CanvasLayout): gobject.GObject.__init__(self) self._nflakes = 0 - def add(self, child, center=False): - if not center: - self._nflakes += 1 - + def add(self, child): self._box.append(child) box_child = self._box.find_box_child(child) - box_child.is_center = center + box_child.is_center = False - def remove(self, child): - box_child = self._box.find_box_child(child) - if not box_child.is_center: - self._nflakes -= 1 + self._nflakes += 1 - self._box.remove(child) + def add_center(self, child): + self._box.append(child) + box_child = self._box.find_box_child(child) + box_child.is_center = True def do_set_box(self, box): self._box = box diff --git a/shell/view/home/spreadlayout.py b/shell/view/home/spreadlayout.py index 3463169..3edd717 100644 --- a/shell/view/home/spreadlayout.py +++ b/shell/view/home/spreadlayout.py @@ -218,10 +218,6 @@ class SpreadLayout(gobject.GObject, hippo.CanvasLayout): def do_allocate(self, x, y, width, height, req_width, req_height, origin_changed): for child in self._box.get_layout_children(): - # We need to always get requests to not confuse hippo - min_w, child_width = child.get_width_request() - min_h, child_height = child.get_height_request(child_width) - rect = child.grid_rect if child.grid_rect: child.allocate(rect.x * _CELL_SIZE, @@ -231,6 +227,8 @@ class SpreadLayout(gobject.GObject, hippo.CanvasLayout): origin_changed) else: vertical_offset = child.vertical_offset + min_w, child_width = child.get_width_request() + min_h, child_height = child.get_height_request(child_width) child_x = x + (width - child_width) / 2 child_y = y + (height - child_height + vertical_offset) / 2 child.allocate(child_x, child_y, child_width, child_height, -- cgit v0.9.1