Icons and pot files updated new list of demo games
Muriel de Souza Godoi
16 years ago
0 | * New pot files for create game mode | |
1 | * Allow kids create their own games using text, audio and images #3311 | |
2 | * When a player join an already started game, it receives the game state #3471 | |
0 | 3 | * Added support to be able to play wav and aiff format (erikos) |
1 | * Set create tab as default (Muriel) | |
2 | 4 | * Games tab renamed to Play (Muriel) |
3 | 5 | * New icon and tooltip for reset game button #3965 (Muriel) |
4 | 6 | * Only enable add-pair/update-pair buttons when the card has content (Muriel) |
0 | 0 | [Activity] |
1 | 1 | name = Memorize |
2 | 2 | service_name = org.laptop.Memorize |
3 | exec = sugar-activity activity.MemorizeActivity | |
3 | class = activity.MemorizeActivity | |
4 | 4 | icon = activity-memorize |
5 | 5 | activity_version = 18 |
6 | 6 | show_launcher = yes |
7 | mime_types = application/memorizegame; | |
7 | mime_types = application/x-memorize-project;⏎ |
48 | 48 | IFACE = SERVICE |
49 | 49 | PATH = '/org/laptop/Memorize' |
50 | 50 | |
51 | _TOOLBAR_CREATE = 1 | |
52 | _TOOLBAR_PLAY = 2 | |
51 | _TOOLBAR_PLAY = 1 | |
52 | _TOOLBAR_CREATE = 2 | |
53 | ||
53 | 54 | |
54 | 55 | _logger = logging.getLogger('memorize-activity') |
55 | 56 | |
58 | 59 | def __init__(self, handle): |
59 | 60 | Activity.__init__(self, handle) |
60 | 61 | |
61 | self.play_load = False | |
62 | self.create_load = False | |
62 | 63 | self.play_mode = False |
63 | 64 | |
64 | 65 | toolbox = ActivityToolbox(self) |
65 | 66 | toolbox.connect('current-toolbar-changed', self.change_mode) |
66 | 67 | activity_toolbar = toolbox.get_activity_toolbar() |
67 | 68 | |
68 | self._createToolbar = createtoolbar.CreateToolbar(self) | |
69 | toolbox.add_toolbar('Create', self._createToolbar) | |
70 | self._createToolbar.show() | |
71 | ||
72 | 69 | self._memorizeToolbar = memorizetoolbar.MemorizeToolbar(self) |
73 | 70 | toolbox.add_toolbar(_('Play'), self._memorizeToolbar) |
74 | self._memorizeToolbar.show() | |
75 | ||
71 | self._memorizeToolbar.show() | |
72 | ||
73 | self._createToolbar = createtoolbar.CreateToolbar(self) | |
74 | toolbox.add_toolbar(_('Create'), self._createToolbar) | |
75 | self._createToolbar.show() | |
76 | ||
76 | 77 | self.set_toolbox(toolbox) |
77 | 78 | toolbox.show() |
78 | 79 | |
79 | self.cardlist = cardlist.CardList() | |
80 | self.createcardpanel = createcardpanel.CreateCardPanel() | |
81 | self.createcardpanel.connect('add-pair', self.cardlist.add_pair) | |
82 | self.createcardpanel.connect('update-pair', self.cardlist.update_selected) | |
83 | self.cardlist.connect('pair-selected', self.createcardpanel.load_pair) | |
84 | self.cardlist.connect('update-create-toolbar', self._createToolbar.update_create_toolbar) | |
85 | self.cardlist.connect('update-create-buttons', self._createToolbar.update_buttons_status) | |
86 | self._createToolbar.connect('create_new_game', self.cardlist.clean_list) | |
87 | self._createToolbar.connect('create_new_game', self.createcardpanel.clean) | |
88 | self._createToolbar.connect('create_load_game', self.cardlist.load_game) | |
89 | self._createToolbar.connect('create_save_game', self.cardlist.save_game) | |
90 | self._createToolbar.connect('create_equal_pairs', self.createcardpanel.change_equal_pairs) | |
80 | ||
81 | ||
82 | ||
83 | # Play game mode | |
84 | self.table = cardtable.CardTable() | |
85 | self.scoreboard = scoreboard.Scoreboard() | |
86 | self.game = game.MemorizeGame() | |
87 | ||
88 | self.table.connect('key-press-event', self.table.key_press_event) | |
89 | self.table.connect('card-flipped', self.game.card_flipped) | |
90 | self.table.connect('card-highlighted', self.game.card_highlighted) | |
91 | ||
92 | self.game.connect('set-border', self.table.set_border) | |
93 | self.game.connect('flop-card', self.table.flop_card) | |
94 | self.game.connect('flip-card', self.table.flip_card) | |
95 | self.game.connect('highlight-card', self.table.highlight_card) | |
96 | self.game.connect('load_mode', self.table.load_msg) | |
97 | ||
98 | self.game.connect('msg_buddy', self.scoreboard.set_buddy_message) | |
99 | self.game.connect('add_buddy', self.scoreboard.add_buddy) | |
100 | self.game.connect('rem_buddy', self.scoreboard.rem_buddy) | |
101 | self.game.connect('increase-score', self.scoreboard.increase_score) | |
102 | self.game.connect('wait_mode_buddy', self.scoreboard.set_wait_mode) | |
103 | self.game.connect('change-turn', self.scoreboard.set_selected) | |
104 | ||
105 | self.game.connect('reset_scoreboard', self.scoreboard.reset) | |
106 | self.game.connect('reset_table', self.table.reset) | |
107 | ||
108 | self.game.connect('load_game', self.table.load_game) | |
109 | self.game.connect('change_game', self.table.change_game) | |
110 | self.game.connect('load_game', self._memorizeToolbar.update_toolbar) | |
111 | self.game.connect('change_game', self._memorizeToolbar.update_toolbar) | |
112 | ||
113 | self._memorizeToolbar.connect('game_changed', self.game.change_game) | |
114 | self.connect('shared', self._shared_cb) | |
115 | ||
91 | 116 | |
92 | 117 | self.hbox = gtk.HBox(False) |
93 | self.hbox.pack_start(self.createcardpanel) | |
94 | self.hbox.pack_start(self.cardlist, False, False) | |
118 | self.hbox.pack_start(self.scoreboard, False, False) | |
119 | self.hbox.pack_start(self.table) | |
95 | 120 | self.set_canvas(self.hbox) |
96 | 121 | |
97 | 122 | # create csound instance to play sound files |
117 | 142 | self.connect('destroy', self._cleanup_cb) |
118 | 143 | |
119 | 144 | # start on the game toolbar, might change this to the create toolbar later |
120 | self.toolbox.set_current_toolbar(_TOOLBAR_CREATE) | |
145 | self.toolbox.set_current_toolbar(_TOOLBAR_PLAY) | |
121 | 146 | |
122 | 147 | # Get the Presence Service |
123 | 148 | self.pservice = presenceservice.get_instance() |
134 | 159 | owner = self.pservice.get_owner() |
135 | 160 | self.owner = owner |
136 | 161 | self.current = 0 |
162 | ||
163 | self.game.set_myself(self.owner) | |
164 | ||
137 | 165 | # Owner.props.key |
138 | 166 | if self._shared_activity: |
139 | 167 | # We are joining the activity |
140 | self.toolbox.set_current_toolbar(_TOOLBAR_PLAY) | |
141 | 168 | self.connect('joined', self._joined_cb) |
142 | 169 | if self.get_shared(): |
143 | 170 | # We've already joined |
144 | 171 | self._joined_cb() |
145 | 172 | else: |
146 | 173 | _logger.debug('buddy joined - __init__: %s', self.owner.props.nick) |
147 | #game_file = join(dirname(__file__),'demos','addition.zip') | |
148 | #self.game.load_game(game_file, 4) | |
174 | game_file = join(dirname(__file__),'demos','addition.zip') | |
175 | self.game.load_game(game_file, 4) | |
149 | 176 | _logger.debug('loading conventional') |
150 | #self.game.add_buddy(self.owner) | |
177 | self.game.add_buddy(self.owner) | |
151 | 178 | self.show_all() |
152 | 179 | |
153 | 180 | def read_file(self, file_path): |
154 | ''' | |
155 | if self.metadata['mime_type'] == 'plain/text': | |
156 | f = open(file_path, 'r') | |
157 | try: | |
158 | data = pickle.load(f) | |
159 | finally: | |
160 | f.close() | |
161 | ||
162 | _logger.debug('reading from datastore') | |
163 | ||
164 | self.game.load_remote(data[0], data[1]) | |
165 | self.game.set_wait_list(data[2]) | |
166 | ''' | |
167 | if self.metadata['mime_type'] == 'application/memorizegame': | |
181 | ||
182 | if self.metadata['mime_type'] == 'application/x-memorize-project': | |
168 | 183 | self.toolbox.set_current_toolbar(_TOOLBAR_PLAY) |
169 | 184 | self.game.change_game(None, file_path, 4, 'file', self.metadata['title'], self.metadata['icon-color']) |
170 | 185 | |
171 | ''' | |
172 | def write_file(self, file_path): | |
173 | if not self.metadata['mime_type']: | |
174 | self.metadata['mime_type'] = 'plain/text' | |
175 | ||
176 | if self.metadata['mime_type'] == 'plain/text': | |
177 | ||
178 | ||
179 | data=[self.game.get_grid(), self.game.get_data(), self.game.get_players_data()] | |
180 | ||
181 | _logger.debug('writing to datastore') | |
182 | f = open(file_path, 'w') | |
183 | try: | |
184 | pickle.dump(data, f) | |
185 | finally: | |
186 | f.close() | |
187 | ''' | |
188 | 186 | def change_mode(self, notebook, index): |
189 | if index != _TOOLBAR_CREATE: | |
190 | if not self.play_load: | |
191 | # Create play components | |
192 | self.table = cardtable.CardTable() | |
193 | self.scoreboard = scoreboard.Scoreboard() | |
194 | self.game = game.MemorizeGame() | |
195 | self.game.set_myself(self.owner) | |
196 | self.hbox.remove(self.createcardpanel) | |
197 | self.hbox.remove(self.cardlist) | |
198 | self.hbox.pack_start(self.scoreboard, False, False) | |
199 | self.hbox.pack_start(self.table) | |
200 | ||
201 | self.table.connect('key-press-event', self.table.key_press_event) | |
202 | self.table.connect('card-flipped', self.game.card_flipped) | |
203 | self.table.connect('card-highlighted', self.game.card_highlighted) | |
204 | ||
205 | self.game.connect('set-border', self.table.set_border) | |
206 | self.game.connect('flop-card', self.table.flop_card) | |
207 | self.game.connect('flip-card', self.table.flip_card) | |
208 | self.game.connect('highlight-card', self.table.highlight_card) | |
209 | self.game.connect('load_mode', self.table.load_msg) | |
210 | ||
211 | self.game.connect('msg_buddy', self.scoreboard.set_buddy_message) | |
212 | self.game.connect('add_buddy', self.scoreboard.add_buddy) | |
213 | self.game.connect('rem_buddy', self.scoreboard.rem_buddy) | |
214 | self.game.connect('increase-score', self.scoreboard.increase_score) | |
215 | self.game.connect('wait_mode_buddy', self.scoreboard.set_wait_mode) | |
216 | self.game.connect('change-turn', self.scoreboard.set_selected) | |
217 | ||
218 | self.game.connect('reset_scoreboard', self.scoreboard.reset) | |
219 | self.game.connect('reset_table', self.table.reset) | |
220 | ||
221 | self.game.connect('load_game', self.table.load_game) | |
222 | self.game.connect('change_game', self.table.change_game) | |
223 | self.game.connect('load_game', self._memorizeToolbar.update_toolbar) | |
224 | self.game.connect('change_game', self._memorizeToolbar.update_toolbar) | |
225 | ||
226 | self._memorizeToolbar.connect('game_changed', self.game.change_game) | |
227 | self.connect('shared', self._shared_cb) | |
228 | self.play_load = True | |
229 | if not self._shared_activity: | |
230 | self.game.add_buddy(self.owner) | |
231 | #game_file = join(dirname(__file__), 'demos', 'addition.zip') | |
232 | #self.game.load_game(game_file, 4) | |
233 | else: | |
234 | self.hbox.remove(self.createcardpanel) | |
235 | self.hbox.remove(self.cardlist) | |
236 | self.hbox.pack_start(self.scoreboard, False, False) | |
237 | self.hbox.pack_start(self.table) | |
187 | if index == _TOOLBAR_CREATE: | |
188 | if not self.create_load: | |
189 | # Create game mode | |
190 | self.cardlist = cardlist.CardList() | |
191 | self.createcardpanel = createcardpanel.CreateCardPanel() | |
192 | self.createcardpanel.connect('add-pair', self.cardlist.add_pair) | |
193 | self.createcardpanel.connect('update-pair', self.cardlist.update_selected) | |
194 | self.cardlist.connect('pair-selected', self.createcardpanel.load_pair) | |
195 | self.cardlist.connect('update-create-toolbar', self._createToolbar.update_create_toolbar) | |
196 | self.cardlist.connect('update-create-buttons', self._createToolbar.update_buttons_status) | |
197 | self._createToolbar.connect('create_new_game', self.cardlist.clean_list) | |
198 | self._createToolbar.connect('create_new_game', self.createcardpanel.clean) | |
199 | self._createToolbar.connect('create_load_game', self.cardlist.load_game) | |
200 | self._createToolbar.connect('create_save_game', self.cardlist.save_game) | |
201 | self._createToolbar.connect('create_equal_pairs', self.createcardpanel.change_equal_pairs) | |
202 | self.create_load = True | |
203 | ||
204 | self.hbox.remove(self.scoreboard) | |
205 | self.hbox.remove(self.table) | |
206 | self.hbox.pack_start(self.createcardpanel) | |
207 | self.hbox.pack_start(self.cardlist, False, False) | |
208 | self.play_mode = False | |
209 | ||
210 | else: | |
211 | ||
212 | self.hbox.remove(self.createcardpanel) | |
213 | self.hbox.remove(self.cardlist) | |
214 | self.hbox.pack_start(self.scoreboard, False, False) | |
215 | self.hbox.pack_start(self.table) | |
238 | 216 | self.play_mode = True |
239 | else: | |
240 | if self.play_mode: | |
241 | self.hbox.remove(self.scoreboard) | |
242 | self.hbox.remove(self.table) | |
243 | self.hbox.pack_start(self.createcardpanel) | |
244 | self.hbox.pack_start(self.cardlist, False, False) | |
245 | self.play_mode = False | |
246 | 217 | |
247 | 218 | def restart(self, widget): |
248 | 219 | self.game.reset() |
170 | 170 | # Saves the zip in datastore |
171 | 171 | gameObject = datastore.create() |
172 | 172 | gameObject.metadata['title'] = game_name |
173 | gameObject.metadata['mime_type'] = 'application/memorizegame' | |
173 | gameObject.metadata['mime_type'] = 'application/x-memorize-project' | |
174 | 174 | gameObject.metadata['icon-color'] = profile.get_color().to_string() |
175 | 175 | gameObject.file_path = join(temp_folder, 'game.zip') |
176 | 176 | datastore.write(gameObject) |
79 | 79 | separator2.set_draw(True) |
80 | 80 | self.insert(separator2, -1) |
81 | 81 | |
82 | self._add_widget(gtk.Label(_('Game name: '))) | |
82 | self._add_widget(gtk.Label(_('Game name') + ': ')) | |
83 | 83 | self.game_name_entry = gtk.Entry() |
84 | 84 | self._add_widget(self.game_name_entry) |
85 | 85 |
Binary diff not shown
20 | 20 | import gobject |
21 | 21 | from os.path import join, dirname |
22 | 22 | |
23 | from gettext import gettext as _ | |
23 | 24 | from sugar import profile |
24 | 25 | from dbus.service import method, signal |
25 | 26 | from dbus.gobject_service import ExportedGObject |
99 | 100 | logging.error(' Reading setup file %s'%game_name) |
100 | 101 | |
101 | 102 | def load_remote(self, grid, data, mode, signal = False): |
102 | self.set_load_mode('Loading game...') | |
103 | self.set_load_mode(_('Loading game...')) | |
103 | 104 | self.model.grid = grid |
104 | 105 | self.model.data = data |
105 | 106 | self.model.data['mode'] = mode |
42 | 42 | inkscape:window-height="871" |
43 | 43 | inkscape:window-width="1432" |
44 | 44 | inkscape:pageshadow="2" |
45 | inkscape:pageopacity="0.0" | |
45 | inkscape:pageopacity="0.96862745" | |
46 | 46 | guidetolerance="10.0" |
47 | 47 | gridtolerance="10.0" |
48 | 48 | objecttolerance="10.0" |
49 | 49 | borderopacity="1.0" |
50 | 50 | bordercolor="#666666" |
51 | pagecolor="#ffffff" | |
51 | pagecolor="#4b4b4b" | |
52 | 52 | id="base" |
53 | 53 | inkscape:zoom="12.145455" |
54 | 54 | inkscape:cx="27.5" |
93 | 93 | x1="13.209" /></g><g |
94 | 94 | id="g4140" |
95 | 95 | transform="matrix(0.8372116,0,0,0.8372116,8.751416,-7.2720533e-2)"><rect |
96 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
96 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.79166174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
97 | 97 | id="rect2221" |
98 | 98 | height="5.0509453" |
99 | 99 | width="5.0529833" |
100 | y="2.5764074" | |
101 | x="32.505089" /><rect | |
100 | y="2.5762157" | |
101 | x="32.743912" /><rect | |
102 | 102 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" |
103 | 103 | id="rect2223" |
104 | 104 | height="5.0509453" |
105 | 105 | width="5.0529833" |
106 | 106 | y="2.5764074" |
107 | 107 | x="40.25333" /><rect |
108 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" | |
108 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" | |
109 | 109 | id="rect2225" |
110 | 110 | height="5.0509453" |
111 | 111 | width="5.0529833" |
112 | 112 | y="2.5764074" |
113 | 113 | x="47.70649" /><rect |
114 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" | |
114 | style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.79166174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
115 | 115 | id="rect2227" |
116 | 116 | height="5.0509453" |
117 | 117 | width="5.0529833" |
118 | y="10.110903" | |
119 | x="32.505089" /><rect | |
120 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" | |
118 | y="10.110711" | |
119 | x="32.743912" /><rect | |
120 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.79166174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
121 | 121 | id="rect2229" |
122 | 122 | height="5.0509453" |
123 | 123 | width="5.0529833" |
124 | y="10.110903" | |
124 | y="17.624184" | |
125 | 125 | x="40.25333" /><rect |
126 | 126 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" |
127 | 127 | id="rect2231" |
129 | 129 | width="5.0529833" |
130 | 130 | y="10.110903" |
131 | 131 | x="47.70649" /><rect |
132 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" | |
132 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.79166174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
133 | 133 | id="rect2233" |
134 | 134 | height="5.0509453" |
135 | 135 | width="5.0529833" |
136 | y="17.624184" | |
137 | x="32.505089" /><rect | |
138 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
136 | y="17.623993" | |
137 | x="32.743912" /><rect | |
138 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.79166174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
139 | 139 | id="rect2235" |
140 | 140 | height="5.0509453" |
141 | 141 | width="5.0529833" |
142 | y="17.624184" | |
142 | y="10.110903" | |
143 | 143 | x="40.25333" /><rect |
144 | 144 | style="fill:#404040;stroke:#ffffff;stroke-width:1.79166175;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" |
145 | 145 | id="rect2237" |
24 | 24 | rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type |
25 | 25 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs |
26 | 26 | id="defs2240" /><sodipodi:namedview |
27 | inkscape:window-height="871" | |
28 | inkscape:window-width="1432" | |
27 | inkscape:window-height="879" | |
28 | inkscape:window-width="1440" | |
29 | 29 | inkscape:pageshadow="2" |
30 | inkscape:pageopacity="0.0" | |
30 | inkscape:pageopacity="1" | |
31 | 31 | guidetolerance="10.0" |
32 | 32 | gridtolerance="10.0" |
33 | 33 | objecttolerance="10.0" |
34 | 34 | borderopacity="1.0" |
35 | 35 | bordercolor="#666666" |
36 | pagecolor="#ffffff" | |
36 | pagecolor="#4b4b4b" | |
37 | 37 | id="base" |
38 | 38 | inkscape:zoom="15.637993" |
39 | 39 | inkscape:cx="21.792" |
40 | inkscape:cy="21.646" | |
41 | inkscape:window-x="4" | |
42 | inkscape:window-y="25" | |
43 | inkscape:current-layer="Icon" /> | |
40 | inkscape:cy="26.761746" | |
41 | inkscape:window-x="0" | |
42 | inkscape:window-y="21" | |
43 | inkscape:current-layer="Icon" | |
44 | showguides="true" | |
45 | inkscape:guide-bbox="true" /> | |
44 | 46 | <rect |
45 | 47 | x="1.5007635" |
46 | 48 | y="1.5007635" |
55 | 57 | height="8.5757914" |
56 | 58 | id="rect2223" |
57 | 59 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> |
60 | ||
61 | ||
58 | 62 | <rect |
59 | x="27.300175" | |
60 | y="1.5007635" | |
61 | width="8.5757914" | |
62 | height="8.5757914" | |
63 | id="rect2225" | |
64 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> | |
65 | <rect | |
66 | x="1.5007635" | |
67 | y="14.293271" | |
68 | width="8.5757914" | |
69 | height="8.5757914" | |
70 | id="rect2227" | |
71 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> | |
72 | <rect | |
73 | x="14.650882" | |
74 | y="14.293271" | |
63 | x="14.522763" | |
64 | y="27.082636" | |
75 | 65 | width="8.5757914" |
76 | 66 | height="8.5757914" |
77 | 67 | id="rect2229" |
78 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> | |
68 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1" /> | |
79 | 69 | <rect |
80 | 70 | x="27.300175" |
81 | y="14.293271" | |
71 | y="14.320445" | |
82 | 72 | width="8.5757914" |
83 | 73 | height="8.5757914" |
84 | 74 | id="rect2231" |
85 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> | |
75 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1" /> | |
86 | 76 | <rect |
87 | 77 | x="1.5007635" |
88 | 78 | y="27.049763" |
91 | 81 | id="rect2233" |
92 | 82 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> |
93 | 83 | <rect |
94 | x="14.650882" | |
95 | y="27.049763" | |
84 | x="14.522988" | |
85 | y="14.320445" | |
96 | 86 | width="8.5757914" |
97 | 87 | height="8.5757914" |
98 | 88 | id="rect2235" |
103 | 93 | width="8.5757914" |
104 | 94 | height="8.5757914" |
105 | 95 | id="rect2237" |
106 | style="fill:#404040;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1;fill-opacity:1" /> | |
96 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1" /> | |
107 | 97 | <g |
108 | 98 | id="g8128" |
109 | 99 | transform="matrix(1.1533304,0,0,1.1849266,74.491613,11.842114)" |
123 | 113 | sodipodi:nodetypes="cccccc" |
124 | 114 | id="path6171" |
125 | 115 | d="M -29.403233,14.298603 L -34.71123,18.835357 L -39.352442,24.018753 L -33.959691,19.472367 L -29.449186,14.344555 L -34.702238,18.923135" |
126 | style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;marker-start:none;stroke-opacity:1" /></g></svg>⏎ | |
116 | style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;marker-start:none;stroke-opacity:1" /></g><rect | |
117 | x="1.5007635" | |
118 | y="14.320629" | |
119 | width="8.5757914" | |
120 | height="8.5757914" | |
121 | id="rect2337" | |
122 | style="fill:#ffffff;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1" /><rect | |
123 | x="27.299765" | |
124 | y="1.5004449" | |
125 | width="8.5757914" | |
126 | height="8.5757914" | |
127 | id="rect2339" | |
128 | style="fill:#ffffff;stroke:#ffffff;stroke-width:3.00152707;stroke-opacity:1" /></svg>⏎ |
42 | 42 | inkscape:window-height="871" |
43 | 43 | inkscape:window-width="1432" |
44 | 44 | inkscape:pageshadow="2" |
45 | inkscape:pageopacity="0.0" | |
45 | inkscape:pageopacity="1" | |
46 | 46 | guidetolerance="10.0" |
47 | 47 | gridtolerance="10.0" |
48 | 48 | objecttolerance="10.0" |
49 | 49 | borderopacity="1.0" |
50 | 50 | bordercolor="#666666" |
51 | pagecolor="#ffffff" | |
51 | pagecolor="#4b4b4b" | |
52 | 52 | id="base" |
53 | 53 | inkscape:zoom="12.145455" |
54 | 54 | inkscape:cx="27.5" |
111 | 111 | id="rect2221" |
112 | 112 | height="4.2287102" |
113 | 113 | width="4.2304163" |
114 | y="1.6075182" | |
115 | x="36.39415" /><rect | |
114 | y="2.0430667" | |
115 | x="36.411789" /><rect | |
116 | 116 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
117 | 117 | id="rect2223" |
118 | 118 | height="4.2287102" |
119 | 119 | width="4.2304163" |
120 | y="1.6075182" | |
121 | x="42.881065" /><rect | |
122 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
120 | y="2.0432274" | |
121 | x="42.698757" /><rect | |
122 | style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
123 | 123 | id="rect2225" |
124 | 124 | height="4.2287102" |
125 | 125 | width="4.2304163" |
126 | y="1.6075182" | |
127 | x="49.120937" /><rect | |
128 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
126 | y="2.0432274" | |
127 | x="48.938633" /><rect | |
128 | style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
129 | 129 | id="rect2227" |
130 | 130 | height="4.2287102" |
131 | 131 | width="4.2304163" |
132 | y="7.9154854" | |
133 | x="36.39415" /><rect | |
132 | y="8.3510332" | |
133 | x="36.411789" /><rect | |
134 | 134 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
135 | 135 | id="rect2229" |
136 | 136 | height="4.2287102" |
137 | 137 | width="4.2304163" |
138 | y="7.9154854" | |
139 | x="42.881065" /><rect | |
138 | y="14.641401" | |
139 | x="42.698757" /><rect | |
140 | 140 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
141 | 141 | id="rect2231" |
142 | 142 | height="4.2287102" |
143 | 143 | width="4.2304163" |
144 | y="7.9154854" | |
145 | x="49.120937" /><rect | |
144 | y="8.3511934" | |
145 | x="48.938633" /><rect | |
146 | 146 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
147 | 147 | id="rect2233" |
148 | 148 | height="4.2287102" |
149 | 149 | width="4.2304163" |
150 | y="14.20569" | |
151 | x="36.39415" /><rect | |
150 | y="14.641241" | |
151 | x="36.411789" /><rect | |
152 | 152 | style="fill:#ffffff;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
153 | 153 | id="rect2235" |
154 | 154 | height="4.2287102" |
155 | 155 | width="4.2304163" |
156 | y="14.20569" | |
157 | x="42.881065" /><rect | |
156 | y="8.3511934" | |
157 | x="42.698757" /><rect | |
158 | 158 | style="fill:#404040;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
159 | 159 | id="rect2237" |
160 | 160 | height="4.2287102" |
161 | 161 | width="4.2304163" |
162 | y="14.20569" | |
163 | x="49.120937" /></svg>⏎ | |
162 | y="14.641401" | |
163 | x="48.938633" /></svg>⏎ |
Binary diff not shown
33 | 33 | |
34 | 34 | standard_game_names = ['Load demo games', |
35 | 35 | 'addition', |
36 | 'capitals', | |
37 | 'drumgit', | |
38 | 36 | 'letters', |
39 | 'numbers', | |
40 | 'phonemes' | |
41 | 37 | ] |
42 | 38 | translated_game_names = [_('Load demo games'), |
43 | 39 | _('addition'), |
44 | _('capitals'), | |
45 | _('drumgit'), | |
46 | 40 | _('letters'), |
47 | _('numbers'), | |
48 | _('phonemes') | |
49 | 41 | ] |
50 | 42 | |
51 | 43 | __gsignals__ = { |
24 | 24 | from dbus.service import method, signal |
25 | 25 | from dbus.gobject_service import ExportedGObject |
26 | 26 | from sugar.datastore import datastore |
27 | from gettext import gettext as _ | |
27 | 28 | |
28 | 29 | SERVICE = 'org.laptop.Memorize' |
29 | 30 | IFACE = SERVICE |
175 | 176 | self.f.write(bytes) |
176 | 177 | |
177 | 178 | percentage = int(float(part) / float(numparts) * 100.0) |
178 | self.game.set_load_mode('Receiving game: '+str(percentage)+'% done.') | |
179 | self.game.set_load_mode(_('Receiving game') + ': ' + str(percentage) + '% ' + _('done') + '.') | |
179 | 180 | |
180 | 181 | # last chunk |
181 | 182 | if part == numparts: |
184 | 185 | # Saves the zip in datastore |
185 | 186 | gameObject = datastore.create() |
186 | 187 | gameObject.metadata['title'] = title |
187 | gameObject.metadata['mime_type'] = 'application/memorizegame' | |
188 | gameObject.metadata['mime_type'] = 'application/x-memorize-project' | |
188 | 189 | gameObject.metadata['icon-color'] = color |
189 | 190 | gameObject.file_path = self.temp_file |
190 | 191 | datastore.write(gameObject) |
329 | 329 | # Saves the zip in datastore |
330 | 330 | gameObject = datastore.create() |
331 | 331 | gameObject.metadata['title'] = title |
332 | gameObject.metadata['mime_type'] = 'application/memorizegame' | |
332 | gameObject.metadata['mime_type'] = 'application/x-memorize-project' | |
333 | 333 | gameObject.metadata['icon-color'] = color |
334 | 334 | gameObject.file_path = path |
335 | 335 | datastore.write(gameObject) |
0 | msgid "" | |
1 | msgstr "" | |
2 | "Project-Id-Version: PACKAGE VERSION\n" | |
3 | "POT-Creation-Date:2007-08-31 16:33-0300 \n" | |
4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
5 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
6 | "Language-Team: LANGUAGE <LL@li.org>\n" | |
7 | "MIME-Version: 1.0\n" | |
8 | "Content-Type: text/plain; charset=utf-8\n" | |
9 | "Content-Transfer-Encoding: 8bit\n" | |
10 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:53 | |
11 | msgid "Memorize Activity" | |
12 | msgstr "" | |
13 | ||
14 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:67 | |
15 | msgid "Games" | |
16 | msgstr "" | |
17 | ||
18 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
19 | msgid "addition" | |
20 | msgstr "" | |
21 | ||
22 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
23 | msgid "capitals" | |
24 | msgstr "" | |
25 | ||
26 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
27 | msgid "drumgit" | |
28 | msgstr "" | |
29 | ||
30 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
31 | msgid "letters" | |
32 | msgstr "" | |
33 | ||
34 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
35 | msgid "numbers" | |
36 | msgstr "" | |
37 | ||
38 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
39 | msgid "phonemes" | |
40 | msgstr "" |
0 | msgid "" | |
1 | msgstr "" | |
2 | "Project-Id-Version: PACKAGE VERSION\n" | |
3 | "POT-Creation-Date:2007-08-31 16:33-0300 \n" | |
4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
5 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
6 | "Language-Team: LANGUAGE <LL@li.org>\n" | |
7 | "MIME-Version: 1.0\n" | |
8 | "Content-Type: text/plain; charset=utf-8\n" | |
9 | "Content-Transfer-Encoding: 8bit\n" | |
10 | ||
11 | #: /home/msgodoi/olpc/workspace/Memorize.activity/game.py:103 | |
12 | msgid "Loading game..." | |
13 | msgstr "" | |
14 | ||
15 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:43 | |
16 | msgid "Load demo games" | |
17 | msgstr "" | |
18 | ||
19 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:44 | |
20 | msgid "addition" | |
21 | msgstr "" | |
22 | ||
23 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:45 | |
24 | msgid "capitals" | |
25 | msgstr "" | |
26 | ||
27 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:46 | |
28 | msgid "drumgit" | |
29 | msgstr "" | |
30 | ||
31 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:47 | |
32 | msgid "letters" | |
33 | msgstr "" | |
34 | ||
35 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:48 | |
36 | msgid "numbers" | |
37 | msgstr "" | |
38 | ||
39 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:49 | |
40 | msgid "phonemes" | |
41 | msgstr "" | |
42 | ||
43 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:69 | |
44 | msgid "Restart Game" | |
45 | msgstr "" | |
46 | ||
47 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:79 | |
48 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:63 | |
49 | msgid "Load game" | |
50 | msgstr "" | |
51 | ||
52 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:123 | |
53 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:116 | |
54 | msgid "Choose memorize game" | |
55 | msgstr "" | |
56 | ||
57 | #: /home/msgodoi/olpc/workspace/Memorize.activity/messenger.py:180 | |
58 | msgid "Receiving game" | |
59 | msgstr "" | |
60 | ||
61 | #: /home/msgodoi/olpc/workspace/Memorize.activity/messenger.py:180 | |
62 | msgid "done" | |
63 | msgstr "" | |
64 | ||
65 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:70 | |
66 | msgid "Create" | |
67 | msgstr "" | |
68 | ||
69 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:74 | |
70 | msgid "Play" | |
71 | msgstr "" | |
72 | ||
73 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:50 | |
74 | msgid "Add as new pair" | |
75 | msgstr "" | |
76 | ||
77 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:58 | |
78 | msgid "Update selected pair" | |
79 | msgstr "" | |
80 | ||
81 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:175 | |
82 | msgid "Preview:" | |
83 | msgstr "" | |
84 | ||
85 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:177 | |
86 | msgid "Text:" | |
87 | msgstr "" | |
88 | ||
89 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:238 | |
90 | msgid "Choose image" | |
91 | msgstr "" | |
92 | ||
93 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createcardpanel.py:258 | |
94 | msgid "Choose audio" | |
95 | msgstr "" | |
96 | ||
97 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:53 | |
98 | msgid "New game" | |
99 | msgstr "" | |
100 | ||
101 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:73 | |
102 | msgid "Save game" | |
103 | msgstr "" | |
104 | ||
105 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:83 | |
106 | msgid "Game name" | |
107 | msgstr "" | |
108 | ||
109 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:87 | |
110 | msgid "Equal pairs" | |
111 | msgstr "" | |
112 | ||
113 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:99 | |
114 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:158 | |
115 | msgid "Click for grouped game" | |
116 | msgstr "" | |
117 | ||
118 | #: /home/msgodoi/olpc/workspace/Memorize.activity/createtoolbar.py:154 | |
119 | msgid "Click for ungrouped game" | |
120 | msgstr "" |
0 | msgid "" | |
1 | msgstr "" | |
2 | "Project-Id-Version: Memorize\n" | |
3 | "POT-Creation-Date: \n" | |
4 | "PO-Revision-Date: 2007-08-31 16:28-0300\n" | |
5 | "Last-Translator: Muriel de Souza Godoi <muriel@laptop.org>\n" | |
6 | "Language-Team: Muriel de Souza Godoi <muriel@laptop.org>\n" | |
7 | "MIME-Version: 1.0\n" | |
8 | "Content-Type: text/plain; charset=utf-8\n" | |
9 | "Content-Transfer-Encoding: 8bit\n" | |
10 | "X-Poedit-Language: English\n" | |
11 | "X-Poedit-Country: UNITED STATES\n" | |
12 | "X-Poedit-SourceCharset: utf-8\n" | |
13 | "X-Poedit-KeywordsList: _\n" | |
14 | "X-Poedit-Basepath: .\n" | |
15 | "X-Poedit-SearchPath-0: /home/msgodoi/olpc/workspace/Memorize.activity\n" | |
16 | ||
17 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:53 | |
18 | msgid "Memorize Activity" | |
19 | msgstr "Jogo da Memória" | |
20 | ||
21 | #: /home/msgodoi/olpc/workspace/Memorize.activity/activity.py:67 | |
22 | msgid "Games" | |
23 | msgstr "Jogos" | |
24 | ||
25 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
26 | msgid "addition" | |
27 | msgstr "adição" | |
28 | ||
29 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
30 | msgid "capitals" | |
31 | msgstr "capitais" | |
32 | ||
33 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
34 | msgid "drumgit" | |
35 | msgstr "drumgit" | |
36 | ||
37 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
38 | msgid "letters" | |
39 | msgstr "letras" | |
40 | ||
41 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
42 | msgid "numbers" | |
43 | msgstr "números" | |
44 | ||
45 | #: /home/msgodoi/olpc/workspace/Memorize.activity/memorizetoolbar.py:33 | |
46 | msgid "phonemes" | |
47 | msgstr "sílabas" | |
48 |