diff options
author | Pootle daemon <pootle@pootle.sugarlabs.org> | 2012-11-17 21:20:33 (GMT) |
---|---|---|
committer | Pootle daemon <pootle@pootle.sugarlabs.org> | 2012-11-17 21:20:33 (GMT) |
commit | dd2149fa1c16ddce780f2774cccf05a2b00af8b3 (patch) | |
tree | b65754b0ca81866e0cb9dc563dc649f218de5f9a | |
parent | 89b4f57449d44595788b50ab2e7d51fe2b4f1773 (diff) | |
parent | 67ca642a612b7637ff26a87f962ee0dfb7081d23 (diff) |
Merge branch 'master' of git.sugarlabs.org:nutrition/nutrition
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | NutritionActivity.py | 2 | ||||
-rw-r--r-- | activity/activity.info | 3 | ||||
-rw-r--r-- | food.pyc | bin | 3573 -> 0 bytes | |||
-rw-r--r-- | game.py | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | setup.py | 0 | ||||
-rw-r--r-- | sprites.pyc | bin | 18080 -> 0 bytes |
7 files changed, 33 insertions, 13 deletions
@@ -1,5 +1,14 @@ NEWS +9 + +ENHACEMENT: +* New translations +* Add summary string + +BUG_FIX: +* Fix regression in add custom food code + 7 ENHACEMENT: diff --git a/NutritionActivity.py b/NutritionActivity.py index b412ed1..2755d48 100644 --- a/NutritionActivity.py +++ b/NutritionActivity.py @@ -144,7 +144,7 @@ class NutritionActivity(activity.Activity): group=name_game_button) separator_factory(toolbox.toolbar, False, True) - self._label = label_factory(toolbox.toolbar, LABELS[0]) + self._label = label_factory(toolbox.toolbar, LABELS[0], width=150) separator_factory(toolbox.toolbar, True, False) tools_toolbar = Gtk.Toolbar() diff --git a/activity/activity.info b/activity/activity.info index c10b421..ea46647 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,8 +1,9 @@ [Activity] name = Nutrition -activity_version = 7 +activity_version = 9 license = GPLv3 bundle_id = org.sugarlabs.NutritionActivity exec = sugar-activity NutritionActivity.NutritionActivity icon = activity-nutrition show_launcher = yes +summary = a series of game about good habits for eating
\ No newline at end of file diff --git a/food.pyc b/food.pyc Binary files differdeleted file mode 100644 index 8705424..0000000 --- a/food.pyc +++ /dev/null @@ -161,28 +161,38 @@ class Game(): card_list[i].set_margins(10, 0, 10, 0) card_list[i].hide() - def picture_append(self, path, i): - self._picture_cards[i] = Sprite( + def picture_append(self, path, i=-1): + spr = Sprite( self._sprites, int(self._width / 2.), int(self._height / 4.), GdkPixbuf.Pixbuf.new_from_file_at_size( path, int(self._width / 3.), int(9 * self._width / 12.))) + if i == -1: + self._picture_cards.append(spr) + else: + self._picture_cards[i] = spr self._picture_cards[i].type = 'picture' self._picture_cards[i].hide() - def small_picture_append(self, path, i): + def small_picture_append(self, path, i=-1): x = int(self._width / 3.) y = int(self._height / 6.) + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size( + path, + int(self._width / 6.), + int(3 * self._width / 8.)) for j in range(6): # up to 6 of each card - self._small_picture_cards[i * 6 + j] = Sprite( - self._sprites, x, y, - GdkPixbuf.Pixbuf.new_from_file_at_size( - path, - int(self._width / 6.), - int(3 * self._width / 8.))) - self._small_picture_cards[i * 6 + j].type = 'picture' - self._small_picture_cards[i * 6 + j].hide() + if i == -1: + self._small_picture_cards.append(Sprite( + self._sprites, x, y, pixbuf)) + self._small_picture_cards[-1].type = 'picture' + self._small_picture_cards[-1].hide() + else: + self._small_picture_cards[i * 6 + j] = Sprite( + self._sprites, x, y, pixbuf) + self._small_picture_cards[i * 6 + j].type = 'picture' + self._small_picture_cards[i * 6 + j].hide() x += int(self._width / 6.) if j == 2: x = int(self._width / 3.) diff --git a/sprites.pyc b/sprites.pyc Binary files differdeleted file mode 100644 index dde1dd9..0000000 --- a/sprites.pyc +++ /dev/null |