Merge lp://staging/~vaudano/babiloo/efl into lp://staging/babiloo
- efl
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~vaudano/babiloo/efl |
Merge into: | lp://staging/babiloo |
Diff against target: |
2582 lines (+2149/-10) 48 files modified
.bzrignore (+34/-0) core/dictionary/pystardict.py (+31/-2) core/modules/configuration.py (+2/-0) core/modules/constants.py (+22/-0) core/modules/status.py (+70/-0) debian/babiloo.install (+7/-0) debian/babiloo.links (+1/-0) debian/babiloo.manpages (+1/-0) debian/babiloo.menu (+5/-0) debian/changelog (+52/-0) debian/compat (+1/-0) debian/control (+20/-0) debian/copyright (+84/-0) debian/rules (+27/-0) debian/watch (+3/-0) doc/efl/babiloo.tex (+28/-0) doc/efl/configuration.tex (+12/-0) doc/efl/dictTest/stardict-longman-2.4.2/longman.ifo (+8/-0) doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.ifo (+7/-0) doc/efl/frontPage.tex (+3/-0) doc/efl/genDoc.sh (+2/-0) doc/efl/installation.tex (+34/-0) doc/efl/intro.tex (+4/-0) doc/efl/planning.tex (+125/-0) doc/efl/source.tex (+7/-0) doc/efl/version0.1.tex (+38/-0) doc/efl/version0.2.tex (+39/-0) doc/efl/version0.3.tex (+23/-0) doc/efl/version0.4.tex (+15/-0) efl/__init__.py (+21/-0) efl/about_ui.py (+124/-0) efl/babiloo-efl.bb (+41/-0) efl/babiloo.desktop (+11/-0) efl/config.py (+56/-0) efl/constants.py (+67/-0) efl/definition_ui.py (+173/-0) efl/dictionaries_ui.py (+196/-0) efl/main.py (+48/-0) efl/main_model.py (+352/-0) efl/main_ui.py (+117/-0) efl/settings_ui.py (+140/-0) efl/utils_ui.py (+77/-0) qt/about_ui.py (+2/-2) qt/chooseLanguage_ui.py (+2/-2) qt/images_rc.py (+1/-1) qt/main_ui.py (+1/-1) qt/settings_ui.py (+2/-2) run.py (+13/-0) |
To merge this branch: | bzr merge lp://staging/~vaudano/babiloo/efl |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Developers of the Babiloo Project | Pending | ||
Review via email: mp+11119@code.staging.launchpad.net |
Commit message
Description of the change
- 266. By Luca Vaudano <vaudano@debian-navi>
-
Database not found error
- 267. By Luca Vaudano <vaudano@debian-navi>
-
ecore.idler_add doesn't work well on desktop
- 268. By Luca Vaudano <vaudano@debian-navi>
-
Comment
- 269. By Luca Vaudano <vaudano@debian-navi>
-
Nicer file structure (gui, controller, model)
- 270. By Luca Vaudano <vaudano@debian-navi>
-
Fix loading database frame
- 271. By Luca Vaudano <vaudano@debian-navi>
-
Fix loading frame problem
- 272. By Luca Vaudano <vaudano@debian-navi>
-
Empty windows for Settings and Dictionaries, configuration file not present error
- 273. By Luca Vaudano <vaudano@debian-navi>
-
Start the program without database, it shows warning not error
- 274. By zeusOne <zeusone@maggie>
-
Fix UI for Netbook
- 275. By zeusOne <zeusone@maggie>
-
Working on the dictionaries tab
- 276. By Luca Vaudano <vaudano@debian-navi>
-
Dictionaries tab - New dictionary via file selector
- 277. By Luca Vaudano <vaudano@debian-navi>
-
New configuration management - not working :)
- 278. By Luca Vaudano <vaudano@debian-navi>
-
New configuration mechanism merged
- 279. By Luca Vaudano <vaudano@debian-navi>
-
Adapt for using Progress Bar, touched the pyStarDict file
- 280. By root <root@maggie>
-
Sound dictionary configuration
- 281. By Luca Vaudano <vaudano@debian-navi>
-
Added documentation and released files
- 282. By zeusOne <zeusone@maggie>
-
No progress bar
- 283. By Luca Vaudano <vaudano@debian-navi>
-
Dictionaries for performance testing
- 284. By Luca Vaudano <vaudano@debian-navi>
-
Move files to the doc directory
- 285. By zeusOne <zeusone@maggie>
-
Validation dictionary entry, sound dictionary entry, using dialog for loading frame
- 286. By zeusOne <zeusone@maggie>
-
Pager instead of multiple windows
- 287. By Luca Vaudano <vaudano@debian-navi>
-
Settings - Player and about page
- 288. By Luca Vaudano <vaudano@debian-navi>
-
One page different boxes - No pager
- 289. By Luca Vaudano <vaudano@debian-navi>
-
Released file and images for v0.2
- 290. By Luca Vaudano <vaudano@debian-navi>
-
Fix - Sound setting problem
- 291. By Luca Vaudano <vaudano@debian-navi>
-
Alignment with new elm-entry behaviout without br
- 292. By Luca Vaudano <vaudano@debian-navi>
-
Fix bug - Dialog always on top
- 293. By Luca Vaudano <vaudano@debian-navi>
-
New released file 2.0.9-2b
- 294. By Luca Vaudano <vaudano@debian-navi>
-
2.0.9-3 version
- 295. By Luca Vaudano <vaudano@debian-navi>
-
Changed source tarball position
- 296. By Luca Vaudano <vaudano@debian-navi>
-
Version 2.0.9-4 python-elementary alignment
- 297. By Luca Vaudano <vaudano@debian-navi>
-
Updated documentation
- 298. By Elive User <luca@Elive>
-
New release
- 299. By Elive User <luca@Elive>
-
New release
- 300. By Luca Vaudano <vaudano@debian-navi>
-
Final release
Unmerged revisions
- 300. By Luca Vaudano <vaudano@debian-navi>
-
Final release
- 299. By Elive User <luca@Elive>
-
New release
- 298. By Elive User <luca@Elive>
-
New release
- 297. By Luca Vaudano <vaudano@debian-navi>
-
Updated documentation
- 296. By Luca Vaudano <vaudano@debian-navi>
-
Version 2.0.9-4 python-elementary alignment
- 295. By Luca Vaudano <vaudano@debian-navi>
-
Changed source tarball position
- 294. By Luca Vaudano <vaudano@debian-navi>
-
2.0.9-3 version
- 293. By Luca Vaudano <vaudano@debian-navi>
-
New released file 2.0.9-2b
- 292. By Luca Vaudano <vaudano@debian-navi>
-
Fix bug - Dialog always on top
- 291. By Luca Vaudano <vaudano@debian-navi>
-
Alignment with new elm-entry behaviout without br
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2009-03-09 00:05:55 +0000 | |||
3 | +++ .bzrignore 2010-02-08 17:08:17 +0000 | |||
4 | @@ -5,3 +5,37 @@ | |||
5 | 5 | dicts/en_vi | 5 | dicts/en_vi |
6 | 6 | dicts/vi_en | 6 | dicts/vi_en |
7 | 7 | dicts/vi_vi | 7 | dicts/vi_vi |
8 | 8 | *.debhelper | ||
9 | 9 | *.log | ||
10 | 10 | debian/babiloo | ||
11 | 11 | debian/files | ||
12 | 12 | debian/babiloo.substvars | ||
13 | 13 | qt | ||
14 | 14 | qt/about.py | ||
15 | 15 | qt/about.ui | ||
16 | 16 | qt/about_ui.py | ||
17 | 17 | qt/chooseLanguage.py | ||
18 | 18 | qt/chooseLanguage.ui | ||
19 | 19 | qt/chooseLanguage_ui.py | ||
20 | 20 | qt/contentSearchModel.py | ||
21 | 21 | qt/definitionView.py | ||
22 | 22 | qt/dictfilemanager.py | ||
23 | 23 | qt/dictionariesview.py | ||
24 | 24 | qt/gui_widgets.py | ||
25 | 25 | qt/historylistmodel.py | ||
26 | 26 | qt/images_rc.py | ||
27 | 27 | qt/__init__.py | ||
28 | 28 | qt/main.py | ||
29 | 29 | qt/main.ui | ||
30 | 30 | qt/main_ui.py | ||
31 | 31 | qt/Makefile | ||
32 | 32 | qt/onlineDictionariesView.py | ||
33 | 33 | qt/plugins | ||
34 | 34 | qt/Qt2Po.py | ||
35 | 35 | qt/settings.py | ||
36 | 36 | qt/settings.ui | ||
37 | 37 | qt/settings_ui.py | ||
38 | 38 | qt/SplashScreen.py | ||
39 | 39 | qt/wordlistmodel.py | ||
40 | 40 | *.aux | ||
41 | 41 | *.log | ||
42 | 8 | 42 | ||
43 | === modified file 'core/dictionary/pystardict.py' | |||
44 | --- core/dictionary/pystardict.py 2009-05-25 12:31:48 +0000 | |||
45 | +++ core/dictionary/pystardict.py 2010-02-08 17:08:17 +0000 | |||
46 | @@ -26,6 +26,9 @@ | |||
47 | 26 | from dictionary import DictionaryType, DictFormatError, Definition | 26 | from dictionary import DictionaryType, DictFormatError, Definition |
48 | 27 | import core.modules.utils as utils | 27 | import core.modules.utils as utils |
49 | 28 | 28 | ||
50 | 29 | from core.modules.constants import * | ||
51 | 30 | from core.modules.status import Status | ||
52 | 31 | |||
53 | 29 | try: | 32 | try: |
54 | 30 | from hashlib import md5 | 33 | from hashlib import md5 |
55 | 31 | new_hash = md5 | 34 | new_hash = md5 |
56 | @@ -34,6 +37,10 @@ | |||
57 | 34 | import md5 | 37 | import md5 |
58 | 35 | new_hash = md5.new | 38 | new_hash = md5.new |
59 | 36 | 39 | ||
60 | 40 | if PROGRESS_BAR == "on": | ||
61 | 41 | status = Status() | ||
62 | 42 | status.setSteps(2) | ||
63 | 43 | |||
64 | 37 | class _StarDictIfo(): | 44 | class _StarDictIfo(): |
65 | 38 | """ | 45 | """ |
66 | 39 | The .ifo file has the following format: | 46 | The .ifo file has the following format: |
67 | @@ -174,12 +181,23 @@ | |||
68 | 174 | raise Exception('words count is incorrect') | 181 | raise Exception('words count is incorrect') |
69 | 175 | 182 | ||
70 | 176 | # unpack parsed records | 183 | # unpack parsed records |
71 | 184 | if PROGRESS_BAR == "on": | ||
72 | 185 | tot = len(matched_records) | ||
73 | 186 | i = 0 | ||
74 | 187 | perc = 0 | ||
75 | 177 | for matched_record in matched_records: | 188 | for matched_record in matched_records: |
76 | 189 | if PROGRESS_BAR == "on": | ||
77 | 190 | currentPerc = (i * MAX_SINGLE_STEP) / tot | ||
78 | 191 | if currentPerc != perc: | ||
79 | 192 | perc = currentPerc | ||
80 | 193 | status.setStatus(0, perc) | ||
81 | 194 | i = i + 1 | ||
82 | 178 | c = matched_record.find('\x00') + 1 | 195 | c = matched_record.find('\x00') + 1 |
83 | 179 | record_tuple = unpack('!%sc%sL' % (c, idx_offset_format), | 196 | record_tuple = unpack('!%sc%sL' % (c, idx_offset_format), |
84 | 180 | matched_record) | 197 | matched_record) |
85 | 181 | word, cords = record_tuple[:c-1], record_tuple[c:] | 198 | word, cords = record_tuple[:c-1], record_tuple[c:] |
87 | 182 | self._idx[word] = cords | 199 | self._idx[word] = cords |
88 | 200 | |||
89 | 183 | 201 | ||
90 | 184 | def __getitem__(self, word): | 202 | def __getitem__(self, word): |
91 | 185 | """ | 203 | """ |
92 | @@ -461,15 +479,26 @@ | |||
93 | 461 | 479 | ||
94 | 462 | #Sorting keys | 480 | #Sorting keys |
95 | 463 | self._DictionaryType__keys = self.keys() | 481 | self._DictionaryType__keys = self.keys() |
97 | 464 | self._DictionaryType__keys.sort(utils.normalized_comparison) | 482 | if STARDICT_SORT_KEY == "on": |
98 | 483 | self._DictionaryType__keys.sort(utils.normalized_comparison) | ||
99 | 465 | # print self.idx._idx.keys() | 484 | # print self.idx._idx.keys() |
100 | 466 | 485 | ||
101 | 467 | def keys(self): | 486 | def keys(self): |
102 | 468 | """ | 487 | """ |
103 | 469 | raises NotImplemented exception | 488 | raises NotImplemented exception |
104 | 470 | """ | 489 | """ |
105 | 490 | if PROGRESS_BAR == "on": | ||
106 | 491 | tot = len(self.dict.keys()) | ||
107 | 492 | i = 0 | ||
108 | 493 | perc = 0 | ||
109 | 471 | keys = [] | 494 | keys = [] |
110 | 472 | for tupled_word in self.dict.keys(): | 495 | for tupled_word in self.dict.keys(): |
111 | 496 | if PROGRESS_BAR == "on": | ||
112 | 497 | currentPerc = (i * MAX_SINGLE_STEP) / tot | ||
113 | 498 | if currentPerc != perc: | ||
114 | 499 | perc = currentPerc | ||
115 | 500 | status.setStatus(1, perc) | ||
116 | 501 | i = i + 1 | ||
117 | 473 | try: | 502 | try: |
118 | 474 | keys.append("".join(tupled_word).decode(self.encoding)) | 503 | keys.append("".join(tupled_word).decode(self.encoding)) |
119 | 475 | except: | 504 | except: |
120 | 476 | 505 | ||
121 | === modified file 'core/modules/configuration.py' | |||
122 | --- core/modules/configuration.py 2009-03-28 01:13:40 +0000 | |||
123 | +++ core/modules/configuration.py 2010-02-08 17:08:17 +0000 | |||
124 | @@ -37,6 +37,8 @@ | |||
125 | 37 | # internal application options | 37 | # internal application options |
126 | 38 | make_option("-g", "--gui", dest="mode", action="store_const", const="gui", #default="cli", | 38 | make_option("-g", "--gui", dest="mode", action="store_const", const="gui", #default="cli", |
127 | 39 | help="Run applicatin in GUI mode. This is the default"), | 39 | help="Run applicatin in GUI mode. This is the default"), |
128 | 40 | make_option("-e", "--efl", dest="mode", action="store_const", const="efl", default="gui", | ||
129 | 41 | help="Run applicatin in EFL mode"), | ||
130 | 40 | make_option("-c", "--cli", dest="mode", action="store_const", const="cli", default="gui", | 42 | make_option("-c", "--cli", dest="mode", action="store_const", const="cli", default="gui", |
131 | 41 | help="Run applicatin in CLI mode"), | 43 | help="Run applicatin in CLI mode"), |
132 | 42 | make_option("-d", "--debug", dest="logging", default=logging.INFO, | 44 | make_option("-d", "--debug", dest="logging", default=logging.INFO, |
133 | 43 | 45 | ||
134 | === added file 'core/modules/constants.py' | |||
135 | --- core/modules/constants.py 1970-01-01 00:00:00 +0000 | |||
136 | +++ core/modules/constants.py 2010-02-08 17:08:17 +0000 | |||
137 | @@ -0,0 +1,22 @@ | |||
138 | 1 | #!/usr/bin/env python | ||
139 | 2 | # -*- coding: utf-8 -*- | ||
140 | 3 | |||
141 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
142 | 5 | # This program is free software; you can redistribute it and/or modify | ||
143 | 6 | # it under the terms of the GNU General Public License as published by | ||
144 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
145 | 8 | # (at your option) any later version. | ||
146 | 9 | # | ||
147 | 10 | # This program is distributed in the hope that it will be useful, | ||
148 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
149 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
150 | 13 | # GNU General Public License for more details. | ||
151 | 14 | # | ||
152 | 15 | # You should have received a copy of the GNU General Public License along | ||
153 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
154 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
155 | 18 | STARDICT_SORT_KEY = 'off' | ||
156 | 19 | |||
157 | 20 | # Progress bar | ||
158 | 21 | PROGRESS_BAR = 'off' # values: 'on' or 'off' | ||
159 | 22 | MAX_SINGLE_STEP = 25 # for sure less than 100! | ||
160 | 0 | \ No newline at end of file | 23 | \ No newline at end of file |
161 | 1 | 24 | ||
162 | === added file 'core/modules/status.py' | |||
163 | --- core/modules/status.py 1970-01-01 00:00:00 +0000 | |||
164 | +++ core/modules/status.py 2010-02-08 17:08:17 +0000 | |||
165 | @@ -0,0 +1,70 @@ | |||
166 | 1 | #!/usr/bin/env python | ||
167 | 2 | # -*- coding: utf-8 -*- | ||
168 | 3 | |||
169 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
170 | 5 | # This program is free software; you can redistribute it and/or modify | ||
171 | 6 | # it under the terms of the GNU General Public License as published by | ||
172 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
173 | 8 | # (at your option) any later version. | ||
174 | 9 | # | ||
175 | 10 | # This program is distributed in the hope that it will be useful, | ||
176 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
177 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
178 | 13 | # GNU General Public License for more details. | ||
179 | 14 | # | ||
180 | 15 | # You should have received a copy of the GNU General Public License along | ||
181 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
182 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
183 | 18 | from core.modules.constants import * | ||
184 | 19 | |||
185 | 20 | # Singleton | ||
186 | 21 | class Status: | ||
187 | 22 | |||
188 | 23 | class __impl: | ||
189 | 24 | |||
190 | 25 | # Initialization | ||
191 | 26 | def __init__(self): | ||
192 | 27 | status = 0 | ||
193 | 28 | steps = 1 | ||
194 | 29 | |||
195 | 30 | # Get status | ||
196 | 31 | def getStatus(self): | ||
197 | 32 | return status | ||
198 | 33 | |||
199 | 34 | # Set UI | ||
200 | 35 | def setUI(self, ui): | ||
201 | 36 | self.ui = ui | ||
202 | 37 | |||
203 | 38 | # Set steps to do | ||
204 | 39 | def setSteps(self, steps): | ||
205 | 40 | self.steps = steps | ||
206 | 41 | |||
207 | 42 | # Set status | ||
208 | 43 | def setStatus(self, step, value): | ||
209 | 44 | singleStepMax = 100 / self.steps | ||
210 | 45 | multiple = singleStepMax / MAX_SINGLE_STEP | ||
211 | 46 | status = (singleStepMax * step) + (value * multiple) | ||
212 | 47 | if self.ui is not None: | ||
213 | 48 | self.ui.setStatus(status) | ||
214 | 49 | |||
215 | 50 | # storage for the instance reference | ||
216 | 51 | __instance = None | ||
217 | 52 | |||
218 | 53 | def __init__(self): | ||
219 | 54 | |||
220 | 55 | # Check whether we already have an instance | ||
221 | 56 | if Status.__instance is None: | ||
222 | 57 | |||
223 | 58 | # Create instance | ||
224 | 59 | Status.__instance = Status.__impl() | ||
225 | 60 | |||
226 | 61 | # Store instance reference as the only member in the handle | ||
227 | 62 | self.__dict__['_Singleton__instance'] = Status.__instance | ||
228 | 63 | |||
229 | 64 | def __getattr__(self, attr): | ||
230 | 65 | """ Delegate access to implementation """ | ||
231 | 66 | return getattr(self.__instance, attr) | ||
232 | 67 | |||
233 | 68 | def __setattr__(self, attr, value): | ||
234 | 69 | """ Delegate access to implementation """ | ||
235 | 70 | return setattr(self.__instance, attr, value) | ||
236 | 0 | 71 | ||
237 | === added directory 'debian' | |||
238 | === added file 'debian/babiloo.install' | |||
239 | --- debian/babiloo.install 1970-01-01 00:00:00 +0000 | |||
240 | +++ debian/babiloo.install 2010-02-08 17:08:17 +0000 | |||
241 | @@ -0,0 +1,7 @@ | |||
242 | 1 | efl /usr/share/babiloo | ||
243 | 2 | core /usr/share/babiloo | ||
244 | 3 | images /usr/share/babiloo | ||
245 | 4 | dicts /usr/share/babiloo | ||
246 | 5 | run.py /usr/share/babiloo | ||
247 | 6 | efl/babiloo.desktop /usr/share/applications | ||
248 | 7 | images/babiloo.png /usr/share/pixmaps/ | ||
249 | 0 | 8 | ||
250 | === added file 'debian/babiloo.links' | |||
251 | --- debian/babiloo.links 1970-01-01 00:00:00 +0000 | |||
252 | +++ debian/babiloo.links 2010-02-08 17:08:17 +0000 | |||
253 | @@ -0,0 +1,1 @@ | |||
254 | 1 | usr/share/babiloo/run.py /usr/bin/babiloo | ||
255 | 0 | 2 | ||
256 | === added file 'debian/babiloo.manpages' | |||
257 | --- debian/babiloo.manpages 1970-01-01 00:00:00 +0000 | |||
258 | +++ debian/babiloo.manpages 2010-02-08 17:08:17 +0000 | |||
259 | @@ -0,0 +1,1 @@ | |||
260 | 1 | babiloo.1 | ||
261 | 0 | 2 | ||
262 | === added file 'debian/babiloo.menu' | |||
263 | --- debian/babiloo.menu 1970-01-01 00:00:00 +0000 | |||
264 | +++ debian/babiloo.menu 2010-02-08 17:08:17 +0000 | |||
265 | @@ -0,0 +1,5 @@ | |||
266 | 1 | ?package(babiloo):needs="X11" \ | ||
267 | 2 | section="Applications/Office" \ | ||
268 | 3 | title="Babiloo 2" \ | ||
269 | 4 | command="/usr/bin/babiloo" \ | ||
270 | 5 | icon="/usr/share/pixmaps/babiloo.xpm" | ||
271 | 0 | 6 | ||
272 | === added file 'debian/changelog' | |||
273 | --- debian/changelog 1970-01-01 00:00:00 +0000 | |||
274 | +++ debian/changelog 2010-02-08 17:08:17 +0000 | |||
275 | @@ -0,0 +1,52 @@ | |||
276 | 1 | babiloo (2.0.9-4) karmic; urgency=low | ||
277 | 2 | |||
278 | 3 | [ Luca Vaudano ] | ||
279 | 4 | * Python-elementary alignment | ||
280 | 5 | |||
281 | 6 | -- Luca Vaudano <vaudano@debian-navi> Tue, 01 Dec 2009 10:55:55 +0100 | ||
282 | 7 | |||
283 | 8 | babiloo (2.0.9-3) karmic; urgency=low | ||
284 | 9 | |||
285 | 10 | [ Luca Vaudano ] | ||
286 | 11 | * EFL bug fixing | ||
287 | 12 | |||
288 | 13 | -- Luca Vaudano <vaudano@debian-navi> Fri, 27 Nov 2009 12:05:17 +0100 | ||
289 | 14 | |||
290 | 15 | babiloo (2.0.9-1) unstable; urgency=low | ||
291 | 16 | |||
292 | 17 | [ Ryan Kavanagh ] | ||
293 | 18 | * New upstream release | ||
294 | 19 | * Bumped standards version to 3.8.2 | ||
295 | 20 | |||
296 | 21 | -- Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org> Fri, 26 Jun 2009 21:44:44 -0400 | ||
297 | 22 | |||
298 | 23 | babiloo (2.0.8-1) unstable; urgency=low | ||
299 | 24 | |||
300 | 25 | * New upstream version. | ||
301 | 26 | * debian/control: | ||
302 | 27 | + Improve long description (Closes: #528202). | ||
303 | 28 | + Change XS-Python-Version to >= 2.5 and bump python dependency | ||
304 | 29 | to 2.5.2 as upstream needs python 2.5 to work correctly. | ||
305 | 30 | |||
306 | 31 | -- Marco Rodrigues <gothicx@sapo.pt> Thu, 28 May 2009 19:51:31 +0100 | ||
307 | 32 | |||
308 | 33 | babiloo (2.0.7-1) unstable; urgency=low | ||
309 | 34 | |||
310 | 35 | * New upstream version. | ||
311 | 36 | * XPM icon provided by upstream. Removed. | ||
312 | 37 | * debian/babiloo.install: | ||
313 | 38 | + Use upstream xpm icon. | ||
314 | 39 | * debian/control: | ||
315 | 40 | + Bump Standards-Version to 3.8.1 (no changes). | ||
316 | 41 | * debian/rules: | ||
317 | 42 | + Rebuild QT ui files. | ||
318 | 43 | * debian/copyright: | ||
319 | 44 | + Add myself to upstream authors :) | ||
320 | 45 | |||
321 | 46 | -- Marco Rodrigues <gothicx@sapo.pt> Tue, 28 Apr 2009 12:30:40 +0000 | ||
322 | 47 | |||
323 | 48 | babiloo (2.0.3.1-1) unstable; urgency=low | ||
324 | 49 | |||
325 | 50 | * Initial Release (Closes: #510132). | ||
326 | 51 | |||
327 | 52 | -- Marco Rodrigues <gothicx@sapo.pt> Tue, 10 Mar 2009 20:58:02 +0000 | ||
328 | 0 | 53 | ||
329 | === added file 'debian/compat' | |||
330 | --- debian/compat 1970-01-01 00:00:00 +0000 | |||
331 | +++ debian/compat 2010-02-08 17:08:17 +0000 | |||
332 | @@ -0,0 +1,1 @@ | |||
333 | 1 | 7 | ||
334 | 0 | 2 | ||
335 | === added file 'debian/control' | |||
336 | --- debian/control 1970-01-01 00:00:00 +0000 | |||
337 | +++ debian/control 2010-02-08 17:08:17 +0000 | |||
338 | @@ -0,0 +1,20 @@ | |||
339 | 1 | Source: babiloo | ||
340 | 2 | Section: utils | ||
341 | 3 | Priority: optional | ||
342 | 4 | Maintainer: Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org> | ||
343 | 5 | Uploaders: Luca Vaudano <vaudano@gmail.com> | ||
344 | 6 | Build-Depends: debhelper (>= 7), python (>= 2.5.2-3) | ||
345 | 7 | Build-Depends-Indep: python-support (>= 0.5.6) | ||
346 | 8 | Standards-Version: 3.8.2 | ||
347 | 9 | Homepage: http://www.babiloo-project.org/ | ||
348 | 10 | |||
349 | 11 | Package: babiloo | ||
350 | 12 | Architecture: all | ||
351 | 13 | Depends: python-compression, python-misc, python-netclient | ||
352 | 14 | Description: dictionary viewer. | ||
353 | 15 | It supports dictionaries in SDictionary and StarDict format. | ||
354 | 16 | Features: | ||
355 | 17 | * Don't convert dictionaries, use originals. | ||
356 | 18 | * Phonetic sounds. | ||
357 | 19 | . | ||
358 | 20 | This package contains the GUI frontend and common files. | ||
359 | 0 | 21 | ||
360 | === added file 'debian/copyright' | |||
361 | --- debian/copyright 1970-01-01 00:00:00 +0000 | |||
362 | +++ debian/copyright 2010-02-08 17:08:17 +0000 | |||
363 | @@ -0,0 +1,84 @@ | |||
364 | 1 | This package was debianized by Marco Rodrigues <gothicx@sapo.pt> on | ||
365 | 2 | Mon, 05 Jan 2009 10:05:30 +0000. | ||
366 | 3 | |||
367 | 4 | It was downloaded from http://www.babiloo-project.org/ | ||
368 | 5 | |||
369 | 6 | Upstream Author: Ivan Garcia <ivangarcia@gmail.com> | ||
370 | 7 | Marco Ferreira <mferreira@devion.org> | ||
371 | 8 | Marco Rodrigues <gothicx@sapo.pt> | ||
372 | 9 | |||
373 | 10 | Copyright: | ||
374 | 11 | |||
375 | 12 | Copyright (C) 2008-2009 by Ivan Garcia <ivangarcia@gmail.com> | ||
376 | 13 | Copyright (C) 2008-2009 by Marco Ferreira <mferreira@devion.org> | ||
377 | 14 | Copyright (C) 2008-2009 by Marco Rodrigues <gothicx@sapo.pt> | ||
378 | 15 | |||
379 | 16 | License: | ||
380 | 17 | |||
381 | 18 | This package is free software; you can redistribute it and/or modify | ||
382 | 19 | it under the terms of the GNU General Public License as published by | ||
383 | 20 | the Free Software Foundation; either version 2 of the License, or | ||
384 | 21 | (at your option) any later version. | ||
385 | 22 | |||
386 | 23 | This package is distributed in the hope that it will be useful, | ||
387 | 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
388 | 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
389 | 26 | GNU General Public License for more details. | ||
390 | 27 | |||
391 | 28 | You should have received a copy of the GNU General Public License | ||
392 | 29 | along with this package; if not, write to the Free Software | ||
393 | 30 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
394 | 31 | |||
395 | 32 | On Debian systems, the complete text of the GNU General | ||
396 | 33 | Public License can be found in `/usr/share/common-licenses/GPL-3'. | ||
397 | 34 | |||
398 | 35 | * core/dictionary/psdict.py: | ||
399 | 36 | Copyright (C) 2006 Dmitri Brechalov | ||
400 | 37 | Copyright (C) Igor Tkach, 2006 | ||
401 | 38 | |||
402 | 39 | This program is free software; you can redistribute it and/or modify | ||
403 | 40 | it under the terms of the GNU General Public License as published by | ||
404 | 41 | the Free Software Foundation; either version 2 of the License, or | ||
405 | 42 | (at your option) any later version. | ||
406 | 43 | The full license is in the file COPYING, distributed as part of | ||
407 | 44 | this software. | ||
408 | 45 | |||
409 | 46 | * core/dictionary/pystardict.py: | ||
410 | 47 | Copyright 2008 Serge Matveenko | ||
411 | 48 | |||
412 | 49 | PyStarDict is free software: you can redistribute it and/or modify | ||
413 | 50 | it under the terms of the GNU General Public License as published by | ||
414 | 51 | the Free Software Foundation, either version 3 of the License, or | ||
415 | 52 | (at your option) any later version. | ||
416 | 53 | |||
417 | 54 | * languages/autodetect_lang.py: | ||
418 | 55 | Copyright (c) 2006 Thomas Mangin | ||
419 | 56 | |||
420 | 57 | This program is distributed under Gnu General Public License | ||
421 | 58 | (cf. the file COPYING in distribution). Alternatively, you can use | ||
422 | 59 | the program under the conditions of the Artistic License (as Perl). | ||
423 | 60 | |||
424 | 61 | * modules/progressbar.py: | ||
425 | 62 | Copyright (C) 2005 Nilton Volpato | ||
426 | 63 | |||
427 | 64 | This library is free software; you can redistribute it and/or | ||
428 | 65 | modify it under the terms of the GNU Lesser General Public | ||
429 | 66 | License as published by the Free Software Foundation; either | ||
430 | 67 | version 2.1 of the License, or (at your option) any later version. | ||
431 | 68 | |||
432 | 69 | On Debian systems, the complete text of the GNU Lesser General | ||
433 | 70 | Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. | ||
434 | 71 | |||
435 | 72 | * locale/*: | ||
436 | 73 | Copyright (c) 2008-2009 Rosetta Contributors and Canonical Ltd 2008 | ||
437 | 74 | |||
438 | 75 | * efl/*: | ||
439 | 76 | Copyright (c) 2009 Luca Vaudano | ||
440 | 77 | |||
441 | 78 | This program is free software; you can redistribute it and/or modify | ||
442 | 79 | it under the terms of the GNU General Public License as published by | ||
443 | 80 | the Free Software Foundation; either version 2 of the License, or | ||
444 | 81 | (at your option) any later version. | ||
445 | 82 | |||
446 | 83 | The Debian packaging is © 2009, Marco Rodrigues <gothicx@sapo.pt> and | ||
447 | 84 | is licensed under the GPL, see above. | ||
448 | 0 | 85 | ||
449 | === added file 'debian/rules' | |||
450 | --- debian/rules 1970-01-01 00:00:00 +0000 | |||
451 | +++ debian/rules 2010-02-08 17:08:17 +0000 | |||
452 | @@ -0,0 +1,27 @@ | |||
453 | 1 | #!/usr/bin/make -f | ||
454 | 2 | |||
455 | 3 | LANGUAGES=$(shell find locale/ -maxdepth 1 -mindepth 1 -type d -not -name \.svn -printf "%f ") | ||
456 | 4 | |||
457 | 5 | build: | ||
458 | 6 | dh build | ||
459 | 7 | |||
460 | 8 | clean: | ||
461 | 9 | make -C qt/ clean | ||
462 | 10 | dh clean | ||
463 | 11 | find . -name "*\.py[co]" -delete | ||
464 | 12 | |||
465 | 13 | install: build | ||
466 | 14 | make -C qt/ all | ||
467 | 15 | dh --with python_support install | ||
468 | 16 | |||
469 | 17 | # Make it executable to run.py | ||
470 | 18 | chmod +x debian/babiloo/usr/bin/babiloo | ||
471 | 19 | |||
472 | 20 | binary-indep: build install | ||
473 | 21 | dh --with python_support binary-indep | ||
474 | 22 | |||
475 | 23 | binary-arch: build install | ||
476 | 24 | |||
477 | 25 | binary: binary-indep binary-arch | ||
478 | 26 | |||
479 | 27 | .PHONY: build clean binary-indep binary-arch binary | ||
480 | 0 | 28 | ||
481 | === added file 'debian/watch' | |||
482 | --- debian/watch 1970-01-01 00:00:00 +0000 | |||
483 | +++ debian/watch 2010-02-08 17:08:17 +0000 | |||
484 | @@ -0,0 +1,3 @@ | |||
485 | 1 | version=3 | ||
486 | 2 | https://launchpad.net/babiloo/+download \ | ||
487 | 3 | http://launchpad.net/babiloo/(?:.*)/(?:.*)/\+download/babiloo-(.*)\.tar\.gz | ||
488 | 0 | 4 | ||
489 | === added directory 'doc' | |||
490 | === added directory 'doc/efl' | |||
491 | === added file 'doc/efl/babiloo.pdf' | |||
492 | 1 | Binary files doc/efl/babiloo.pdf 1970-01-01 00:00:00 +0000 and doc/efl/babiloo.pdf 2010-02-08 17:08:17 +0000 differ | 5 | Binary files doc/efl/babiloo.pdf 1970-01-01 00:00:00 +0000 and doc/efl/babiloo.pdf 2010-02-08 17:08:17 +0000 differ |
493 | === added file 'doc/efl/babiloo.tex' | |||
494 | --- doc/efl/babiloo.tex 1970-01-01 00:00:00 +0000 | |||
495 | +++ doc/efl/babiloo.tex 2010-02-08 17:08:17 +0000 | |||
496 | @@ -0,0 +1,28 @@ | |||
497 | 1 | \documentclass[english,a4paper,10pt]{article} | ||
498 | 2 | \usepackage{enumerate} % need for alphabetic list enumeration | ||
499 | 3 | \usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages | ||
500 | 4 | \usepackage{graphicx} % Packages to allow inclusion of graphics | ||
501 | 5 | \usepackage{color} % For creating coloured text and background | ||
502 | 6 | \usepackage{times} % True Type Font | ||
503 | 7 | \usepackage{babel} % English language | ||
504 | 8 | \usepackage{subfigure} % Sub-figure for screenshots | ||
505 | 9 | |||
506 | 10 | \begin{document} | ||
507 | 11 | |||
508 | 12 | \include{frontPage} | ||
509 | 13 | |||
510 | 14 | \include{intro} | ||
511 | 15 | \include{installation} | ||
512 | 16 | \include{configuration} | ||
513 | 17 | \include{source} | ||
514 | 18 | |||
515 | 19 | \section{Changelog} | ||
516 | 20 | \include{version0.1} | ||
517 | 21 | \include{version0.2} | ||
518 | 22 | \include{version0.3} | ||
519 | 23 | \include{version0.4} | ||
520 | 24 | \include{version1.0} | ||
521 | 25 | |||
522 | 26 | \include{planning} | ||
523 | 27 | |||
524 | 28 | \end{document} | ||
525 | 0 | \ No newline at end of file | 29 | \ No newline at end of file |
526 | 1 | 30 | ||
527 | === added file 'doc/efl/configuration.tex' | |||
528 | --- doc/efl/configuration.tex 1970-01-01 00:00:00 +0000 | |||
529 | +++ doc/efl/configuration.tex 2010-02-08 17:08:17 +0000 | |||
530 | @@ -0,0 +1,12 @@ | |||
531 | 1 | \section{Configuration} | ||
532 | 2 | |||
533 | 3 | \subsection{Dictionaries} | ||
534 | 4 | |||
535 | 5 | \begin{itemize} | ||
536 | 6 | \item Download from the Web a dictionary\\ | ||
537 | 7 | (e.g. http://sourceforge.net/projects/stardict/files/stardict-dictionaries-dictd/) | ||
538 | 8 | \item Unzip the dictionary (e.g. bunzip2 stardict-longman-2.4.2.tar.bz2 then tar xvf stardict-longman-2.4.2.tar) | ||
539 | 9 | \item Optionally, download and unzip a sound dictionary \\ | ||
540 | 10 | (e.g. from http://sourceforge.net/projects/stardict/files/ the WyabdcRealPeopleTTS section) | ||
541 | 11 | \item Configure the 'Dictonaries tab', see \ref{dictionaryTab}, in the Babiloo GUI | ||
542 | 12 | \end{itemize} | ||
543 | 0 | \ No newline at end of file | 13 | \ No newline at end of file |
544 | 1 | 14 | ||
545 | === added directory 'doc/efl/dictTest' | |||
546 | === added file 'doc/efl/dictTest/CollinsCOBUILD.dct' | |||
547 | 2 | Binary files doc/efl/dictTest/CollinsCOBUILD.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/CollinsCOBUILD.dct 2010-02-08 17:08:18 +0000 differ | 15 | Binary files doc/efl/dictTest/CollinsCOBUILD.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/CollinsCOBUILD.dct 2010-02-08 17:08:18 +0000 differ |
548 | === added file 'doc/efl/dictTest/English_Italian.dct' | |||
549 | 3 | Binary files doc/efl/dictTest/English_Italian.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/English_Italian.dct 2010-02-08 17:08:18 +0000 differ | 16 | Binary files doc/efl/dictTest/English_Italian.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/English_Italian.dct 2010-02-08 17:08:18 +0000 differ |
550 | === added file 'doc/efl/dictTest/simplewiki-2007-01-03_wiki.dct' | |||
551 | 4 | Binary files doc/efl/dictTest/simplewiki-2007-01-03_wiki.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/simplewiki-2007-01-03_wiki.dct 2010-02-08 17:08:18 +0000 differ | 17 | Binary files doc/efl/dictTest/simplewiki-2007-01-03_wiki.dct 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/simplewiki-2007-01-03_wiki.dct 2010-02-08 17:08:18 +0000 differ |
552 | === added directory 'doc/efl/dictTest/stardict-longman-2.4.2' | |||
553 | === added file 'doc/efl/dictTest/stardict-longman-2.4.2/longman.dict.dz' | |||
554 | 5 | Binary files doc/efl/dictTest/stardict-longman-2.4.2/longman.dict.dz 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-longman-2.4.2/longman.dict.dz 2010-02-08 17:08:18 +0000 differ | 18 | Binary files doc/efl/dictTest/stardict-longman-2.4.2/longman.dict.dz 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-longman-2.4.2/longman.dict.dz 2010-02-08 17:08:18 +0000 differ |
555 | === added file 'doc/efl/dictTest/stardict-longman-2.4.2/longman.idx' | |||
556 | 6 | Binary files doc/efl/dictTest/stardict-longman-2.4.2/longman.idx 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-longman-2.4.2/longman.idx 2010-02-08 17:08:18 +0000 differ | 19 | Binary files doc/efl/dictTest/stardict-longman-2.4.2/longman.idx 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-longman-2.4.2/longman.idx 2010-02-08 17:08:18 +0000 differ |
557 | === added file 'doc/efl/dictTest/stardict-longman-2.4.2/longman.ifo' | |||
558 | --- doc/efl/dictTest/stardict-longman-2.4.2/longman.ifo 1970-01-01 00:00:00 +0000 | |||
559 | +++ doc/efl/dictTest/stardict-longman-2.4.2/longman.ifo 2010-02-08 17:08:18 +0000 | |||
560 | @@ -0,0 +1,8 @@ | |||
561 | 1 | StarDict's dict ifo file | ||
562 | 2 | version=2.4.2 | ||
563 | 3 | wordcount=43052 | ||
564 | 4 | idxfilesize=771616 | ||
565 | 5 | bookname=Longman Dictionary of Contemporary English | ||
566 | 6 | description=Made by Hu Zheng | ||
567 | 7 | date=2005.10.23 | ||
568 | 8 | sametypesequence=m | ||
569 | 0 | 9 | ||
570 | === added directory 'doc/efl/dictTest/stardict-oxford_collocations-2.4.2' | |||
571 | === added file 'doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.dict.dz' | |||
572 | 1 | Binary files doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.dict.dz 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.dict.dz 2010-02-08 17:08:18 +0000 differ | 10 | Binary files doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.dict.dz 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.dict.dz 2010-02-08 17:08:18 +0000 differ |
573 | === added file 'doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.idx' | |||
574 | 2 | Binary files doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.idx 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.idx 2010-02-08 17:08:18 +0000 differ | 11 | Binary files doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.idx 1970-01-01 00:00:00 +0000 and doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.idx 2010-02-08 17:08:18 +0000 differ |
575 | === added file 'doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.ifo' | |||
576 | --- doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.ifo 1970-01-01 00:00:00 +0000 | |||
577 | +++ doc/efl/dictTest/stardict-oxford_collocations-2.4.2/oxford_collocations.ifo 2010-02-08 17:08:18 +0000 | |||
578 | @@ -0,0 +1,7 @@ | |||
579 | 1 | StarDict's dict ifo file | ||
580 | 2 | version=2.4.2 | ||
581 | 3 | wordcount=8338 | ||
582 | 4 | idxfilesize=180266 | ||
583 | 5 | bookname=Oxford English Collocation Dictionary | ||
584 | 6 | description=Made by Hu Zheng, privoided by Dr.Treo and lewpda. | ||
585 | 7 | sametypesequence=m | ||
586 | 0 | 8 | ||
587 | === added file 'doc/efl/frontPage.tex' | |||
588 | --- doc/efl/frontPage.tex 1970-01-01 00:00:00 +0000 | |||
589 | +++ doc/efl/frontPage.tex 2010-02-08 17:08:17 +0000 | |||
590 | @@ -0,0 +1,3 @@ | |||
591 | 1 | \title{Babiloo-efl} | ||
592 | 2 | \author{Luca Vaudano} | ||
593 | 3 | \maketitle | ||
594 | 0 | \ No newline at end of file | 4 | \ No newline at end of file |
595 | 1 | 5 | ||
596 | === added file 'doc/efl/genDoc.sh' | |||
597 | --- doc/efl/genDoc.sh 1970-01-01 00:00:00 +0000 | |||
598 | +++ doc/efl/genDoc.sh 2010-02-08 17:08:17 +0000 | |||
599 | @@ -0,0 +1,2 @@ | |||
600 | 1 | #!/bin/bash | ||
601 | 2 | pdflatex babiloo.tex | ||
602 | 0 | 3 | ||
603 | === added directory 'doc/efl/images' | |||
604 | === added directory 'doc/efl/images/v0.1' | |||
605 | === added file 'doc/efl/images/v0.1/1.png' | |||
606 | 1 | Binary files doc/efl/images/v0.1/1.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/1.png 2010-02-08 17:08:18 +0000 differ | 4 | Binary files doc/efl/images/v0.1/1.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/1.png 2010-02-08 17:08:18 +0000 differ |
607 | === added file 'doc/efl/images/v0.1/2.png' | |||
608 | 2 | Binary files doc/efl/images/v0.1/2.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/2.png 2010-02-08 17:08:18 +0000 differ | 5 | Binary files doc/efl/images/v0.1/2.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/2.png 2010-02-08 17:08:18 +0000 differ |
609 | === added file 'doc/efl/images/v0.1/3.png' | |||
610 | 3 | Binary files doc/efl/images/v0.1/3.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/3.png 2010-02-08 17:08:18 +0000 differ | 6 | Binary files doc/efl/images/v0.1/3.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/3.png 2010-02-08 17:08:18 +0000 differ |
611 | === added file 'doc/efl/images/v0.1/4.png' | |||
612 | 4 | Binary files doc/efl/images/v0.1/4.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/4.png 2010-02-08 17:08:18 +0000 differ | 7 | Binary files doc/efl/images/v0.1/4.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/4.png 2010-02-08 17:08:18 +0000 differ |
613 | === added file 'doc/efl/images/v0.1/5.png' | |||
614 | 5 | Binary files doc/efl/images/v0.1/5.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/5.png 2010-02-08 17:08:18 +0000 differ | 8 | Binary files doc/efl/images/v0.1/5.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/5.png 2010-02-08 17:08:18 +0000 differ |
615 | === added file 'doc/efl/images/v0.1/6.png' | |||
616 | 6 | Binary files doc/efl/images/v0.1/6.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/6.png 2010-02-08 17:08:18 +0000 differ | 9 | Binary files doc/efl/images/v0.1/6.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/6.png 2010-02-08 17:08:18 +0000 differ |
617 | === added file 'doc/efl/images/v0.1/7.png' | |||
618 | 7 | Binary files doc/efl/images/v0.1/7.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/7.png 2010-02-08 17:08:18 +0000 differ | 10 | Binary files doc/efl/images/v0.1/7.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.1/7.png 2010-02-08 17:08:18 +0000 differ |
619 | === added directory 'doc/efl/images/v0.2' | |||
620 | === added file 'doc/efl/images/v0.2/1.png' | |||
621 | 8 | Binary files doc/efl/images/v0.2/1.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/1.png 2010-02-08 17:08:18 +0000 differ | 11 | Binary files doc/efl/images/v0.2/1.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/1.png 2010-02-08 17:08:18 +0000 differ |
622 | === added file 'doc/efl/images/v0.2/2.png' | |||
623 | 9 | Binary files doc/efl/images/v0.2/2.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/2.png 2010-02-08 17:08:18 +0000 differ | 12 | Binary files doc/efl/images/v0.2/2.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/2.png 2010-02-08 17:08:18 +0000 differ |
624 | === added file 'doc/efl/images/v0.2/3.png' | |||
625 | 10 | Binary files doc/efl/images/v0.2/3.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/3.png 2010-02-08 17:08:18 +0000 differ | 13 | Binary files doc/efl/images/v0.2/3.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/3.png 2010-02-08 17:08:18 +0000 differ |
626 | === added file 'doc/efl/images/v0.2/4.png' | |||
627 | 11 | Binary files doc/efl/images/v0.2/4.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/4.png 2010-02-08 17:08:18 +0000 differ | 14 | Binary files doc/efl/images/v0.2/4.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/4.png 2010-02-08 17:08:18 +0000 differ |
628 | === added file 'doc/efl/images/v0.2/5.png' | |||
629 | 12 | Binary files doc/efl/images/v0.2/5.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/5.png 2010-02-08 17:08:18 +0000 differ | 15 | Binary files doc/efl/images/v0.2/5.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/5.png 2010-02-08 17:08:18 +0000 differ |
630 | === added file 'doc/efl/images/v0.2/6.png' | |||
631 | 13 | Binary files doc/efl/images/v0.2/6.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/6.png 2010-02-08 17:08:18 +0000 differ | 16 | Binary files doc/efl/images/v0.2/6.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/6.png 2010-02-08 17:08:18 +0000 differ |
632 | === added file 'doc/efl/images/v0.2/7.png' | |||
633 | 14 | Binary files doc/efl/images/v0.2/7.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/7.png 2010-02-08 17:08:18 +0000 differ | 17 | Binary files doc/efl/images/v0.2/7.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/7.png 2010-02-08 17:08:18 +0000 differ |
634 | === added file 'doc/efl/images/v0.2/8.png' | |||
635 | 15 | Binary files doc/efl/images/v0.2/8.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/8.png 2010-02-08 17:08:18 +0000 differ | 18 | Binary files doc/efl/images/v0.2/8.png 1970-01-01 00:00:00 +0000 and doc/efl/images/v0.2/8.png 2010-02-08 17:08:18 +0000 differ |
636 | === added file 'doc/efl/installation.tex' | |||
637 | --- doc/efl/installation.tex 1970-01-01 00:00:00 +0000 | |||
638 | +++ doc/efl/installation.tex 2010-02-08 17:08:17 +0000 | |||
639 | @@ -0,0 +1,34 @@ | |||
640 | 1 | \section{Installation} | ||
641 | 2 | |||
642 | 3 | \subsection{Neo frerunner SHR} | ||
643 | 4 | |||
644 | 5 | \begin{itemize} | ||
645 | 6 | \item opkg install babiloo-efl | ||
646 | 7 | \end{itemize} | ||
647 | 8 | |||
648 | 9 | \subsection{Desktop} | ||
649 | 10 | |||
650 | 11 | \subsubsection{Ubuntu 9.04} | ||
651 | 12 | |||
652 | 13 | \begin{itemize} | ||
653 | 14 | \item Configure the enlightenment repository:\\ | ||
654 | 15 | http://packages.enlightenment.org/ | ||
655 | 16 | \item Install babiloo (it requires python-efl-elementary) | ||
656 | 17 | \item Launch babiloo -e (e switch launches the EFL interface, QT is the standard interface for desktop) | ||
657 | 18 | \end{itemize} | ||
658 | 19 | |||
659 | 20 | \subsubsection{Elive} | ||
660 | 21 | |||
661 | 22 | \begin{itemize} | ||
662 | 23 | \item Install babiloo in Elive (http://www.elivecd.org/) | ||
663 | 24 | \item Launch babiloo -e (e switch launches the EFL interface, QT is the standard interface for desktop) | ||
664 | 25 | \end{itemize} | ||
665 | 26 | |||
666 | 27 | \subsubsection{OzOs} | ||
667 | 28 | |||
668 | 29 | \begin{itemize} | ||
669 | 30 | \item Install python-elementary from SVN\\ | ||
670 | 31 | svn co http://svn.enlightenment.org/svn/e/trunk/BINDINGS/python | ||
671 | 32 | \item Install babiloo | ||
672 | 33 | \item Launch babiloo -e (e switch launches the EFL interface, QT is the standard interface for desktop) | ||
673 | 34 | \end{itemize} | ||
674 | 0 | \ No newline at end of file | 35 | \ No newline at end of file |
675 | 1 | 36 | ||
676 | === added file 'doc/efl/intro.tex' | |||
677 | --- doc/efl/intro.tex 1970-01-01 00:00:00 +0000 | |||
678 | +++ doc/efl/intro.tex 2010-02-08 17:08:17 +0000 | |||
679 | @@ -0,0 +1,4 @@ | |||
680 | 1 | \section{Intro} | ||
681 | 2 | The objective of this module is creating a graphics user interface that emphasizes simplicity and lightness. As development focuses on keeping weight down to a minimum, only the most essential features are implemented. It should be simple to use, requires few libraries and starts up quickly.\\ | ||
682 | 3 | The main target is the openmoko Freerunner cellphone (http://www.openmoko.org) and secondly the netbook.\\ | ||
683 | 4 | If you need a full-features program, you have to use the QT interface. | ||
684 | 0 | \ No newline at end of file | 5 | \ No newline at end of file |
685 | 1 | 6 | ||
686 | === added file 'doc/efl/planning.tex' | |||
687 | --- doc/efl/planning.tex 1970-01-01 00:00:00 +0000 | |||
688 | +++ doc/efl/planning.tex 2010-02-08 17:08:17 +0000 | |||
689 | @@ -0,0 +1,125 @@ | |||
690 | 1 | \section{Planning} | ||
691 | 2 | |||
692 | 3 | \subsection{Library} | ||
693 | 4 | The first thing to choose is the python GUI library. | ||
694 | 5 | Finally my decision is to use the Enlightenment Foundation Library (EFL) due his performance and because it fits very well with the embedded devices.\\ | ||
695 | 6 | But also in the EFL world there are many choice: | ||
696 | 7 | |||
697 | 8 | \begin{enumerate} | ||
698 | 9 | \item Evas / edje\\ | ||
699 | 10 | (http://trac.enlightenment.org/e/browser/trunk/BINDINGS/python/python-edje) | ||
700 | 11 | \item python-elementary\\ | ||
701 | 12 | (http://trac.enlightenment.org/e/browser/trunk/BINDINGS/python/python-elementary) | ||
702 | 13 | \item python-terra\\ | ||
703 | 14 | (http://code.openbossa.org/projects/python-terra) | ||
704 | 15 | \item guarana\\ | ||
705 | 16 | (http://profusion.mobi/node/10) | ||
706 | 17 | \end{enumerate} | ||
707 | 18 | |||
708 | 19 | Among these solutions I discarded guarana because it doesn't have python bindings and evas / edje because python-elementary is born on top of it just for rendering the things simpler and it's more embedded devices oriented, especially touch screen.\\ | ||
709 | 20 | Therefore after the reply in the e-devel mailing list\\ | ||
710 | 21 | (http://www.mail-archive.com/enlightenment-devel@lists.sourceforge.net/msg21290.html)\\ | ||
711 | 22 | I decided to use: | ||
712 | 23 | \begin{itemize} | ||
713 | 24 | \item elementary as a widget set | ||
714 | 25 | \item python-terra if I need some MVC logic (for e.g. for the file selector not implemented yet in the elementary library) | ||
715 | 26 | \end{itemize} | ||
716 | 27 | |||
717 | 28 | \subsection{Milestones} | ||
718 | 29 | |||
719 | 30 | \subsubsection{0.1} | ||
720 | 31 | \begin{itemize} | ||
721 | 32 | \item Improve the GUI | ||
722 | 33 | \item text size | ||
723 | 34 | \item adjust the interface for working well on Neo and on desktop | ||
724 | 35 | \begin{itemize} | ||
725 | 36 | \item enable / disable Illume keyboard on Neo, do nothing on desktop | ||
726 | 37 | \item scaling correctly the icon on Neo and on desktop | ||
727 | 38 | \item wrap line different constant value for Neo and desktop | ||
728 | 39 | \end{itemize} | ||
729 | 40 | \item Empty windows for Settings and Dictionaries | ||
730 | 41 | \item Link babiloo core: | ||
731 | 42 | \begin{itemize} | ||
732 | 43 | \item EFL switch in the command line | ||
733 | 44 | \item Install all the babiloo core dependencies in Neo | ||
734 | 45 | \begin{itemize} | ||
735 | 46 | \item python-compression: gzip, zipfile, tarfile | ||
736 | 47 | \item python-misc: platform, user | ||
737 | 48 | \item python-netclient: mimetypes | ||
738 | 49 | \end{itemize} | ||
739 | 50 | \end{itemize} | ||
740 | 51 | \item Message popup for babiloo-core error (like error during perform the search) | ||
741 | 52 | \item Nicer file structure (gui, controller, model) | ||
742 | 53 | \item Load database | ||
743 | 54 | \begin{itemize} | ||
744 | 55 | \item constant in a configuration file | ||
745 | 56 | \item Configuration file not present error | ||
746 | 57 | \item Dictionary file not present error | ||
747 | 58 | \end{itemize} | ||
748 | 59 | \item Link the GUI to the word search logic | ||
749 | 60 | \item Voice capability | ||
750 | 61 | \item Openmoko package | ||
751 | 62 | \begin{itemize} | ||
752 | 63 | \item Same process than deb package (we can skip qt and s60 directories and use the correct command line switch for launching it) | ||
753 | 64 | \end{itemize} | ||
754 | 65 | \end{itemize} | ||
755 | 66 | |||
756 | 67 | \subsubsection{0.2} | ||
757 | 68 | \begin{itemize} | ||
758 | 69 | \item Improve the GUI | ||
759 | 70 | \begin{itemize} | ||
760 | 71 | \item Entry lost input data when switch between application | ||
761 | 72 | \end{itemize} | ||
762 | 73 | \item Start the program without database, it should show warning not error | ||
763 | 74 | \item Change configuration format: use cPickle | ||
764 | 75 | \item Set SINGLE database: | ||
765 | 76 | \begin{itemize} | ||
766 | 77 | \item he user clicks on the dictionaries icon | ||
767 | 78 | \item the user changes the dictionary value via file selector widget and confirms | ||
768 | 79 | \item the program in the 'Dictionaries tab' shows the selected dictionary | ||
769 | 80 | \item after the user confirm the choice: | ||
770 | 81 | \begin{itemize} | ||
771 | 82 | \item the program sets the dictionary in the config file | ||
772 | 83 | \item the program closes the 'Dictionaries tab' and shows the 'loading dictionary...' frame | ||
773 | 84 | \item the program calls babiloo core passing the file | ||
774 | 85 | \end{itemize} | ||
775 | 86 | \item test on Neo | ||
776 | 87 | \end{itemize} | ||
777 | 88 | \item Set sound dictionary: | ||
778 | 89 | \begin{itemize} | ||
779 | 90 | \item like single database | ||
780 | 91 | \end{itemize} | ||
781 | 92 | \item Settings, player | ||
782 | 93 | \begin{itemize} | ||
783 | 94 | \item like single database | ||
784 | 95 | \end{itemize} | ||
785 | 96 | \item About page | ||
786 | 97 | \item Performance problem for StarDict dictionary (due to the auto sorting feature) | ||
787 | 98 | \begin{verbatim} | ||
788 | 99 | Loading /home/root/babiloo/stardict-longman-2.4.2/longman.dict.dz ... | ||
789 | 100 | (Stardict) type detected | ||
790 | 101 | Dictionary loaded in 452.63 sec | ||
791 | 102 | \end{verbatim} | ||
792 | 103 | \item Desktop package (merge trunk repositories with efl branch then add efl directory in the control file) | ||
793 | 104 | \end{itemize} | ||
794 | 105 | |||
795 | 106 | \subsubsection{Out of target} | ||
796 | 107 | \begin{itemize} | ||
797 | 108 | \item Load MULTI databases: | ||
798 | 109 | \begin{itemize} | ||
799 | 110 | \item the user clicks on the dictionaries icon | ||
800 | 111 | \item the program shows a table with all the available dictionaries and the default one | ||
801 | 112 | \item the user can change the default one -> program saves it on the config file | ||
802 | 113 | \item the user clicks on add icon | ||
803 | 114 | \item the program opens a file selector widget | ||
804 | 115 | \item after the user selected a dictionary the program calls babiloo core passing the file | ||
805 | 116 | \item if everything go smoothly, returns to the dictionary table with a new row and selected as default | ||
806 | 117 | \item the program adds the dictionary to the config file | ||
807 | 118 | \end{itemize} | ||
808 | 119 | \item Try to take off python-misc dependency ? | ||
809 | 120 | \item HTML rendering ? | ||
810 | 121 | \item GUI localization | ||
811 | 122 | \item Progress bar (need Enlightenment rev43106) | ||
812 | 123 | \item Multi dictionaries capability | ||
813 | 124 | \item Word search filter (using elementary hover) | ||
814 | 125 | \end{itemize} | ||
815 | 0 | \ No newline at end of file | 126 | \ No newline at end of file |
816 | 1 | 127 | ||
817 | === added directory 'doc/efl/releasedFiles' | |||
818 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-1_neo.ipk' | |||
819 | 2 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-1_neo.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-1_neo.ipk 2010-02-08 17:08:18 +0000 differ | 128 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-1_neo.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-1_neo.ipk 2010-02-08 17:08:18 +0000 differ |
820 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-2_all.ipk' | |||
821 | 3 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2_all.ipk 2010-02-08 17:08:18 +0000 differ | 129 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2_all.ipk 2010-02-08 17:08:18 +0000 differ |
822 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-2a_all.ipk' | |||
823 | 4 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2a_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2a_all.ipk 2010-02-08 17:08:18 +0000 differ | 130 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2a_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2a_all.ipk 2010-02-08 17:08:18 +0000 differ |
824 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-2b_all.ipk' | |||
825 | 5 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2b_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2b_all.ipk 2010-02-08 17:08:18 +0000 differ | 131 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-2b_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-2b_all.ipk 2010-02-08 17:08:18 +0000 differ |
826 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-3.tar.gz' | |||
827 | 6 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-3.tar.gz 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-3.tar.gz 2010-02-08 17:08:18 +0000 differ | 132 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-3.tar.gz 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-3.tar.gz 2010-02-08 17:08:18 +0000 differ |
828 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-3_all.ipk' | |||
829 | 7 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-3_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-3_all.ipk 2010-02-08 17:08:19 +0000 differ | 133 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-3_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-3_all.ipk 2010-02-08 17:08:19 +0000 differ |
830 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-4.tar.gz' | |||
831 | 8 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-4.tar.gz 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-4.tar.gz 2010-02-08 17:08:19 +0000 differ | 134 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-4.tar.gz 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-4.tar.gz 2010-02-08 17:08:19 +0000 differ |
832 | === added file 'doc/efl/releasedFiles/babiloo_2.0.9-4_all.ipk' | |||
833 | 9 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-4_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-4_all.ipk 2010-02-08 17:08:19 +0000 differ | 135 | Binary files doc/efl/releasedFiles/babiloo_2.0.9-4_all.ipk 1970-01-01 00:00:00 +0000 and doc/efl/releasedFiles/babiloo_2.0.9-4_all.ipk 2010-02-08 17:08:19 +0000 differ |
834 | === added file 'doc/efl/source.tex' | |||
835 | --- doc/efl/source.tex 1970-01-01 00:00:00 +0000 | |||
836 | +++ doc/efl/source.tex 2010-02-08 17:08:17 +0000 | |||
837 | @@ -0,0 +1,7 @@ | |||
838 | 1 | \section{Source code} | ||
839 | 2 | bzr branch lp:~vaudano/babiloo/efl | ||
840 | 3 | |||
841 | 4 | \subsection{Package} | ||
842 | 5 | Make a package, create the debian directory with the correct files, then:\\ | ||
843 | 6 | \texttt{dpkg-buildpackage}\\ | ||
844 | 7 | the command generates files in the parent directory, keep the deb one and rename it with ipk extension. | ||
845 | 0 | \ No newline at end of file | 8 | \ No newline at end of file |
846 | 1 | 9 | ||
847 | === added file 'doc/efl/version0.1.tex' | |||
848 | --- doc/efl/version0.1.tex 1970-01-01 00:00:00 +0000 | |||
849 | +++ doc/efl/version0.1.tex 2010-02-08 17:08:17 +0000 | |||
850 | @@ -0,0 +1,38 @@ | |||
851 | 1 | \subsection{0.1} | ||
852 | 2 | |||
853 | 3 | Babiloo version 2.0.9\\ | ||
854 | 4 | Bazaar revision: 272\\ | ||
855 | 5 | Release date: 16 September 2009\\ | ||
856 | 6 | |||
857 | 7 | \begin{itemize} | ||
858 | 8 | \item GUI fits for Neo freerunner and EFL desktop (especially Netbook) | ||
859 | 9 | \item Dictionaries configuration in a file (efl/config.cfg) | ||
860 | 10 | \item Voice capability | ||
861 | 11 | \end{itemize} | ||
862 | 12 | |||
863 | 13 | \subsubsection{Screenshots} | ||
864 | 14 | Figure~\ref{screenshotVer0.1} SHR with SHR-simple theme and SHR-Simple elementary theme.\\ | ||
865 | 15 | |||
866 | 16 | \begin{figure}[htp] | ||
867 | 17 | \begin{center} | ||
868 | 18 | \subfigure[Babiloo icon]{\includegraphics[scale=0.2]{images/v0.1/1.png}} | ||
869 | 19 | \subfigure[Loading dictionary]{\includegraphics[scale=0.2]{images/v0.1/2.png}} | ||
870 | 20 | \subfigure[Babiloo main screen]{\includegraphics[scale=0.2]{images/v0.1/3.png}}\\ | ||
871 | 21 | \subfigure[Dictionary tab]{\includegraphics[scale=0.2]{images/v0.1/4.png}} | ||
872 | 22 | \subfigure[Settings tab]{\includegraphics[scale=0.2]{images/v0.1/5.png}} | ||
873 | 23 | \subfigure[Search a word]{\includegraphics[scale=0.2]{images/v0.1/6.png}}\\ | ||
874 | 24 | \subfigure[Show the definition]{\includegraphics[scale=0.2]{images/v0.1/7.png}} | ||
875 | 25 | \end{center} | ||
876 | 26 | \caption{Babiloo EFL 0.1} | ||
877 | 27 | \label{screenshotVer0.1} | ||
878 | 28 | \end{figure} | ||
879 | 29 | |||
880 | 30 | \subsubsection{Performance} | ||
881 | 31 | \begin{tabular}{lllllll} | ||
882 | 32 | Rev & Dictionary name & Dict type & Size & Words & PC & Neo\\ | ||
883 | 33 | 272 & stardict-longman-2.4.2 & stardict & 6.8 Mb & 43K & 4.22 sec & 452.63 sec\\ | ||
884 | 34 | 272 & Oxford English Collocation & stardict & 2.0 Mb & 8K & 0.75 sec & 76.07 sec\\ | ||
885 | 35 | 272 & Collins Cobuild advanced...,4th & sDictionary & 9 Mb & 40K & 0.65 sec & 93.91 sec\\ | ||
886 | 36 | 272 & Wikipedia en 2007-01-03 (simple) & sDictionary & 9 Mb & 18K & 0.54 sec & 74.57 sec\\ | ||
887 | 37 | 272 & Englis-italian dictionary & sDictionary & 2 Mb & 33K & 0.49 sec & 70.74 sec\\ | ||
888 | 38 | \end{tabular} | ||
889 | 0 | \ No newline at end of file | 39 | \ No newline at end of file |
890 | 1 | 40 | ||
891 | === added file 'doc/efl/version0.2.tex' | |||
892 | --- doc/efl/version0.2.tex 1970-01-01 00:00:00 +0000 | |||
893 | +++ doc/efl/version0.2.tex 2010-02-08 17:08:17 +0000 | |||
894 | @@ -0,0 +1,39 @@ | |||
895 | 1 | \subsection{0.2} | ||
896 | 2 | |||
897 | 3 | Babiloo version 2.0.9-2 \\ | ||
898 | 4 | Bazaar revision: 288 \\ | ||
899 | 5 | Release date: 3 November 2009 | ||
900 | 6 | |||
901 | 7 | \begin{itemize} | ||
902 | 8 | \item Bug fixing | ||
903 | 9 | \item Configuration via GUI | ||
904 | 10 | \item Performance improvements | ||
905 | 11 | \end{itemize} | ||
906 | 12 | |||
907 | 13 | \subsubsection{Screenshots} | ||
908 | 14 | Figure~\ref{screenshotVer0.2} SHR with gry theme and gry elementary theme.\\ | ||
909 | 15 | |||
910 | 16 | \begin{figure}[htp] | ||
911 | 17 | \begin{center} | ||
912 | 18 | \subfigure[Babiloo icon]{\includegraphics[scale=0.2]{images/v0.2/1.png}} | ||
913 | 19 | \subfigure[Loading dictionary]{\includegraphics[scale=0.2]{images/v0.2/2.png}} | ||
914 | 20 | \subfigure[Babiloo main screen]{\includegraphics[scale=0.2]{images/v0.2/3.png}}\\ | ||
915 | 21 | \subfigure[Dictionary tab]{\label{dictionaryTab} \includegraphics[scale=0.2]{images/v0.2/4.png}} | ||
916 | 22 | \subfigure[Settings tab]{\includegraphics[scale=0.2]{images/v0.2/5.png}} | ||
917 | 23 | \subfigure[File selector]{\includegraphics[scale=0.2]{images/v0.2/6.png}}\\ | ||
918 | 24 | \subfigure[Search a word]{\includegraphics[scale=0.2]{images/v0.2/7.png}} | ||
919 | 25 | \subfigure[Show the definition]{\includegraphics[scale=0.2]{images/v0.2/8.png}} | ||
920 | 26 | \end{center} | ||
921 | 27 | \caption{Babiloo EFL 0.2} | ||
922 | 28 | \label{screenshotVer0.2} | ||
923 | 29 | \end{figure} | ||
924 | 30 | |||
925 | 31 | \subsubsection{Performance} | ||
926 | 32 | \begin{tabular}{lllllll} | ||
927 | 33 | Rev & Dictionary name & Dict type & Size & Words & PC & Neo\\ | ||
928 | 34 | 288 & stardict-longman-2.4.2 & stardict & 6.8 Mb & 43K & less than 1 sec & 36 sec\\ | ||
929 | 35 | 288 & Oxford English Collocation & stardict & 2.0 Mb & 8K & less than 1 sec & 7 sec\\ | ||
930 | 36 | 288 & Collins Cobuild advanced...,4th & sDictionary & 9 Mb & 40K & less than 1 sec & 101 sec\\ | ||
931 | 37 | 288 & Wikipedia en 2007-01-03 (simple) & sDictionary & 9 Mb & 18K & less than 1 sec & 84 sec\\ | ||
932 | 38 | 288 & Englis-italian dictionary & sDictionary & 2 Mb & 33K & less than 1 sec & 79 sec\\ | ||
933 | 39 | \end{tabular} | ||
934 | 0 | 40 | ||
935 | === added file 'doc/efl/version0.3.tex' | |||
936 | --- doc/efl/version0.3.tex 1970-01-01 00:00:00 +0000 | |||
937 | +++ doc/efl/version0.3.tex 2010-02-08 17:08:17 +0000 | |||
938 | @@ -0,0 +1,23 @@ | |||
939 | 1 | \subsection{0.3} | ||
940 | 2 | |||
941 | 3 | Babiloo version 2.0.9-3 \\ | ||
942 | 4 | Bazaar revision: 295 \\ | ||
943 | 5 | Release date: 27 November 2009 \\ | ||
944 | 6 | |||
945 | 7 | \begin{itemize} | ||
946 | 8 | \item Bug fixing | ||
947 | 9 | \item Included in the SHR feed ( opkg install babiloo-efl ) | ||
948 | 10 | \end{itemize} | ||
949 | 11 | |||
950 | 12 | \subsubsection{Screenshots} | ||
951 | 13 | As before | ||
952 | 14 | |||
953 | 15 | \subsubsection{Performance} | ||
954 | 16 | \begin{tabular}{lllllll} | ||
955 | 17 | Rev & Dictionary name & Dict type & Size & Words & PC & Neo\\ | ||
956 | 18 | 295 & stardict-longman-2.4.2 & stardict & 6.8 Mb & 43K & less than 1 sec & 32 sec\\ | ||
957 | 19 | 295 & Oxford English Collocation & stardict & 2.0 Mb & 8K & less than 1 sec & 7 sec\\ | ||
958 | 20 | 295 & Collins Cobuild advanced...,4th & sDictionary & 9 Mb & 40K & less than 1 sec & 80 sec\\ | ||
959 | 21 | 295 & Wikipedia en 2007-01-03 (simple) & sDictionary & 9 Mb & 18K & less than 1 sec & 69 sec\\ | ||
960 | 22 | 295 & Englis-italian dictionary & sDictionary & 2 Mb & 33K & less than 1 sec & 66 sec\\ | ||
961 | 23 | \end{tabular} | ||
962 | 0 | \ No newline at end of file | 24 | \ No newline at end of file |
963 | 1 | 25 | ||
964 | === added file 'doc/efl/version0.4.tex' | |||
965 | --- doc/efl/version0.4.tex 1970-01-01 00:00:00 +0000 | |||
966 | +++ doc/efl/version0.4.tex 2010-02-08 17:08:17 +0000 | |||
967 | @@ -0,0 +1,15 @@ | |||
968 | 1 | \subsection{0.4} | ||
969 | 2 | |||
970 | 3 | Babiloo version 2.0.9-4 \\ | ||
971 | 4 | Bazaar revision: 296 \\ | ||
972 | 5 | Release date: 1 December 2009 \\ | ||
973 | 6 | |||
974 | 7 | \begin{itemize} | ||
975 | 8 | \item python-elementary code alignment | ||
976 | 9 | \end{itemize} | ||
977 | 10 | |||
978 | 11 | \subsubsection{Screenshots} | ||
979 | 12 | As before | ||
980 | 13 | |||
981 | 14 | \subsubsection{Performance} | ||
982 | 15 | As before | ||
983 | 0 | \ No newline at end of file | 16 | \ No newline at end of file |
984 | 1 | 17 | ||
985 | === added directory 'efl' | |||
986 | === added file 'efl/__init__.py' | |||
987 | --- efl/__init__.py 1970-01-01 00:00:00 +0000 | |||
988 | +++ efl/__init__.py 2010-02-08 17:08:19 +0000 | |||
989 | @@ -0,0 +1,21 @@ | |||
990 | 1 | #!/usr/bin/env python | ||
991 | 2 | # -*- coding: utf-8 -*- | ||
992 | 3 | |||
993 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
994 | 5 | # This program is free software; you can redistribute it and/or modify | ||
995 | 6 | # it under the terms of the GNU General Public License as published by | ||
996 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
997 | 8 | # (at your option) any later version. | ||
998 | 9 | # | ||
999 | 10 | # This program is distributed in the hope that it will be useful, | ||
1000 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1001 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1002 | 13 | # GNU General Public License for more details. | ||
1003 | 14 | # | ||
1004 | 15 | # You should have received a copy of the GNU General Public License along | ||
1005 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1006 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1007 | 18 | |||
1008 | 19 | __author__ = "Luca Vaudano <vaudano@gmail.com>" | ||
1009 | 20 | __version__ = "0.2" | ||
1010 | 21 | __module_name = "efl" | ||
1011 | 0 | 22 | ||
1012 | === added file 'efl/about_ui.py' | |||
1013 | --- efl/about_ui.py 1970-01-01 00:00:00 +0000 | |||
1014 | +++ efl/about_ui.py 2010-02-08 17:08:19 +0000 | |||
1015 | @@ -0,0 +1,124 @@ | |||
1016 | 1 | #!/usr/bin/env python | ||
1017 | 2 | # -*- coding: utf-8 -*- | ||
1018 | 3 | |||
1019 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1020 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1021 | 6 | # it under the terms of the GNU General Public License as published by | ||
1022 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1023 | 8 | # (at your option) any later version. | ||
1024 | 9 | # | ||
1025 | 10 | # This program is distributed in the hope that it will be useful, | ||
1026 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1027 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1028 | 13 | # GNU General Public License for more details. | ||
1029 | 14 | # | ||
1030 | 15 | # You should have received a copy of the GNU General Public License along | ||
1031 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1032 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1033 | 18 | import elementary | ||
1034 | 19 | |||
1035 | 20 | import logging | ||
1036 | 21 | log = logging.getLogger("babiloo.efl.aboutPage") | ||
1037 | 22 | |||
1038 | 23 | from efl.constants import * | ||
1039 | 24 | |||
1040 | 25 | class AboutPage(object): | ||
1041 | 26 | def __init__(self, main): | ||
1042 | 27 | self.main = main | ||
1043 | 28 | self.box = None | ||
1044 | 29 | |||
1045 | 30 | def setupUi(self): | ||
1046 | 31 | |||
1047 | 32 | # Box Window with scroller and quit button | ||
1048 | 33 | self.box = elementary.Box(self.main.win) | ||
1049 | 34 | self.box.horizontal_set(False) | ||
1050 | 35 | self.main.win.resize_object_add(self.box) | ||
1051 | 36 | self.box.size_hint_weight_set(1.0, 1.0) | ||
1052 | 37 | self.box.size_hint_align_set(-1, -1) | ||
1053 | 38 | self.box.show() | ||
1054 | 39 | |||
1055 | 40 | # Scroller | ||
1056 | 41 | scroller = elementary.Scroller(self.main.win) | ||
1057 | 42 | scroller.bounce_set(0, 0) | ||
1058 | 43 | scroller.size_hint_weight_set(1.0, 1.0) | ||
1059 | 44 | scroller.size_hint_align_set(-1.0, -1.0) | ||
1060 | 45 | self.box.pack_end(scroller) | ||
1061 | 46 | scroller.show() | ||
1062 | 47 | |||
1063 | 48 | # Quit button | ||
1064 | 49 | self.quitAboutWin = elementary.Button(self.main.win) | ||
1065 | 50 | self.quitAboutWin.label_set("Quit") | ||
1066 | 51 | self.quitAboutWin.size_hint_align_set(-1.0, 0.0) | ||
1067 | 52 | ic = elementary.Icon(self.quitAboutWin) | ||
1068 | 53 | ic.file_set( QUIT_ICON) | ||
1069 | 54 | ic.smooth_set(1) | ||
1070 | 55 | ic.scale_set(1, 1) | ||
1071 | 56 | self.quitAboutWin.icon_set(ic) | ||
1072 | 57 | self.quitAboutWin.show() | ||
1073 | 58 | self.box.pack_end(self.quitAboutWin) | ||
1074 | 59 | |||
1075 | 60 | # Box inside scroller | ||
1076 | 61 | boxScroller = elementary.Box(self.main.win) | ||
1077 | 62 | boxScroller.horizontal_set(False) | ||
1078 | 63 | boxScroller.size_hint_weight_set(1.0, -1.0) | ||
1079 | 64 | scroller.content_set(boxScroller) | ||
1080 | 65 | boxScroller.show() | ||
1081 | 66 | |||
1082 | 67 | # Frame for dictionary section | ||
1083 | 68 | self.createAboutFrame() | ||
1084 | 69 | boxScroller.pack_end(self.frameAbout) | ||
1085 | 70 | |||
1086 | 71 | def createAboutFrame(self): | ||
1087 | 72 | self.frameAbout = elementary.Frame(self.main.win) | ||
1088 | 73 | self.frameAbout.label_set('%s %s' % (APP_NAME, APP_VERSION)) | ||
1089 | 74 | self.frameAbout.size_hint_align_set(-1.0, 0.0) | ||
1090 | 75 | self.frameAbout.show() | ||
1091 | 76 | |||
1092 | 77 | about = """\ | ||
1093 | 78 | Babiloo is a offline dictionaries reader.\ | ||
1094 | 79 | <br><br>\ | ||
1095 | 80 | <b>Copyright</> 2008-2009, Babiloo Developers<br>\ | ||
1096 | 81 | <b>Licensed</> under the GNU GPL v3<br>\ | ||
1097 | 82 | <b>Homepage</> http://babiloo-project.org</license>\ | ||
1098 | 83 | <br><br>\ | ||
1099 | 84 | The team would like to thank these 3 GPL projects where Babiloo has used part of their codes:\ | ||
1100 | 85 | <br><br>\ | ||
1101 | 86 | QStardict, OpenDict, Sdiqt | ||
1102 | 87 | <br><br>\ | ||
1103 | 88 | ========\ | ||
1104 | 89 | <br><br>\ | ||
1105 | 90 | <b>Elementary UI</>\ | ||
1106 | 91 | <br><br>\ | ||
1107 | 92 | The objective of this module is creating a graphics user interface that emphasizes simplicity and lightness.\ | ||
1108 | 93 | <br><br>\ | ||
1109 | 94 | As development focuses on keeping weight down to a minimum, only the most essential features are implemented. | ||
1110 | 95 | It should be simple to use, requires few libraries and starts up quickly.\ | ||
1111 | 96 | <br><br>\ | ||
1112 | 97 | The main target is the openmoko Freerunner cellphone and secondly the netbook.\ | ||
1113 | 98 | <br><br>\ | ||
1114 | 99 | If you need a full-features program, you have to use the QT interface.\ | ||
1115 | 100 | <br><br>\ | ||
1116 | 101 | ========\ | ||
1117 | 102 | <br><br>\ | ||
1118 | 103 | <b>Elementary UI features</>\ | ||
1119 | 104 | <br><br>\ | ||
1120 | 105 | * Supports dictionaries in SDictionary and StarDict formats.\ | ||
1121 | 106 | <br><br>\ | ||
1122 | 107 | * Voice capability\ | ||
1123 | 108 | """ | ||
1124 | 109 | entry = elementary.Entry(self.main.win) | ||
1125 | 110 | entry.editable_set(False) | ||
1126 | 111 | entry.line_wrap_set(True) | ||
1127 | 112 | entry.size_hint_align_set(-1, -1) | ||
1128 | 113 | entry.entry_set(about) | ||
1129 | 114 | entry.show() | ||
1130 | 115 | |||
1131 | 116 | self.frameAbout.content_set(entry) | ||
1132 | 117 | |||
1133 | 118 | |||
1134 | 119 | |||
1135 | 120 | |||
1136 | 121 | |||
1137 | 122 | |||
1138 | 123 | |||
1139 | 124 | |||
1140 | 0 | 125 | ||
1141 | === added file 'efl/babiloo-efl.bb' | |||
1142 | --- efl/babiloo-efl.bb 1970-01-01 00:00:00 +0000 | |||
1143 | +++ efl/babiloo-efl.bb 2010-02-08 17:08:19 +0000 | |||
1144 | @@ -0,0 +1,41 @@ | |||
1145 | 1 | DESCRIPTION = "EFL Dictionary Viewer. It supports dictionaries in SDictionary and StarDict format." | ||
1146 | 2 | SECTION = "devel/python" | ||
1147 | 3 | PRIORITY = "optional" | ||
1148 | 4 | LICENSE = "GPL" | ||
1149 | 5 | AUTHOR = "Luca Vaudano <vaudano@gmail.com>" | ||
1150 | 6 | HOMEPAGE = "http://babiloo-project.org" | ||
1151 | 7 | RDEPENDS = "python-elementary python-compression python-misc python-netclient" | ||
1152 | 8 | |||
1153 | 9 | PACKAGE_ARCH = "all" | ||
1154 | 10 | |||
1155 | 11 | DEFAULT_PREFERENCE = "-1" | ||
1156 | 12 | PV = "2.0.9-bzrr${SRCREV}" | ||
1157 | 13 | |||
1158 | 14 | SRC_URI = "bzr://bazaar.launchpad.net/~vaudano/babiloo/efl" | ||
1159 | 15 | |||
1160 | 16 | S = "${WORKDIR}/efl" | ||
1161 | 17 | |||
1162 | 18 | do_install() { | ||
1163 | 19 | install -d "${D}${datadir}/babiloo" | ||
1164 | 20 | cp -a "${S}/core" "${D}${datadir}/babiloo/" | ||
1165 | 21 | cp -a "${S}/efl" "${D}${datadir}/babiloo/" | ||
1166 | 22 | cp -a "${S}/images" "${D}${datadir}/babiloo/" | ||
1167 | 23 | cp -a "${S}/dicts" "${D}${datadir}/babiloo/" | ||
1168 | 24 | install -m 0755 "${S}/run.py" "${D}${datadir}/babiloo/" | ||
1169 | 25 | install -d "${D}${bindir}" | ||
1170 | 26 | ln -s "${datadir}/babiloo/run.py" "${D}${bindir}/babiloo" | ||
1171 | 27 | install -d "${D}${datadir}/pixmaps" | ||
1172 | 28 | install -m 0644 "${S}/images/babiloo.png" "${D}${datadir}/pixmaps" | ||
1173 | 29 | install -d "${D}${datadir}/applications" | ||
1174 | 30 | install -m 0644 "${S}/babiloo.desktop" "${D}${datadir}/applications" | ||
1175 | 31 | |||
1176 | 32 | install -d "${D}${datadir}" | ||
1177 | 33 | cp -a "${S}/locale" "${D}${datadir}/" | ||
1178 | 34 | find ${D}${datadir}/locale -name *.po -exec rm {} \; | ||
1179 | 35 | rm -f ${D}${datadir}/locale/babiloo.pot | ||
1180 | 36 | |||
1181 | 37 | install -d "${D}${datadir}/doc" | ||
1182 | 38 | install -m 0644 "${S}/doc/efl/babiloo.pdf" "${D}${datadir}/doc/" | ||
1183 | 39 | } | ||
1184 | 40 | |||
1185 | 41 | FILES_${PN} += "${datadir}/babiloo" | ||
1186 | 0 | 42 | ||
1187 | === added file 'efl/babiloo.desktop' | |||
1188 | --- efl/babiloo.desktop 1970-01-01 00:00:00 +0000 | |||
1189 | +++ efl/babiloo.desktop 2010-02-08 17:08:19 +0000 | |||
1190 | @@ -0,0 +1,11 @@ | |||
1191 | 1 | [Desktop Entry] | ||
1192 | 2 | Name=Babiloo | ||
1193 | 3 | Comment=Application to view dictionaries | ||
1194 | 4 | Exec=/usr/bin/babiloo | ||
1195 | 5 | Icon=/usr/share/pixmaps/babiloo.png | ||
1196 | 6 | Terminal=false | ||
1197 | 7 | Type=Application | ||
1198 | 8 | Categories=Utility; | ||
1199 | 9 | SingleInstance=true | ||
1200 | 10 | StartupNotify=true | ||
1201 | 11 | |||
1202 | 0 | 12 | ||
1203 | === added file 'efl/config.py' | |||
1204 | --- efl/config.py 1970-01-01 00:00:00 +0000 | |||
1205 | +++ efl/config.py 2010-02-08 17:08:19 +0000 | |||
1206 | @@ -0,0 +1,56 @@ | |||
1207 | 1 | #!/usr/bin/env python | ||
1208 | 2 | # -*- coding: utf-8 -*- | ||
1209 | 3 | |||
1210 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1211 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1212 | 6 | # it under the terms of the GNU General Public License as published by | ||
1213 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1214 | 8 | # (at your option) any later version. | ||
1215 | 9 | # | ||
1216 | 10 | # This program is distributed in the hope that it will be useful, | ||
1217 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1218 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1219 | 13 | # GNU General Public License for more details. | ||
1220 | 14 | # | ||
1221 | 15 | # You should have received a copy of the GNU General Public License along | ||
1222 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1223 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1224 | 18 | import cPickle, os.path | ||
1225 | 19 | |||
1226 | 20 | from efl.constants import * | ||
1227 | 21 | |||
1228 | 22 | class Config(): | ||
1229 | 23 | |||
1230 | 24 | # Initialization | ||
1231 | 25 | def __init__(self): | ||
1232 | 26 | |||
1233 | 27 | # if the directory doesn't exist, create it | ||
1234 | 28 | if not os.path.exists(CONFIG_DIR): | ||
1235 | 29 | os.makedirs(CONFIG_DIR, 0755) | ||
1236 | 30 | |||
1237 | 31 | # if the file doesn't exist use default setting, otherwise use it | ||
1238 | 32 | if not os.path.exists(CONFIG_FILE): | ||
1239 | 33 | self.data = DEFAULT_CONFIGURATION | ||
1240 | 34 | else: | ||
1241 | 35 | self.data = cPickle.load(open(CONFIG_FILE, 'r')) | ||
1242 | 36 | |||
1243 | 37 | # Flag if the data are to save | ||
1244 | 38 | self.toSave = False | ||
1245 | 39 | |||
1246 | 40 | # Save all the configuration settings into the file | ||
1247 | 41 | def save(self): | ||
1248 | 42 | if self.toSave: | ||
1249 | 43 | cPickle.dump(self.data, open(CONFIG_FILE, 'w+')) | ||
1250 | 44 | self.toSave = False | ||
1251 | 45 | |||
1252 | 46 | # Get the value from the configuration or default value | ||
1253 | 47 | def get(self, name): | ||
1254 | 48 | if name not in self.data.keys(): | ||
1255 | 49 | self.data[name] = DEFAULT_SETTINGS[name] | ||
1256 | 50 | return self.data[name] | ||
1257 | 51 | |||
1258 | 52 | # Set a new value | ||
1259 | 53 | def set(self, name, value): | ||
1260 | 54 | if self.data[name] != value: | ||
1261 | 55 | self.data[name] = value | ||
1262 | 56 | self.toSave = True | ||
1263 | 0 | \ No newline at end of file | 57 | \ No newline at end of file |
1264 | 1 | 58 | ||
1265 | === added file 'efl/constants.py' | |||
1266 | --- efl/constants.py 1970-01-01 00:00:00 +0000 | |||
1267 | +++ efl/constants.py 2010-02-08 17:08:19 +0000 | |||
1268 | @@ -0,0 +1,67 @@ | |||
1269 | 1 | #!/usr/bin/env python | ||
1270 | 2 | # -*- coding: utf-8 -*- | ||
1271 | 3 | |||
1272 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1273 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1274 | 6 | # it under the terms of the GNU General Public License as published by | ||
1275 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1276 | 8 | # (at your option) any later version. | ||
1277 | 9 | # | ||
1278 | 10 | # This program is distributed in the hope that it will be useful, | ||
1279 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1280 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1281 | 13 | # GNU General Public License for more details. | ||
1282 | 14 | # | ||
1283 | 15 | # You should have received a copy of the GNU General Public License along | ||
1284 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1285 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1286 | 18 | import os.path | ||
1287 | 19 | |||
1288 | 20 | APP_NAME = 'Babiloo' | ||
1289 | 21 | APP_VERSION = '2.0.9' | ||
1290 | 22 | |||
1291 | 23 | # Model | ||
1292 | 24 | ENV_PC = 'pc' | ||
1293 | 25 | ENV_NEO = 'neo' | ||
1294 | 26 | ROOT_DIR = '/usr/share/babiloo/' | ||
1295 | 27 | HOME_DIR = os.path.expanduser("~") | ||
1296 | 28 | CONFIG_DIR = os.path.join(HOME_DIR, ".config/%s" % APP_NAME.lower()) | ||
1297 | 29 | CONFIG_FILE = os.path.join(CONFIG_DIR, "config.cfg") | ||
1298 | 30 | |||
1299 | 31 | # UI | ||
1300 | 32 | WIDTH_PC = 60 | ||
1301 | 33 | WIDTH_NEO = 33 | ||
1302 | 34 | SCREEN_WIDTH = 480 | ||
1303 | 35 | SCREEN_HEIGHT = 480 | ||
1304 | 36 | ROOT_DIR = '/usr/share/babiloo/' | ||
1305 | 37 | DICTIONARIES_ICON = ROOT_DIR + 'images/system-installer.png' | ||
1306 | 38 | SETTINGS_ICON = ROOT_DIR + 'images/preferences-system.png' | ||
1307 | 39 | SPEAK_ICON = ROOT_DIR + 'images/speaker.png' | ||
1308 | 40 | CLEAR_ICON = ROOT_DIR + 'images/clear-right.png' | ||
1309 | 41 | SEARCH_ICON = ROOT_DIR + 'images/system-search.png' | ||
1310 | 42 | QUIT_ICON = ROOT_DIR + 'images/process-stop.png' | ||
1311 | 43 | ABOUT_ICON = ROOT_DIR + 'images/dialog-information.png' | ||
1312 | 44 | NEW_DICTIONARY_ICON = ROOT_DIR + 'images/dictionary-new.png' | ||
1313 | 45 | NEW_SOUND_DICTIONARY_ICON = ROOT_DIR + 'images/dictionary-new.png' | ||
1314 | 46 | NEW_PLAYER_ICON = ROOT_DIR + 'images/dictionary-new.png' | ||
1315 | 47 | |||
1316 | 48 | # Set to PC value | ||
1317 | 49 | WIDTH = WIDTH_PC | ||
1318 | 50 | ENV = ENV_PC | ||
1319 | 51 | |||
1320 | 52 | # Retrieve if the hardware is GTA01 or GTA02 | ||
1321 | 53 | # if is, set to NEO value | ||
1322 | 54 | for line in open('/proc/cpuinfo'): | ||
1323 | 55 | if line.startswith('Hardware'): | ||
1324 | 56 | type = line.split() | ||
1325 | 57 | type =type[len(type)-1] | ||
1326 | 58 | if type.startswith('GTA0'): | ||
1327 | 59 | ENV = ENV_NEO | ||
1328 | 60 | WIDTH = WIDTH_NEO | ||
1329 | 61 | |||
1330 | 62 | # Default configuration settings | ||
1331 | 63 | DEFAULT_CONFIGURATION = { | ||
1332 | 64 | 'dictionary_path': '', | ||
1333 | 65 | 'sound_dictionary_path': '', | ||
1334 | 66 | 'player': '/usr/bin/aplay', | ||
1335 | 67 | } | ||
1336 | 0 | \ No newline at end of file | 68 | \ No newline at end of file |
1337 | 1 | 69 | ||
1338 | === added file 'efl/definition_ui.py' | |||
1339 | --- efl/definition_ui.py 1970-01-01 00:00:00 +0000 | |||
1340 | +++ efl/definition_ui.py 2010-02-08 17:08:19 +0000 | |||
1341 | @@ -0,0 +1,173 @@ | |||
1342 | 1 | #!/usr/bin/env python | ||
1343 | 2 | # -*- coding: utf-8 -*- | ||
1344 | 3 | |||
1345 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1346 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1347 | 6 | # it under the terms of the GNU General Public License as published by | ||
1348 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1349 | 8 | # (at your option) any later version. | ||
1350 | 9 | # | ||
1351 | 10 | # This program is distributed in the hope that it will be useful, | ||
1352 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1353 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1354 | 13 | # GNU General Public License for more details. | ||
1355 | 14 | # | ||
1356 | 15 | # You should have received a copy of the GNU General Public License along | ||
1357 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1358 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1359 | 18 | import elementary | ||
1360 | 19 | import textwrap | ||
1361 | 20 | import re | ||
1362 | 21 | import os | ||
1363 | 22 | |||
1364 | 23 | import logging | ||
1365 | 24 | log = logging.getLogger("babiloo.efl.definition_ui") | ||
1366 | 25 | |||
1367 | 26 | from efl.constants import * | ||
1368 | 27 | |||
1369 | 28 | class DefinitionPage(): | ||
1370 | 29 | |||
1371 | 30 | # Initialization | ||
1372 | 31 | def __init__(self, main): | ||
1373 | 32 | self.main = main | ||
1374 | 33 | self.box = None | ||
1375 | 34 | |||
1376 | 35 | def setupUi(self): | ||
1377 | 36 | |||
1378 | 37 | # Box object | ||
1379 | 38 | self.box = elementary.Box(self.main.win) | ||
1380 | 39 | self.box.horizontal_set(False) | ||
1381 | 40 | self.main.win.resize_object_add(self.box) | ||
1382 | 41 | self.box.size_hint_weight_set(1.0, 1.0) | ||
1383 | 42 | self.box.show() | ||
1384 | 43 | |||
1385 | 44 | # Horizontal box with clear, word field and search button | ||
1386 | 45 | toolbarBox = elementary.Box(self.main.win) | ||
1387 | 46 | toolbarBox.horizontal_set(True) | ||
1388 | 47 | toolbarBox.homogenous_set(True) | ||
1389 | 48 | toolbarBox.size_hint_weight_set(1.0, 0.0) | ||
1390 | 49 | toolbarBox.size_hint_align_set(-1.0, 0.0) | ||
1391 | 50 | |||
1392 | 51 | # Dictionaries icon | ||
1393 | 52 | self.dictionariesButton = elementary.Button(self.main.win) | ||
1394 | 53 | dictionariesIcon = elementary.Icon(self.dictionariesButton) | ||
1395 | 54 | dictionariesIcon.file_set(DICTIONARIES_ICON) | ||
1396 | 55 | self.dictionariesButton.icon_set(dictionariesIcon) | ||
1397 | 56 | self.dictionariesButton.size_hint_weight_set(1.0, 1.0) | ||
1398 | 57 | self.dictionariesButton.size_hint_align_set(-1.0, -1.0) | ||
1399 | 58 | toolbarBox.pack_end(self.dictionariesButton) | ||
1400 | 59 | self.dictionariesButton.show() | ||
1401 | 60 | |||
1402 | 61 | # Settings toolbar icon | ||
1403 | 62 | self.settingsButton = elementary.Button(self.main.win) | ||
1404 | 63 | settingsIcon = elementary.Icon(self.settingsButton) | ||
1405 | 64 | settingsIcon.file_set(SETTINGS_ICON) | ||
1406 | 65 | self.settingsButton.icon_set(settingsIcon) | ||
1407 | 66 | self.settingsButton.size_hint_weight_set(1.0, 1.0) | ||
1408 | 67 | self.settingsButton.size_hint_align_set(-1.0, -1.0) | ||
1409 | 68 | toolbarBox.pack_end(self.settingsButton) | ||
1410 | 69 | self.settingsButton.show() | ||
1411 | 70 | |||
1412 | 71 | # Speak toolbar icon | ||
1413 | 72 | self.speakButton = elementary.Button(self.main.win) | ||
1414 | 73 | speakIcon = elementary.Icon(self.speakButton) | ||
1415 | 74 | speakIcon.file_set(SPEAK_ICON) | ||
1416 | 75 | self.speakButton.icon_set(speakIcon) | ||
1417 | 76 | self.speakButton.size_hint_weight_set(1.0, 1.0) | ||
1418 | 77 | self.speakButton.size_hint_align_set(-1.0, -1.0) | ||
1419 | 78 | toolbarBox.pack_end(self.speakButton) | ||
1420 | 79 | self.speakButton.show() | ||
1421 | 80 | |||
1422 | 81 | self.box.pack_end(toolbarBox) | ||
1423 | 82 | toolbarBox.show() | ||
1424 | 83 | |||
1425 | 84 | # Horizontal box with clear, word field and search button | ||
1426 | 85 | bx2 = elementary.Box(self.main.win) | ||
1427 | 86 | bx2.horizontal_set(True) | ||
1428 | 87 | #bx2.homogenous_set(True) | ||
1429 | 88 | bx2.size_hint_weight_set(1.0, 0.0) | ||
1430 | 89 | bx2.size_hint_align_set(-1.0, 0.0) | ||
1431 | 90 | |||
1432 | 91 | # Clear button | ||
1433 | 92 | self.clearButton = elementary.Button(self.main.win) | ||
1434 | 93 | ic = elementary.Icon(self.clearButton) | ||
1435 | 94 | ic.file_set(CLEAR_ICON) | ||
1436 | 95 | self.clearButton.icon_set(ic) | ||
1437 | 96 | # workround for nice position | ||
1438 | 97 | self.clearButton.label_set(" ") | ||
1439 | 98 | self.clearButton.size_hint_weight_set(0.0, 1.0) | ||
1440 | 99 | self.clearButton.size_hint_align_set(-1.0, -1.0) | ||
1441 | 100 | bx2.pack_end(self.clearButton) | ||
1442 | 101 | self.clearButton.show() | ||
1443 | 102 | |||
1444 | 103 | # Word field | ||
1445 | 104 | self.word = elementary.Entry(self.main.win) | ||
1446 | 105 | self.word.line_wrap_set(False) | ||
1447 | 106 | self.word.entry_set("") | ||
1448 | 107 | self.word.single_line_set(True) | ||
1449 | 108 | self.word.scale_set(1.5) | ||
1450 | 109 | self.word.size_hint_weight_set(1.0, 1.0) | ||
1451 | 110 | self.word.size_hint_align_set(-1.0, -1.0) | ||
1452 | 111 | bx2.pack_end(self.word) | ||
1453 | 112 | self.word.show() | ||
1454 | 113 | |||
1455 | 114 | # Search button | ||
1456 | 115 | self.searchButton = elementary.Button(self.main.win) | ||
1457 | 116 | ic = elementary.Icon(self.main.win) | ||
1458 | 117 | ic.file_set(SEARCH_ICON) | ||
1459 | 118 | self.searchButton.icon_set(ic) | ||
1460 | 119 | # workround for nice position | ||
1461 | 120 | self.searchButton.label_set(" ") | ||
1462 | 121 | self.searchButton.size_hint_weight_set(0.0, 1.0) | ||
1463 | 122 | self.searchButton.size_hint_align_set(-1.0, -1.0) | ||
1464 | 123 | bx2.pack_end(self.searchButton) | ||
1465 | 124 | self.searchButton.show() | ||
1466 | 125 | |||
1467 | 126 | self.box.pack_end(bx2) | ||
1468 | 127 | bx2.show() | ||
1469 | 128 | |||
1470 | 129 | # Frame | ||
1471 | 130 | self.fr = elementary.Frame(self.main.win) | ||
1472 | 131 | self.fr.label_set(' ') | ||
1473 | 132 | self.fr.size_hint_weight_set(1.0, 1.0) | ||
1474 | 133 | self.fr.size_hint_align_set(-1.0, -1.0) | ||
1475 | 134 | |||
1476 | 135 | # Entry scroller | ||
1477 | 136 | sc = elementary.Scroller(self.main.win) | ||
1478 | 137 | sc.size_hint_weight_set(1.0, 1.0) | ||
1479 | 138 | sc.size_hint_align_set(-1.0, -1.0) | ||
1480 | 139 | ## hide scrollbars | ||
1481 | 140 | #sc.policy_set(2, 2) | ||
1482 | 141 | ## make it non-bouncing | ||
1483 | 142 | #sc.drag_bouncy_set(0) | ||
1484 | 143 | |||
1485 | 144 | # Definition text area | ||
1486 | 145 | self.definition = elementary.Entry(self.main.win) | ||
1487 | 146 | #self.definition.line_wrap_set(True) | ||
1488 | 147 | self.definition.line_wrap_set(False) | ||
1489 | 148 | self.definition.scale_set(1.25) | ||
1490 | 149 | self.definition.entry_set("") | ||
1491 | 150 | self.definition.single_line_set(False) | ||
1492 | 151 | self.definition.editable_set(False) | ||
1493 | 152 | self.definition.size_hint_weight_set(1.0, 1.0) | ||
1494 | 153 | self.definition.size_hint_align_set(-1.0, -1.0) | ||
1495 | 154 | |||
1496 | 155 | sc.content_set(self.definition) | ||
1497 | 156 | self.fr.content_set(sc) | ||
1498 | 157 | |||
1499 | 158 | self.definition.show() | ||
1500 | 159 | self.fr.show() | ||
1501 | 160 | sc.show() | ||
1502 | 161 | |||
1503 | 162 | self.box.pack_end(self.fr) | ||
1504 | 163 | |||
1505 | 164 | def frame_title_set(self, text): | ||
1506 | 165 | if self.box: | ||
1507 | 166 | if (len(text) > WIDTH): | ||
1508 | 167 | text = text[:WIDTH-3] + '...' | ||
1509 | 168 | self.fr.label_set(text) | ||
1510 | 169 | |||
1511 | 170 | def content_set(self, text): | ||
1512 | 171 | definitionString = textwrap.fill(text, WIDTH) | ||
1513 | 172 | definitionString = re.sub("\n", "<br>", definitionString) | ||
1514 | 173 | self.definition.entry_set(definitionString) | ||
1515 | 0 | 174 | ||
1516 | === added file 'efl/dictionaries_ui.py' | |||
1517 | --- efl/dictionaries_ui.py 1970-01-01 00:00:00 +0000 | |||
1518 | +++ efl/dictionaries_ui.py 2010-02-08 17:08:19 +0000 | |||
1519 | @@ -0,0 +1,196 @@ | |||
1520 | 1 | #!/usr/bin/env python | ||
1521 | 2 | # -*- coding: utf-8 -*- | ||
1522 | 3 | |||
1523 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1524 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1525 | 6 | # it under the terms of the GNU General Public License as published by | ||
1526 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1527 | 8 | # (at your option) any later version. | ||
1528 | 9 | # | ||
1529 | 10 | # This program is distributed in the hope that it will be useful, | ||
1530 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1531 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1532 | 13 | # GNU General Public License for more details. | ||
1533 | 14 | # | ||
1534 | 15 | # You should have received a copy of the GNU General Public License along | ||
1535 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1536 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1537 | 18 | import elementary | ||
1538 | 19 | |||
1539 | 20 | import logging | ||
1540 | 21 | log = logging.getLogger("babiloo.efl.dictionariesPage") | ||
1541 | 22 | |||
1542 | 23 | from efl.constants import * | ||
1543 | 24 | |||
1544 | 25 | class DictionariesPage(): | ||
1545 | 26 | |||
1546 | 27 | # Initialization | ||
1547 | 28 | def __init__(self, main): | ||
1548 | 29 | self.main = main | ||
1549 | 30 | self.box = None | ||
1550 | 31 | |||
1551 | 32 | # | ||
1552 | 33 | # self.box | ||
1553 | 34 | # scroller | ||
1554 | 35 | # boxScroller | ||
1555 | 36 | # for each Section | ||
1556 | 37 | # frameSection | ||
1557 | 38 | # boxSection | ||
1558 | 39 | # quitDictionariesWin | ||
1559 | 40 | def setupUi(self): | ||
1560 | 41 | |||
1561 | 42 | # Box Window with scroller and quit button | ||
1562 | 43 | self.box = elementary.Box(self.main.win) | ||
1563 | 44 | self.box.horizontal_set(False) | ||
1564 | 45 | self.main.win.resize_object_add(self.box) | ||
1565 | 46 | self.box.size_hint_weight_set(1.0, 1.0) | ||
1566 | 47 | self.box.size_hint_align_set(-1, -1) | ||
1567 | 48 | self.box.show() | ||
1568 | 49 | |||
1569 | 50 | # Scroller | ||
1570 | 51 | scroller = elementary.Scroller(self.main.win) | ||
1571 | 52 | scroller.bounce_set(0, 0) | ||
1572 | 53 | scroller.size_hint_weight_set(1.0, 1.0) | ||
1573 | 54 | scroller.size_hint_align_set(-1.0, -1.0) | ||
1574 | 55 | self.box.pack_end(scroller) | ||
1575 | 56 | scroller.show() | ||
1576 | 57 | |||
1577 | 58 | # Quit button | ||
1578 | 59 | self.quitDictionariesWin = elementary.Button(self.main.win) | ||
1579 | 60 | self.quitDictionariesWin.label_set("Quit") | ||
1580 | 61 | self.quitDictionariesWin.size_hint_align_set(-1.0, 0.0) | ||
1581 | 62 | ic = elementary.Icon(self.quitDictionariesWin) | ||
1582 | 63 | ic.file_set( QUIT_ICON) | ||
1583 | 64 | ic.smooth_set(1) | ||
1584 | 65 | ic.scale_set(1, 1) | ||
1585 | 66 | self.quitDictionariesWin.icon_set(ic) | ||
1586 | 67 | self.quitDictionariesWin.show() | ||
1587 | 68 | self.box.pack_end(self.quitDictionariesWin) | ||
1588 | 69 | |||
1589 | 70 | # Box inside scroller | ||
1590 | 71 | boxScroller = elementary.Box(self.main.win) | ||
1591 | 72 | boxScroller.horizontal_set(False) | ||
1592 | 73 | boxScroller.size_hint_weight_set(1.0, -1.0) | ||
1593 | 74 | scroller.content_set(boxScroller) | ||
1594 | 75 | boxScroller.show() | ||
1595 | 76 | |||
1596 | 77 | # Frame for dictionary section | ||
1597 | 78 | self.createDictionaryFrame() | ||
1598 | 79 | boxScroller.pack_end(self.frameDictionary) | ||
1599 | 80 | |||
1600 | 81 | # Frame for sound dictionary section | ||
1601 | 82 | self.createSoundDictionaryFrame() | ||
1602 | 83 | boxScroller.pack_end(self.frameSoundDictionary) | ||
1603 | 84 | |||
1604 | 85 | def createDictionaryFrame(self): | ||
1605 | 86 | self.frameDictionary = elementary.Frame(self.main.win) | ||
1606 | 87 | self.frameDictionary.label_set("Dictionary FILE NAME") | ||
1607 | 88 | self.frameDictionary.size_hint_align_set(-1.0, 0.0) | ||
1608 | 89 | self.frameDictionary.show() | ||
1609 | 90 | |||
1610 | 91 | # Box for dictionary section | ||
1611 | 92 | boxDictionary = elementary.Box(self.main.win) | ||
1612 | 93 | boxDictionary.horizontal_set(False) | ||
1613 | 94 | boxDictionary.size_hint_align_set(-1.0, 0.0) | ||
1614 | 95 | boxDictionary.show() | ||
1615 | 96 | |||
1616 | 97 | # Box object with 'New dictionary' and 'DictionaryPathEntry' | ||
1617 | 98 | boxDictionaryPathEntry= elementary.Box(self.main.win) | ||
1618 | 99 | boxDictionaryPathEntry.horizontal_set(True) | ||
1619 | 100 | boxDictionaryPathEntry.size_hint_weight_set(1.0, 1.0) | ||
1620 | 101 | boxDictionaryPathEntry.show() | ||
1621 | 102 | |||
1622 | 103 | # New dictionary button | ||
1623 | 104 | self.newDictionaryButton = elementary.Button(self.main.win) | ||
1624 | 105 | ic = elementary.Icon(self.newDictionaryButton) | ||
1625 | 106 | ic.file_set(NEW_DICTIONARY_ICON) | ||
1626 | 107 | self.newDictionaryButton.icon_set(ic) | ||
1627 | 108 | # workround for nice position | ||
1628 | 109 | self.newDictionaryButton.label_set(" ") | ||
1629 | 110 | self.newDictionaryButton.size_hint_weight_set(0.0, 1.0) | ||
1630 | 111 | self.newDictionaryButton.size_hint_align_set(-1.0, -1.0) | ||
1631 | 112 | self.newDictionaryButton.show() | ||
1632 | 113 | |||
1633 | 114 | # Dictionary path entry | ||
1634 | 115 | self.dictionaryEntry = elementary.Entry(self.main.win) | ||
1635 | 116 | self.dictionaryEntry.line_wrap_set(False) | ||
1636 | 117 | self.dictionaryEntry.entry_set('') | ||
1637 | 118 | self.dictionaryEntry.single_line_set(True) | ||
1638 | 119 | self.dictionaryEntry.editable_set(False) | ||
1639 | 120 | self.newDictionaryButton.size_hint_weight_set(0.0, 1.0) | ||
1640 | 121 | self.dictionaryEntry.size_hint_align_set(-1.0, -1.0) | ||
1641 | 122 | self.dictionaryEntry.scale_set(1.25) | ||
1642 | 123 | |||
1643 | 124 | self.dictionaryEntry.show() | ||
1644 | 125 | |||
1645 | 126 | boxDictionaryPathEntry.pack_end(self.newDictionaryButton) | ||
1646 | 127 | boxDictionaryPathEntry.pack_end(self.dictionaryEntry) | ||
1647 | 128 | |||
1648 | 129 | # File selector | ||
1649 | 130 | self.saveDictionary = elementary.Button(self.main.win) | ||
1650 | 131 | self.saveDictionary.label_set("Save ( it takes time! )") | ||
1651 | 132 | self.saveDictionary.size_hint_align_set(-1.0, 0.0) | ||
1652 | 133 | self.saveDictionary.show() | ||
1653 | 134 | |||
1654 | 135 | boxDictionary.pack_end(boxDictionaryPathEntry) | ||
1655 | 136 | boxDictionary.pack_end(self.saveDictionary) | ||
1656 | 137 | |||
1657 | 138 | self.frameDictionary.content_set(boxDictionary) | ||
1658 | 139 | |||
1659 | 140 | |||
1660 | 141 | def createSoundDictionaryFrame(self): | ||
1661 | 142 | self.frameSoundDictionary = elementary.Frame(self.main.win) | ||
1662 | 143 | self.frameSoundDictionary.label_set("Sound dictionary PATH") | ||
1663 | 144 | self.frameSoundDictionary.size_hint_align_set(-1.0, 0.0) | ||
1664 | 145 | self.frameSoundDictionary.show() | ||
1665 | 146 | |||
1666 | 147 | # Box for sound dictionary section | ||
1667 | 148 | boxSoundDictionary = elementary.Box(self.main.win) | ||
1668 | 149 | boxSoundDictionary.horizontal_set(False) | ||
1669 | 150 | boxSoundDictionary.size_hint_align_set(-1.0, 0.0) | ||
1670 | 151 | boxSoundDictionary.show() | ||
1671 | 152 | |||
1672 | 153 | # Box object with 'New sound dictionary' and 'SoundDictionaryPathEntry' | ||
1673 | 154 | boxSoundDictionaryPathEntry= elementary.Box(self.main.win) | ||
1674 | 155 | boxSoundDictionaryPathEntry.horizontal_set(True) | ||
1675 | 156 | boxSoundDictionaryPathEntry.size_hint_weight_set(1.0, 1.0) | ||
1676 | 157 | boxSoundDictionaryPathEntry.show() | ||
1677 | 158 | |||
1678 | 159 | # New dictionary button | ||
1679 | 160 | self.newSoundDictionaryButton = elementary.Button(self.main.win) | ||
1680 | 161 | ic = elementary.Icon(self.newSoundDictionaryButton) | ||
1681 | 162 | ic.file_set(NEW_SOUND_DICTIONARY_ICON) | ||
1682 | 163 | self.newSoundDictionaryButton.icon_set(ic) | ||
1683 | 164 | # workround for nice position | ||
1684 | 165 | self.newSoundDictionaryButton.label_set(" ") | ||
1685 | 166 | self.newSoundDictionaryButton.size_hint_weight_set(0.0, 1.0) | ||
1686 | 167 | self.newSoundDictionaryButton.size_hint_align_set(-1.0, -1.0) | ||
1687 | 168 | self.newSoundDictionaryButton.show() | ||
1688 | 169 | |||
1689 | 170 | # Dictionary path entry | ||
1690 | 171 | self.soundDictionaryEntry = elementary.Entry(self.main.win) | ||
1691 | 172 | self.soundDictionaryEntry.line_wrap_set(False) | ||
1692 | 173 | self.soundDictionaryEntry.entry_set('') | ||
1693 | 174 | self.soundDictionaryEntry.single_line_set(True) | ||
1694 | 175 | self.soundDictionaryEntry.editable_set(False) | ||
1695 | 176 | self.newSoundDictionaryButton.size_hint_weight_set(0.0, 1.0) | ||
1696 | 177 | self.soundDictionaryEntry.size_hint_align_set(-1.0, -1.0) | ||
1697 | 178 | self.soundDictionaryEntry.scale_set(1.25) | ||
1698 | 179 | |||
1699 | 180 | self.soundDictionaryEntry.show() | ||
1700 | 181 | |||
1701 | 182 | boxSoundDictionaryPathEntry.pack_end(self.newSoundDictionaryButton) | ||
1702 | 183 | boxSoundDictionaryPathEntry.pack_end(self.soundDictionaryEntry) | ||
1703 | 184 | |||
1704 | 185 | # File selector | ||
1705 | 186 | self.saveSoundDictionary = elementary.Button(self.main.win) | ||
1706 | 187 | self.saveSoundDictionary.label_set("Save") | ||
1707 | 188 | self.saveSoundDictionary.size_hint_align_set(-1.0, 0.0) | ||
1708 | 189 | self.saveSoundDictionary.show() | ||
1709 | 190 | |||
1710 | 191 | boxSoundDictionary.pack_end(boxSoundDictionaryPathEntry) | ||
1711 | 192 | boxSoundDictionary.pack_end(self.saveSoundDictionary) | ||
1712 | 193 | |||
1713 | 194 | self.frameSoundDictionary.content_set(boxSoundDictionary) | ||
1714 | 195 | |||
1715 | 196 | |||
1716 | 0 | \ No newline at end of file | 197 | \ No newline at end of file |
1717 | 1 | 198 | ||
1718 | === added file 'efl/main.py' | |||
1719 | --- efl/main.py 1970-01-01 00:00:00 +0000 | |||
1720 | +++ efl/main.py 2010-02-08 17:08:19 +0000 | |||
1721 | @@ -0,0 +1,48 @@ | |||
1722 | 1 | #!/usr/bin/env python | ||
1723 | 2 | # -*- coding: utf-8 -*- | ||
1724 | 3 | |||
1725 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1726 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1727 | 6 | # it under the terms of the GNU General Public License as published by | ||
1728 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1729 | 8 | # (at your option) any later version. | ||
1730 | 9 | # | ||
1731 | 10 | # This program is distributed in the hope that it will be useful, | ||
1732 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1733 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1734 | 13 | # GNU General Public License for more details. | ||
1735 | 14 | # | ||
1736 | 15 | # You should have received a copy of the GNU General Public License along | ||
1737 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1738 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1739 | 18 | from main_ui import Ui_Main | ||
1740 | 19 | from main_model import Model | ||
1741 | 20 | import elementary | ||
1742 | 21 | |||
1743 | 22 | import logging | ||
1744 | 23 | log = logging.getLogger("babiloo.efl.main") | ||
1745 | 24 | |||
1746 | 25 | from efl.constants import * | ||
1747 | 26 | |||
1748 | 27 | class Main(Ui_Main, Model): | ||
1749 | 28 | |||
1750 | 29 | def __init__(self, options): | ||
1751 | 30 | |||
1752 | 31 | # Create UI | ||
1753 | 32 | elementary.init() | ||
1754 | 33 | self.setupUi() | ||
1755 | 34 | |||
1756 | 35 | # Load database, if already set | ||
1757 | 36 | self.loadDatabase() | ||
1758 | 37 | |||
1759 | 38 | # Destroy method binding | ||
1760 | 39 | self.win.callback_destroy_add(self.destroy, (APP_NAME)) | ||
1761 | 40 | |||
1762 | 41 | # Start elementary UI | ||
1763 | 42 | elementary.run() | ||
1764 | 43 | elementary.shutdown() | ||
1765 | 44 | |||
1766 | 45 | def main(options): | ||
1767 | 46 | log.debug("Building main dialog") | ||
1768 | 47 | Main(options) | ||
1769 | 48 | |||
1770 | 0 | \ No newline at end of file | 49 | \ No newline at end of file |
1771 | 1 | 50 | ||
1772 | === added file 'efl/main_model.py' | |||
1773 | --- efl/main_model.py 1970-01-01 00:00:00 +0000 | |||
1774 | +++ efl/main_model.py 2010-02-08 17:08:19 +0000 | |||
1775 | @@ -0,0 +1,352 @@ | |||
1776 | 1 | #!/usr/bin/env python | ||
1777 | 2 | # -*- coding: utf-8 -*- | ||
1778 | 3 | |||
1779 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
1780 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1781 | 6 | # it under the terms of the GNU General Public License as published by | ||
1782 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
1783 | 8 | # (at your option) any later version. | ||
1784 | 9 | # | ||
1785 | 10 | # This program is distributed in the hope that it will be useful, | ||
1786 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1787 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1788 | 13 | # GNU General Public License for more details. | ||
1789 | 14 | # | ||
1790 | 15 | # You should have received a copy of the GNU General Public License along | ||
1791 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
1792 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
1793 | 18 | from time import time | ||
1794 | 19 | import os | ||
1795 | 20 | |||
1796 | 21 | import ecore | ||
1797 | 22 | import elementary | ||
1798 | 23 | |||
1799 | 24 | from core.modules import * | ||
1800 | 25 | import core.dictionary.engine as engine | ||
1801 | 26 | |||
1802 | 27 | import logging | ||
1803 | 28 | log = logging.getLogger("babiloo.efl.main_model") | ||
1804 | 29 | |||
1805 | 30 | from efl.constants import * | ||
1806 | 31 | from efl.config import Config | ||
1807 | 32 | from core.modules.status import Status | ||
1808 | 33 | from utils_ui import UtilsUi | ||
1809 | 34 | |||
1810 | 35 | config = Config() | ||
1811 | 36 | utils = UtilsUi() | ||
1812 | 37 | |||
1813 | 38 | class Model(): | ||
1814 | 39 | |||
1815 | 40 | # Destroy called on destroy window | ||
1816 | 41 | def destroy(self, obj, data): | ||
1817 | 42 | |||
1818 | 43 | # Save settings | ||
1819 | 44 | config.save() | ||
1820 | 45 | |||
1821 | 46 | # Exit | ||
1822 | 47 | elementary.exit() | ||
1823 | 48 | |||
1824 | 49 | # Load database for Neo or Netbook | ||
1825 | 50 | def loadDatabase(self): | ||
1826 | 51 | |||
1827 | 52 | # Load database | ||
1828 | 53 | if config.get('dictionary_path') != '': | ||
1829 | 54 | |||
1830 | 55 | # Show ''Loading database ...'' | ||
1831 | 56 | self.create_loadingFrame("Please wait...<br>Loading dictionary...") | ||
1832 | 57 | |||
1833 | 58 | # it doesn't work well on OpenGeu / Ubuntu + OzOs | ||
1834 | 59 | # it works well on Neo and Elive | ||
1835 | 60 | ecore.idler_add(self.loadDatabaseCore) | ||
1836 | 61 | |||
1837 | 62 | else: | ||
1838 | 63 | self.create_dialog("No dictionary to load") | ||
1839 | 64 | |||
1840 | 65 | # TODO Set percentage status | ||
1841 | 66 | def setStatus(self, status): | ||
1842 | 67 | print "%d" % status | ||
1843 | 68 | #self.loadinglabel.label_set("Loading dictionary...<br> %d%%" %status) | ||
1844 | 69 | |||
1845 | 70 | # Call the babiloo core module for loading the database | ||
1846 | 71 | def loadDatabaseCore(self): | ||
1847 | 72 | nowtime = time() | ||
1848 | 73 | self.dictionary_name = ' ' | ||
1849 | 74 | try: | ||
1850 | 75 | self.engine = engine.DictionaryEngine() | ||
1851 | 76 | |||
1852 | 77 | self.testdict = self.engine.loadDictionary(config.get('dictionary_path')) | ||
1853 | 78 | self.dictionary_name = self.engine.getDictionary( self.testdict['dict'].getUniqueId() ).getName() | ||
1854 | 79 | except: | ||
1855 | 80 | log.error("Dictionary can't be loaded!") | ||
1856 | 81 | self.create_dialog("Dictionary can't be loaded!") | ||
1857 | 82 | |||
1858 | 83 | # Hide the loading frame | ||
1859 | 84 | self.loading.hide() | ||
1860 | 85 | |||
1861 | 86 | # Put the database name on the frame title | ||
1862 | 87 | self.definitionPage.frame_title_set(self.dictionary_name) | ||
1863 | 88 | log.info("Dictionary loaded in %.2f sec" % (time() - nowtime) ) | ||
1864 | 89 | |||
1865 | 90 | # Close the thread | ||
1866 | 91 | return None | ||
1867 | 92 | |||
1868 | 93 | def speak(self, obj, data): | ||
1869 | 94 | |||
1870 | 95 | # check if the player exists | ||
1871 | 96 | if not os.path.exists(config.get('player')): | ||
1872 | 97 | self.create_dialog("Please install %s" %config.get('player')); | ||
1873 | 98 | return | ||
1874 | 99 | |||
1875 | 100 | # check if the sound dictionary path is set | ||
1876 | 101 | if config.get('sound_dictionary_path') == '': | ||
1877 | 102 | self.create_dialog("Sound dictionary path not set"); | ||
1878 | 103 | return | ||
1879 | 104 | |||
1880 | 105 | # check if the sound dictionary path exists | ||
1881 | 106 | if not os.path.exists(config.get('sound_dictionary_path')): | ||
1882 | 107 | self.create_dialog("Sound dictionary path not valid %s" %config.get('sound_dictionary_path')); | ||
1883 | 108 | return | ||
1884 | 109 | |||
1885 | 110 | # searched word | ||
1886 | 111 | speakWord = data.entry_get() | ||
1887 | 112 | speakWord = speakWord.strip() | ||
1888 | 113 | |||
1889 | 114 | # if the user inserted the word in the entry filed | ||
1890 | 115 | if len(speakWord) != 0: | ||
1891 | 116 | speakWord = config.get('sound_dictionary_path') + '/' + speakWord[0] + '/' + speakWord + '.wav' | ||
1892 | 117 | log.debug("Speak %s" % speakWord) | ||
1893 | 118 | if not os.path.exists(speakWord): | ||
1894 | 119 | self.create_dialog("Word not found"); | ||
1895 | 120 | return | ||
1896 | 121 | speakCmd = config.get('player') + " %s" % speakWord | ||
1897 | 122 | log.debug(speakCmd) | ||
1898 | 123 | os.system(speakCmd + ' &') | ||
1899 | 124 | |||
1900 | 125 | def clear_text_field(self, obj, data): | ||
1901 | 126 | data.entry_set("") | ||
1902 | 127 | |||
1903 | 128 | def search_word(self, obj, input): | ||
1904 | 129 | |||
1905 | 130 | # if the database is loaded | ||
1906 | 131 | if config.get('dictionary_path') != '': | ||
1907 | 132 | |||
1908 | 133 | # searched word | ||
1909 | 134 | self.word = input.entry_get() | ||
1910 | 135 | self.word = self.word.strip() | ||
1911 | 136 | |||
1912 | 137 | # if the user inserted the word in the entry filed | ||
1913 | 138 | if len(self.word) != 0: | ||
1914 | 139 | log.debug("Searched word: %s" % self.word) | ||
1915 | 140 | |||
1916 | 141 | try: | ||
1917 | 142 | result = self.engine.search(self.word, self.testdict['dict'].getUniqueId()) | ||
1918 | 143 | |||
1919 | 144 | # Format the dictionary result | ||
1920 | 145 | self.definitionPage.content_set( result.content() ) | ||
1921 | 146 | |||
1922 | 147 | except KeyError: | ||
1923 | 148 | self.create_dialog("Word %s not found" %self.word) | ||
1924 | 149 | except: | ||
1925 | 150 | self.create_dialog("Error during the search of %s" %self.word) | ||
1926 | 151 | |||
1927 | 152 | else: | ||
1928 | 153 | self.create_dialog("You have to load the dictionary") | ||
1929 | 154 | |||
1930 | 155 | # Browse for selecting the dictionary file | ||
1931 | 156 | def newDictionaryClicked(self, obj): | ||
1932 | 157 | utils.fileSelectorUI() | ||
1933 | 158 | |||
1934 | 159 | def fs_cb_done(obj, event_info, data): | ||
1935 | 160 | if event_info is not None: | ||
1936 | 161 | |||
1937 | 162 | # Cut br. Depends of the Elementary version! | ||
1938 | 163 | event_info = event_info.replace('<br>', '') | ||
1939 | 164 | |||
1940 | 165 | # If is not a directory | ||
1941 | 166 | if event_info[-1] != '/': | ||
1942 | 167 | # Used in the save action | ||
1943 | 168 | self.newDictionary = event_info | ||
1944 | 169 | utils.filename_set(self.dictionariesPage.dictionaryEntry, self.newDictionary) | ||
1945 | 170 | utils.fileSelectorWindow.hide() | ||
1946 | 171 | else: | ||
1947 | 172 | self.create_dialog("You have to select the dictionary file.") | ||
1948 | 173 | else: | ||
1949 | 174 | data.delete() | ||
1950 | 175 | utils.fileSelector.callback_done_add(fs_cb_done, utils.fileSelectorWindow) | ||
1951 | 176 | |||
1952 | 177 | # Browse for selecting the sound dictionary path | ||
1953 | 178 | def newSoundDictionaryClicked(self, obj): | ||
1954 | 179 | utils.fileSelectorUI() | ||
1955 | 180 | |||
1956 | 181 | def fs_cb_done(obj, event_info, data): | ||
1957 | 182 | if event_info is not None: | ||
1958 | 183 | |||
1959 | 184 | # Cut br. Depends of the Elementary version! | ||
1960 | 185 | event_info = event_info.replace('<br>', '') | ||
1961 | 186 | |||
1962 | 187 | # If is a directory | ||
1963 | 188 | if event_info[-1] == '/': | ||
1964 | 189 | # Used in the save action | ||
1965 | 190 | self.newSoundDictionary = event_info | ||
1966 | 191 | utils.filename_set(self.dictionariesPage.soundDictionaryEntry, self.newSoundDictionary) | ||
1967 | 192 | utils.fileSelectorWindow.hide() | ||
1968 | 193 | else: | ||
1969 | 194 | self.create_dialog("You have to select a dictionary.<br>\ | ||
1970 | 195 | The directory should contain folders<br>\ | ||
1971 | 196 | a, b, c and so on") | ||
1972 | 197 | else: | ||
1973 | 198 | data.delete() | ||
1974 | 199 | utils.fileSelector.callback_done_add(fs_cb_done, utils.fileSelectorWindow) | ||
1975 | 200 | |||
1976 | 201 | # Browse for selecting the player | ||
1977 | 202 | def newPlayerClicked(self, obj): | ||
1978 | 203 | utils.fileSelectorUI() | ||
1979 | 204 | |||
1980 | 205 | def fs_cb_done(obj, event_info, data): | ||
1981 | 206 | if event_info is not None: | ||
1982 | 207 | |||
1983 | 208 | # Cut br. Depends of the Elementary version! | ||
1984 | 209 | event_info = event_info.replace('<br>', '') | ||
1985 | 210 | |||
1986 | 211 | # If is not a directory | ||
1987 | 212 | if event_info[-1] != '/': | ||
1988 | 213 | # Used in the save action | ||
1989 | 214 | self.newPlayer = event_info | ||
1990 | 215 | utils.filename_set(self.settingsPage.playerEntry, self.newPlayer) | ||
1991 | 216 | utils.fileSelectorWindow.hide() | ||
1992 | 217 | else: | ||
1993 | 218 | self.create_dialog("You have to select player executable file.") | ||
1994 | 219 | else: | ||
1995 | 220 | data.delete() | ||
1996 | 221 | utils.fileSelector.callback_done_add(fs_cb_done, utils.fileSelectorWindow) | ||
1997 | 222 | |||
1998 | 223 | # Load the new dictionary | ||
1999 | 224 | def saveDictionaryClicked(self, obj): | ||
2000 | 225 | self.promoteDefinitionPage() | ||
2001 | 226 | if self.newDictionary is not None: | ||
2002 | 227 | log.info("Save dictionary in the configuration %s" % self.newDictionary) | ||
2003 | 228 | config.set('dictionary_path', self.newDictionary) | ||
2004 | 229 | self.loadDatabase() | ||
2005 | 230 | |||
2006 | 231 | # Load the new sound dictionary | ||
2007 | 232 | def saveSoundDictionaryClicked(self, obj): | ||
2008 | 233 | self.promoteDefinitionPage() | ||
2009 | 234 | if self.newSoundDictionary is not None: | ||
2010 | 235 | log.info("Save sound dictionary in the configuration %s" % self.newSoundDictionary) | ||
2011 | 236 | config.set('sound_dictionary_path', self.newSoundDictionary) | ||
2012 | 237 | |||
2013 | 238 | # Load player | ||
2014 | 239 | def savePlayerClicked(self, obj): | ||
2015 | 240 | self.promoteDefinitionPage() | ||
2016 | 241 | if self.newPlayer is not None: | ||
2017 | 242 | log.info("Save player in the configuration %s" % self.newPlayer) | ||
2018 | 243 | config.set('player', self.newPlayer) | ||
2019 | 244 | |||
2020 | 245 | def promote(self, boxToPromote): | ||
2021 | 246 | if self.definitionPage.box: | ||
2022 | 247 | self.definitionPage.box.hide() | ||
2023 | 248 | if self.dictionariesPage.box: | ||
2024 | 249 | self.dictionariesPage.box.hide() | ||
2025 | 250 | if self.settingsPage.box: | ||
2026 | 251 | self.settingsPage.box.hide() | ||
2027 | 252 | if self.aboutPage.box: | ||
2028 | 253 | self.aboutPage.box.hide() | ||
2029 | 254 | self.win.resize(SCREEN_WIDTH, SCREEN_HEIGHT) | ||
2030 | 255 | boxToPromote.show() | ||
2031 | 256 | |||
2032 | 257 | def promoteDefinitionPage(self, obj=None, event=None, data=None): | ||
2033 | 258 | |||
2034 | 259 | if not self.definitionPage.box: | ||
2035 | 260 | |||
2036 | 261 | # Setup UI | ||
2037 | 262 | self.definitionPage.setupUi() | ||
2038 | 263 | |||
2039 | 264 | # Bind methods | ||
2040 | 265 | self.definitionPage.dictionariesButton.callback_clicked_add(self.promoteDictionariesPage) | ||
2041 | 266 | self.definitionPage.settingsButton.callback_clicked_add(self.promoteSettingsPage) | ||
2042 | 267 | self.definitionPage.speakButton.callback_clicked_add(self.speak, self.definitionPage.word) | ||
2043 | 268 | self.definitionPage.clearButton.callback_clicked_add(self.clear_text_field, self.definitionPage.word) | ||
2044 | 269 | self.definitionPage.searchButton.callback_clicked_add(self.search_word, self.definitionPage.word) | ||
2045 | 270 | self.definitionPage.definition.callback_activated_add(self.search_word, self.definitionPage.word) | ||
2046 | 271 | |||
2047 | 272 | # Put the definition page on the top of the pager | ||
2048 | 273 | self.promote(self.definitionPage.box) | ||
2049 | 274 | |||
2050 | 275 | def promoteDictionariesPage(self, obj=None, event=None, data=None): | ||
2051 | 276 | |||
2052 | 277 | if not self.dictionariesPage.box: | ||
2053 | 278 | |||
2054 | 279 | # Setup UI | ||
2055 | 280 | self.dictionariesPage.setupUi() | ||
2056 | 281 | |||
2057 | 282 | # Set quit function | ||
2058 | 283 | self.dictionariesPage.quitDictionariesWin.callback_clicked_add(self.promoteDefinitionPage) | ||
2059 | 284 | |||
2060 | 285 | # Show the loaded dictionary | ||
2061 | 286 | self.newDictionary = config.get('dictionary_path') | ||
2062 | 287 | |||
2063 | 288 | # Set dictionary filename from configuration | ||
2064 | 289 | utils.filename_set(self.dictionariesPage.dictionaryEntry, self.newDictionary) | ||
2065 | 290 | |||
2066 | 291 | # Set new dictionary function | ||
2067 | 292 | self.dictionariesPage.newDictionaryButton.callback_clicked_add(self.newDictionaryClicked) | ||
2068 | 293 | |||
2069 | 294 | # Set save function | ||
2070 | 295 | self.dictionariesPage.saveDictionary.callback_clicked_add(self.saveDictionaryClicked) | ||
2071 | 296 | |||
2072 | 297 | # Set the loaded sound dictionary path | ||
2073 | 298 | self.newSoundDictionary = config.get('sound_dictionary_path') | ||
2074 | 299 | |||
2075 | 300 | # Set dictionary filename from configuration | ||
2076 | 301 | utils.filename_set(self.dictionariesPage.soundDictionaryEntry, self.newSoundDictionary) | ||
2077 | 302 | |||
2078 | 303 | # Set new dictionary function | ||
2079 | 304 | self.dictionariesPage.newSoundDictionaryButton.callback_clicked_add(self.newSoundDictionaryClicked) | ||
2080 | 305 | |||
2081 | 306 | # Set save function | ||
2082 | 307 | self.dictionariesPage.saveSoundDictionary.callback_clicked_add(self.saveSoundDictionaryClicked) | ||
2083 | 308 | |||
2084 | 309 | # Put the dictionaries page on the top of the pager | ||
2085 | 310 | self.promote(self.dictionariesPage.box) | ||
2086 | 311 | |||
2087 | 312 | def promoteSettingsPage(self, obj=None, event=None, data=None): | ||
2088 | 313 | |||
2089 | 314 | if not self.settingsPage.box: | ||
2090 | 315 | |||
2091 | 316 | # Setup UI | ||
2092 | 317 | self.settingsPage.setupUi() | ||
2093 | 318 | |||
2094 | 319 | # Quit button | ||
2095 | 320 | self.settingsPage.quitSettingsWin.callback_clicked_add(self.promoteDefinitionPage) | ||
2096 | 321 | |||
2097 | 322 | # Show the loaded player | ||
2098 | 323 | self.newPlayer = config.get('player') | ||
2099 | 324 | |||
2100 | 325 | # Set dictionary filename from configuration | ||
2101 | 326 | utils.filename_set(self.settingsPage.playerEntry, self.newPlayer) | ||
2102 | 327 | |||
2103 | 328 | # Set new dictionary function | ||
2104 | 329 | self.settingsPage.newPlayerButton.callback_clicked_add(self.newPlayerClicked) | ||
2105 | 330 | |||
2106 | 331 | # Set save function | ||
2107 | 332 | self.settingsPage.savePlayer.callback_clicked_add(self.savePlayerClicked) | ||
2108 | 333 | |||
2109 | 334 | # About button | ||
2110 | 335 | self.settingsPage.aboutPageWin.callback_clicked_add(self.promoteAboutPage) | ||
2111 | 336 | |||
2112 | 337 | # Put the setting page on the top of the pager | ||
2113 | 338 | self.promote(self.settingsPage.box) | ||
2114 | 339 | |||
2115 | 340 | def promoteAboutPage(self, obj=None, event=None, data=None): | ||
2116 | 341 | |||
2117 | 342 | if not self.aboutPage.box: | ||
2118 | 343 | |||
2119 | 344 | # Setup UI | ||
2120 | 345 | self.aboutPage.setupUi() | ||
2121 | 346 | |||
2122 | 347 | # Quit button | ||
2123 | 348 | self.aboutPage.quitAboutWin.callback_clicked_add(self.promoteDefinitionPage) | ||
2124 | 349 | |||
2125 | 350 | # Put the setting page on the top of the pager | ||
2126 | 351 | self.promote(self.aboutPage.box) | ||
2127 | 352 | |||
2128 | 0 | \ No newline at end of file | 353 | \ No newline at end of file |
2129 | 1 | 354 | ||
2130 | === added file 'efl/main_ui.py' | |||
2131 | --- efl/main_ui.py 1970-01-01 00:00:00 +0000 | |||
2132 | +++ efl/main_ui.py 2010-02-08 17:08:19 +0000 | |||
2133 | @@ -0,0 +1,117 @@ | |||
2134 | 1 | #!/usr/bin/env python | ||
2135 | 2 | # -*- coding: utf-8 -*- | ||
2136 | 3 | |||
2137 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
2138 | 5 | # This program is free software; you can redistribute it and/or modify | ||
2139 | 6 | # it under the terms of the GNU General Public License as published by | ||
2140 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
2141 | 8 | # (at your option) any later version. | ||
2142 | 9 | # | ||
2143 | 10 | # This program is distributed in the hope that it will be useful, | ||
2144 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2145 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2146 | 13 | # GNU General Public License for more details. | ||
2147 | 14 | # | ||
2148 | 15 | # You should have received a copy of the GNU General Public License along | ||
2149 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
2150 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
2151 | 18 | import elementary | ||
2152 | 19 | |||
2153 | 20 | import logging | ||
2154 | 21 | log = logging.getLogger("babiloo.efl.definition_ui") | ||
2155 | 22 | |||
2156 | 23 | from definition_ui import DefinitionPage | ||
2157 | 24 | from dictionaries_ui import DictionariesPage | ||
2158 | 25 | from settings_ui import SettingsPage | ||
2159 | 26 | from about_ui import AboutPage | ||
2160 | 27 | |||
2161 | 28 | from efl.constants import * | ||
2162 | 29 | |||
2163 | 30 | class Ui_Main(object): | ||
2164 | 31 | |||
2165 | 32 | def setupUi(self): | ||
2166 | 33 | |||
2167 | 34 | # Basic window - name, title | ||
2168 | 35 | self.win = elementary.Window(APP_NAME, elementary.ELM_WIN_BASIC) | ||
2169 | 36 | self.win.title_set(APP_NAME) | ||
2170 | 37 | |||
2171 | 38 | # Standard background | ||
2172 | 39 | bg = elementary.Background(self.win) | ||
2173 | 40 | self.win.resize_object_add(bg) | ||
2174 | 41 | bg.size_hint_weight_set(1.0, 1.0) | ||
2175 | 42 | bg.show() | ||
2176 | 43 | |||
2177 | 44 | # Different contents on the same page | ||
2178 | 45 | self.definitionPage = DefinitionPage(self) | ||
2179 | 46 | self.dictionariesPage = DictionariesPage(self) | ||
2180 | 47 | self.settingsPage = SettingsPage(self) | ||
2181 | 48 | self.aboutPage = AboutPage(self) | ||
2182 | 49 | |||
2183 | 50 | # Show definition page | ||
2184 | 51 | self.promoteDefinitionPage() | ||
2185 | 52 | |||
2186 | 53 | # Window size (size for pc application, for neo means full screen) | ||
2187 | 54 | self.win.resize(SCREEN_WIDTH, SCREEN_HEIGHT) | ||
2188 | 55 | self.win.show() | ||
2189 | 56 | |||
2190 | 57 | def create_dialog(self, text): | ||
2191 | 58 | self.dialog = elementary.Box(self.win) | ||
2192 | 59 | |||
2193 | 60 | loadingframe = elementary.Frame(self.win) | ||
2194 | 61 | loadingframe.style_set("outdent_bottom") | ||
2195 | 62 | loadingframe2 = elementary.Frame(self.win) | ||
2196 | 63 | loadingframe2.style_set("outdent_top") | ||
2197 | 64 | loadingframe2.size_hint_weight_set(0.0, 0.0) | ||
2198 | 65 | loadingframe2.size_hint_align_set(0.5, 0.5) | ||
2199 | 66 | |||
2200 | 67 | # Internal box object | ||
2201 | 68 | self.internalBox = elementary.Box(self.win) | ||
2202 | 69 | self.messageEntry = elementary.Entry(self.win) | ||
2203 | 70 | self.messageEntry.line_wrap_set(False) | ||
2204 | 71 | self.messageEntry.entry_set(text) | ||
2205 | 72 | self.messageEntry.editable_set(False) | ||
2206 | 73 | self.internalBox.pack_end(self.messageEntry) | ||
2207 | 74 | self.messageEntry.show() | ||
2208 | 75 | self.okButton = elementary.Button(self.win) | ||
2209 | 76 | self.okButton.label_set('OK') | ||
2210 | 77 | self.okButton.size_hint_weight_set(0.0, 0.0) | ||
2211 | 78 | self.okButton.size_hint_align_set(0.5, 0.5) | ||
2212 | 79 | self.internalBox.pack_end(self.okButton) | ||
2213 | 80 | self.okButton.show() | ||
2214 | 81 | |||
2215 | 82 | loadingframe.content_set(loadingframe2) | ||
2216 | 83 | loadingframe2.content_set(self.internalBox) | ||
2217 | 84 | self.win.resize_object_add(self.dialog) | ||
2218 | 85 | self.dialog.pack_start(loadingframe) | ||
2219 | 86 | self.internalBox.show() | ||
2220 | 87 | loadingframe.show() | ||
2221 | 88 | loadingframe2.show() | ||
2222 | 89 | self.dialog.show() | ||
2223 | 90 | |||
2224 | 91 | self.okButton.callback_clicked_add(self.dialogClicked, self.dialog) | ||
2225 | 92 | |||
2226 | 93 | def dialogClicked(self, obj, data): | ||
2227 | 94 | data.hide() | ||
2228 | 95 | |||
2229 | 96 | def create_loadingFrame(self, text): | ||
2230 | 97 | |||
2231 | 98 | self.loading = elementary.Box(self.win) | ||
2232 | 99 | |||
2233 | 100 | loadingframe = elementary.Frame(self.win) | ||
2234 | 101 | loadingframe.style_set("outdent_bottom") | ||
2235 | 102 | loadingframe2 = elementary.Frame(self.win) | ||
2236 | 103 | loadingframe2.style_set("outdent_top") | ||
2237 | 104 | loadingframe2.size_hint_weight_set(0.0, 0.0) | ||
2238 | 105 | loadingframe2.size_hint_align_set(0.5, 0.5) | ||
2239 | 106 | |||
2240 | 107 | loadinglabel = elementary.Label(self.win) | ||
2241 | 108 | loadinglabel.label_set(text) | ||
2242 | 109 | |||
2243 | 110 | loadingframe.content_set(loadingframe2) | ||
2244 | 111 | loadingframe2.content_set(loadinglabel) | ||
2245 | 112 | self.win.resize_object_add(self.loading) | ||
2246 | 113 | self.loading.pack_start(loadingframe) | ||
2247 | 114 | loadinglabel.show() | ||
2248 | 115 | loadingframe.show() | ||
2249 | 116 | loadingframe2.show() | ||
2250 | 117 | self.loading.show() | ||
2251 | 0 | 118 | ||
2252 | === added file 'efl/settings_ui.py' | |||
2253 | --- efl/settings_ui.py 1970-01-01 00:00:00 +0000 | |||
2254 | +++ efl/settings_ui.py 2010-02-08 17:08:19 +0000 | |||
2255 | @@ -0,0 +1,140 @@ | |||
2256 | 1 | #!/usr/bin/env python | ||
2257 | 2 | # -*- coding: utf-8 -*- | ||
2258 | 3 | |||
2259 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
2260 | 5 | # This program is free software; you can redistribute it and/or modify | ||
2261 | 6 | # it under the terms of the GNU General Public License as published by | ||
2262 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
2263 | 8 | # (at your option) any later version. | ||
2264 | 9 | # | ||
2265 | 10 | # This program is distributed in the hope that it will be useful, | ||
2266 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2267 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2268 | 13 | # GNU General Public License for more details. | ||
2269 | 14 | # | ||
2270 | 15 | # You should have received a copy of the GNU General Public License along | ||
2271 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
2272 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
2273 | 18 | import elementary | ||
2274 | 19 | |||
2275 | 20 | import logging | ||
2276 | 21 | log = logging.getLogger("babiloo.efl.settingsPage") | ||
2277 | 22 | |||
2278 | 23 | from efl.constants import * | ||
2279 | 24 | |||
2280 | 25 | class SettingsPage(): | ||
2281 | 26 | |||
2282 | 27 | # Initialization | ||
2283 | 28 | def __init__(self, main): | ||
2284 | 29 | self.main = main | ||
2285 | 30 | self.box = None | ||
2286 | 31 | |||
2287 | 32 | # Setup user interface | ||
2288 | 33 | def setupUi(self): | ||
2289 | 34 | |||
2290 | 35 | # Box Window with scroller and quit button | ||
2291 | 36 | self.box = elementary.Box(self.main.win) | ||
2292 | 37 | self.box.horizontal_set(False) | ||
2293 | 38 | self.main.win.resize_object_add(self.box) | ||
2294 | 39 | self.box.size_hint_weight_set(1.0, 1.0) | ||
2295 | 40 | self.box.size_hint_align_set(-1, -1) | ||
2296 | 41 | self.box.show() | ||
2297 | 42 | |||
2298 | 43 | # Scroller | ||
2299 | 44 | scroller = elementary.Scroller(self.main.win) | ||
2300 | 45 | scroller.bounce_set(0, 0) | ||
2301 | 46 | scroller.size_hint_weight_set(1.0, 1.0) | ||
2302 | 47 | scroller.size_hint_align_set(-1.0, -1.0) | ||
2303 | 48 | self.box.pack_end(scroller) | ||
2304 | 49 | scroller.show() | ||
2305 | 50 | |||
2306 | 51 | # About button | ||
2307 | 52 | self.aboutPageWin = elementary.Button(self.main.win) | ||
2308 | 53 | self.aboutPageWin.label_set("About") | ||
2309 | 54 | self.aboutPageWin.size_hint_align_set(-1.0, 0.0) | ||
2310 | 55 | ic = elementary.Icon(self.aboutPageWin) | ||
2311 | 56 | ic.file_set( ABOUT_ICON) | ||
2312 | 57 | ic.smooth_set(1) | ||
2313 | 58 | ic.scale_set(1, 1) | ||
2314 | 59 | self.aboutPageWin.icon_set(ic) | ||
2315 | 60 | self.aboutPageWin.show() | ||
2316 | 61 | self.box.pack_end(self.aboutPageWin) | ||
2317 | 62 | |||
2318 | 63 | # Quit button | ||
2319 | 64 | self.quitSettingsWin = elementary.Button(self.main.win) | ||
2320 | 65 | self.quitSettingsWin.label_set("Quit") | ||
2321 | 66 | self.quitSettingsWin.size_hint_align_set(-1.0, 0.0) | ||
2322 | 67 | ic = elementary.Icon(self.quitSettingsWin) | ||
2323 | 68 | ic.file_set( QUIT_ICON) | ||
2324 | 69 | ic.smooth_set(1) | ||
2325 | 70 | ic.scale_set(1, 1) | ||
2326 | 71 | self.quitSettingsWin.icon_set(ic) | ||
2327 | 72 | self.quitSettingsWin.show() | ||
2328 | 73 | self.box.pack_end(self.quitSettingsWin) | ||
2329 | 74 | |||
2330 | 75 | # Box inside scroller | ||
2331 | 76 | boxScroller = elementary.Box(self.main.win) | ||
2332 | 77 | boxScroller.horizontal_set(False) | ||
2333 | 78 | boxScroller.size_hint_weight_set(1.0, -1.0) | ||
2334 | 79 | scroller.content_set(boxScroller) | ||
2335 | 80 | boxScroller.show() | ||
2336 | 81 | |||
2337 | 82 | # Frame for dictionary section | ||
2338 | 83 | self.createPlayerFrame() | ||
2339 | 84 | boxScroller.pack_end(self.framePlayer) | ||
2340 | 85 | |||
2341 | 86 | def createPlayerFrame(self): | ||
2342 | 87 | self.framePlayer = elementary.Frame(self.main.win) | ||
2343 | 88 | self.framePlayer.label_set("Player FILE NAME") | ||
2344 | 89 | self.framePlayer.size_hint_align_set(-1.0, 0.0) | ||
2345 | 90 | self.framePlayer.show() | ||
2346 | 91 | |||
2347 | 92 | # Box for dictionary section | ||
2348 | 93 | boxPlayer = elementary.Box(self.main.win) | ||
2349 | 94 | boxPlayer.horizontal_set(False) | ||
2350 | 95 | boxPlayer.size_hint_align_set(-1.0, 0.0) | ||
2351 | 96 | boxPlayer.show() | ||
2352 | 97 | |||
2353 | 98 | # Box object with 'New player' and 'PlayerPathEntry' | ||
2354 | 99 | boxPlayerPathEntry= elementary.Box(self.main.win) | ||
2355 | 100 | boxPlayerPathEntry.horizontal_set(True) | ||
2356 | 101 | boxPlayerPathEntry.size_hint_weight_set(1.0, 1.0) | ||
2357 | 102 | boxPlayerPathEntry.show() | ||
2358 | 103 | |||
2359 | 104 | # New player button | ||
2360 | 105 | self.newPlayerButton = elementary.Button(self.main.win) | ||
2361 | 106 | ic = elementary.Icon(self.newPlayerButton) | ||
2362 | 107 | ic.file_set(NEW_PLAYER_ICON) | ||
2363 | 108 | self.newPlayerButton.icon_set(ic) | ||
2364 | 109 | # workround for nice position | ||
2365 | 110 | self.newPlayerButton.label_set(" ") | ||
2366 | 111 | self.newPlayerButton.size_hint_weight_set(0.0, 1.0) | ||
2367 | 112 | self.newPlayerButton.size_hint_align_set(-1.0, -1.0) | ||
2368 | 113 | self.newPlayerButton.show() | ||
2369 | 114 | |||
2370 | 115 | # Player path entry | ||
2371 | 116 | self.playerEntry = elementary.Entry(self.main.win) | ||
2372 | 117 | self.playerEntry.line_wrap_set(False) | ||
2373 | 118 | self.playerEntry.entry_set('') | ||
2374 | 119 | self.playerEntry.single_line_set(True) | ||
2375 | 120 | self.playerEntry.editable_set(False) | ||
2376 | 121 | self.newPlayerButton.size_hint_weight_set(0.0, 1.0) | ||
2377 | 122 | self.playerEntry.size_hint_align_set(-1.0, -1.0) | ||
2378 | 123 | self.playerEntry.scale_set(1.25) | ||
2379 | 124 | |||
2380 | 125 | self.playerEntry.show() | ||
2381 | 126 | |||
2382 | 127 | boxPlayerPathEntry.pack_end(self.newPlayerButton) | ||
2383 | 128 | boxPlayerPathEntry.pack_end(self.playerEntry) | ||
2384 | 129 | |||
2385 | 130 | # File selector | ||
2386 | 131 | self.savePlayer = elementary.Button(self.main.win) | ||
2387 | 132 | self.savePlayer.label_set("Save") | ||
2388 | 133 | self.savePlayer.size_hint_align_set(-1.0, 0.0) | ||
2389 | 134 | self.savePlayer.show() | ||
2390 | 135 | |||
2391 | 136 | boxPlayer.pack_end(boxPlayerPathEntry) | ||
2392 | 137 | boxPlayer.pack_end(self.savePlayer) | ||
2393 | 138 | |||
2394 | 139 | self.framePlayer.content_set(boxPlayer) | ||
2395 | 140 | |||
2396 | 0 | 141 | ||
2397 | === added file 'efl/utils_ui.py' | |||
2398 | --- efl/utils_ui.py 1970-01-01 00:00:00 +0000 | |||
2399 | +++ efl/utils_ui.py 2010-02-08 17:08:19 +0000 | |||
2400 | @@ -0,0 +1,77 @@ | |||
2401 | 1 | #!/usr/bin/env python | ||
2402 | 2 | # -*- coding: utf-8 -*- | ||
2403 | 3 | |||
2404 | 4 | # Copyright (C) 2009 Luca Vaudano vaudano@gmail.com | ||
2405 | 5 | # This program is free software; you can redistribute it and/or modify | ||
2406 | 6 | # it under the terms of the GNU General Public License as published by | ||
2407 | 7 | # the Free Software Foundation; either version 3 of the License, or | ||
2408 | 8 | # (at your option) any later version. | ||
2409 | 9 | # | ||
2410 | 10 | # This program is distributed in the hope that it will be useful, | ||
2411 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2412 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2413 | 13 | # GNU General Public License for more details. | ||
2414 | 14 | # | ||
2415 | 15 | # You should have received a copy of the GNU General Public License along | ||
2416 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
2417 | 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning | ||
2418 | 18 | import elementary | ||
2419 | 19 | |||
2420 | 20 | import logging | ||
2421 | 21 | log = logging.getLogger("babiloo.efl.utils") | ||
2422 | 22 | |||
2423 | 23 | from efl.constants import * | ||
2424 | 24 | |||
2425 | 25 | class UtilsUi(): | ||
2426 | 26 | |||
2427 | 27 | # UI for the file selector window | ||
2428 | 28 | def fileSelectorUI(self): | ||
2429 | 29 | self.fileSelectorWindow = elementary.Window("fileselector", elementary.ELM_WIN_BASIC) | ||
2430 | 30 | self.fileSelectorWindow.title_set("File selector") | ||
2431 | 31 | self.fileSelectorWindow.autodel_set(True) | ||
2432 | 32 | |||
2433 | 33 | bg = elementary.Background(self.fileSelectorWindow) | ||
2434 | 34 | self.fileSelectorWindow.resize_object_add(bg) | ||
2435 | 35 | bg.size_hint_weight_set(1.0, 1.0) | ||
2436 | 36 | bg.show() | ||
2437 | 37 | |||
2438 | 38 | vbox = elementary.Box(self.fileSelectorWindow) | ||
2439 | 39 | self.fileSelectorWindow.resize_object_add(vbox) | ||
2440 | 40 | vbox.size_hint_weight_set(1.0, 1.0) | ||
2441 | 41 | vbox.show() | ||
2442 | 42 | |||
2443 | 43 | self.fileSelector = elementary.Fileselector(self.fileSelectorWindow) | ||
2444 | 44 | # is_save_set what means? | ||
2445 | 45 | self.fileSelector.is_save_set(True) | ||
2446 | 46 | self.fileSelector.expandable_set(False) | ||
2447 | 47 | self.fileSelector.path_set(os.getenv("HOME")) | ||
2448 | 48 | self.fileSelector.size_hint_weight_set(1.0, 1.0) | ||
2449 | 49 | self.fileSelector.size_hint_align_set(-1.0, -1.0) | ||
2450 | 50 | vbox.pack_end(self.fileSelector) | ||
2451 | 51 | self.fileSelector.show() | ||
2452 | 52 | |||
2453 | 53 | hbox = elementary.Box(self.fileSelectorWindow) | ||
2454 | 54 | hbox.horizontal_set(True) | ||
2455 | 55 | vbox.pack_end(hbox) | ||
2456 | 56 | hbox.show() | ||
2457 | 57 | |||
2458 | 58 | self.fileSelectorWindow.resize(SCREEN_WIDTH, SCREEN_HEIGHT) | ||
2459 | 59 | self.fileSelectorWindow.show() | ||
2460 | 60 | |||
2461 | 61 | # Show only the filename or part of it if longer than width | ||
2462 | 62 | def filename_set(self, entry, filename): | ||
2463 | 63 | if filename != "": | ||
2464 | 64 | |||
2465 | 65 | # If is a directory | ||
2466 | 66 | if filename[-1] == '/': | ||
2467 | 67 | # Cut last slash | ||
2468 | 68 | filename = filename[0:-1] | ||
2469 | 69 | |||
2470 | 70 | # Cut the path | ||
2471 | 71 | lastSlash = filename.rfind('/') | ||
2472 | 72 | filename = filename[lastSlash+1:].strip() | ||
2473 | 73 | |||
2474 | 74 | if (len(filename) > WIDTH): | ||
2475 | 75 | filename = filename[:WIDTH-3] + '...' | ||
2476 | 76 | entry.entry_set(filename) | ||
2477 | 77 | log.debug("Selected %s" % filename) | ||
2478 | 0 | 78 | ||
2479 | === added file 'images/babiloo.png' | |||
2480 | 1 | Binary files images/babiloo.png 1970-01-01 00:00:00 +0000 and images/babiloo.png 2010-02-08 17:08:19 +0000 differ | 79 | Binary files images/babiloo.png 1970-01-01 00:00:00 +0000 and images/babiloo.png 2010-02-08 17:08:19 +0000 differ |
2481 | === modified file 'qt/about_ui.py' | |||
2482 | --- qt/about_ui.py 2009-04-28 12:15:50 +0000 | |||
2483 | +++ qt/about_ui.py 2010-02-08 17:08:19 +0000 | |||
2484 | @@ -2,8 +2,8 @@ | |||
2485 | 2 | 2 | ||
2486 | 3 | # Form implementation generated from reading ui file 'about.ui' | 3 | # Form implementation generated from reading ui file 'about.ui' |
2487 | 4 | # | 4 | # |
2490 | 5 | # Created: Tue Apr 28 13:12:48 2009 | 5 | # Created: Tue Sep 1 20:42:24 2009 |
2491 | 6 | # by: PyQt4 UI code generator 4.4.3 | 6 | # by: PyQt4 UI code generator 4.4.4 |
2492 | 7 | # | 7 | # |
2493 | 8 | # WARNING! All changes made in this file will be lost! | 8 | # WARNING! All changes made in this file will be lost! |
2494 | 9 | 9 | ||
2495 | 10 | 10 | ||
2496 | === modified file 'qt/chooseLanguage_ui.py' | |||
2497 | --- qt/chooseLanguage_ui.py 2009-04-28 12:15:50 +0000 | |||
2498 | +++ qt/chooseLanguage_ui.py 2010-02-08 17:08:19 +0000 | |||
2499 | @@ -2,8 +2,8 @@ | |||
2500 | 2 | 2 | ||
2501 | 3 | # Form implementation generated from reading ui file 'chooseLanguage.ui' | 3 | # Form implementation generated from reading ui file 'chooseLanguage.ui' |
2502 | 4 | # | 4 | # |
2505 | 5 | # Created: Tue Apr 28 13:12:48 2009 | 5 | # Created: Tue Sep 1 20:42:24 2009 |
2506 | 6 | # by: PyQt4 UI code generator 4.4.3 | 6 | # by: PyQt4 UI code generator 4.4.4 |
2507 | 7 | # | 7 | # |
2508 | 8 | # WARNING! All changes made in this file will be lost! | 8 | # WARNING! All changes made in this file will be lost! |
2509 | 9 | 9 | ||
2510 | 10 | 10 | ||
2511 | === modified file 'qt/images_rc.py' | |||
2512 | --- qt/images_rc.py 2009-05-31 22:13:44 +0000 | |||
2513 | +++ qt/images_rc.py 2010-02-08 17:08:19 +0000 | |||
2514 | @@ -2,7 +2,7 @@ | |||
2515 | 2 | 2 | ||
2516 | 3 | # Resource object code | 3 | # Resource object code |
2517 | 4 | # | 4 | # |
2519 | 5 | # Created: Mon Jun 1 04:37:24 2009 | 5 | # Created: Tue Sep 1 20:42:23 2009 |
2520 | 6 | # by: The Resource Compiler for PyQt (Qt v4.5.0) | 6 | # by: The Resource Compiler for PyQt (Qt v4.5.0) |
2521 | 7 | # | 7 | # |
2522 | 8 | # WARNING! All changes made in this file will be lost! | 8 | # WARNING! All changes made in this file will be lost! |
2523 | 9 | 9 | ||
2524 | === modified file 'qt/main_ui.py' | |||
2525 | --- qt/main_ui.py 2009-05-31 22:13:44 +0000 | |||
2526 | +++ qt/main_ui.py 2010-02-08 17:08:19 +0000 | |||
2527 | @@ -2,7 +2,7 @@ | |||
2528 | 2 | 2 | ||
2529 | 3 | # Form implementation generated from reading ui file 'main.ui' | 3 | # Form implementation generated from reading ui file 'main.ui' |
2530 | 4 | # | 4 | # |
2532 | 5 | # Created: Mon Jun 1 04:37:24 2009 | 5 | # Created: Tue Sep 1 20:42:23 2009 |
2533 | 6 | # by: PyQt4 UI code generator 4.4.4 | 6 | # by: PyQt4 UI code generator 4.4.4 |
2534 | 7 | # | 7 | # |
2535 | 8 | # WARNING! All changes made in this file will be lost! | 8 | # WARNING! All changes made in this file will be lost! |
2536 | 9 | 9 | ||
2537 | === modified file 'qt/settings_ui.py' | |||
2538 | --- qt/settings_ui.py 2009-04-28 14:06:16 +0000 | |||
2539 | +++ qt/settings_ui.py 2010-02-08 17:08:19 +0000 | |||
2540 | @@ -2,8 +2,8 @@ | |||
2541 | 2 | 2 | ||
2542 | 3 | # Form implementation generated from reading ui file 'settings.ui' | 3 | # Form implementation generated from reading ui file 'settings.ui' |
2543 | 4 | # | 4 | # |
2546 | 5 | # Created: Tue Apr 28 16:03:26 2009 | 5 | # Created: Tue Sep 1 20:42:23 2009 |
2547 | 6 | # by: PyQt4 UI code generator 4.4.3 | 6 | # by: PyQt4 UI code generator 4.4.4 |
2548 | 7 | # | 7 | # |
2549 | 8 | # WARNING! All changes made in this file will be lost! | 8 | # WARNING! All changes made in this file will be lost! |
2550 | 9 | 9 | ||
2551 | 10 | 10 | ||
2552 | === modified file 'run.py' | |||
2553 | --- run.py 2009-03-28 01:13:40 +0000 | |||
2554 | +++ run.py 2010-02-08 17:08:17 +0000 | |||
2555 | @@ -39,8 +39,19 @@ | |||
2556 | 39 | parser = OptionParser(description=conf.General.description, version=conf.General.version, option_list=conf.Terminal.option_list) | 39 | parser = OptionParser(description=conf.General.description, version=conf.General.version, option_list=conf.Terminal.option_list) |
2557 | 40 | (options, args) = parser.parse_args() | 40 | (options, args) = parser.parse_args() |
2558 | 41 | 41 | ||
2559 | 42 | # Retrieve if the hardware is GTA01 or GTA02 | ||
2560 | 43 | # if is, set to gui mode to efl | ||
2561 | 44 | for line in open('/proc/cpuinfo'): | ||
2562 | 45 | if line.startswith('Hardware'): | ||
2563 | 46 | type = line.split() | ||
2564 | 47 | type =type[len(type)-1] | ||
2565 | 48 | if type.startswith('GTA0'): | ||
2566 | 49 | options.mode = 'efl' | ||
2567 | 50 | |||
2568 | 42 | if options.mode == 'gui': | 51 | if options.mode == 'gui': |
2569 | 43 | import qt.main | 52 | import qt.main |
2570 | 53 | elif options.mode == 'efl': | ||
2571 | 54 | import efl.main | ||
2572 | 44 | #elif options.mode == 'cli': | 55 | #elif options.mode == 'cli': |
2573 | 45 | # import cli.main | 56 | # import cli.main |
2574 | 46 | 57 | ||
2575 | @@ -75,5 +86,7 @@ | |||
2576 | 75 | 86 | ||
2577 | 76 | if options.mode == 'gui': | 87 | if options.mode == 'gui': |
2578 | 77 | qt.main.main(options) | 88 | qt.main.main(options) |
2579 | 89 | if options.mode == 'efl': | ||
2580 | 90 | efl.main.main(options) | ||
2581 | 78 | 91 | ||
2582 | 79 | log.info('Babiloo closed for mantainance.') | 92 | log.info('Babiloo closed for mantainance.') |
Hi,
I noticed two things from the review.diff:
1 .bzignore is wrong (keep the trunk version)
2 the debian directory should be in another repository, I think
Cheers
Luca
On Thu, Sep 3, 2009 at 1:35 PM, zeusOne<email address hidden> wrote: developers) /code.launchpad .net/~vaudano/ babiloo/ efl/+merge/ 11119
> zeusOne has proposed merging lp:~vaudano/babiloo/efl into lp:babiloo.
>
> Requested reviews:
> The Developers of the Babiloo Project (babiloo-
> --
> https:/
> You are the owner of lp:~vaudano/babiloo/efl.
>