Merge lp:~nico-inattendu/luciole/bug_740324 into lp:luciole
- bug_740324
- Merge into 0.9
Proposed by
NicoInattendu
Status: | Merged |
---|---|
Approved by: | NicoInattendu |
Approved revision: | 130 |
Merged at revision: | 130 |
Proposed branch: | lp:~nico-inattendu/luciole/bug_740324 |
Merge into: | lp:luciole |
Diff against target: |
394 lines (+115/-37) 5 files modified
luciole/gui/actions.py (+44/-7) luciole/gui/constants.py (+3/-0) luciole/po/POTFILES.in (+4/-5) luciole/ui/luciole.glade (+59/-20) luciole/version.py (+5/-5) |
To merge this branch: | bzr merge lp:~nico-inattendu/luciole/bug_740324 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
NicoInattendu | Pending | ||
Review via email: mp+54824@code.launchpad.net |
Commit message
fix for bug #740324. : About window added, actions report a bug, ask a question and help translate also added.
Description of the change
fix for bug #740324.
About window added, actions report a bug, ask a question and help translate also added.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'luciole/gui/actions.py' |
2 | --- luciole/gui/actions.py 2011-03-05 13:59:13 +0000 |
3 | +++ luciole/gui/actions.py 2011-03-25 09:26:06 +0000 |
4 | @@ -3,7 +3,7 @@ |
5 | # -*- Mode: Python -*- |
6 | # vim:si:ai:et:sw=4:sts=4:ts=4 |
7 | # |
8 | -# Copyright Nicolas Bertrand (nico@inattendu.org), 2010 |
9 | +# Copyright Nicolas Bertrand (nico@inattendu.org), 2010-2011 |
10 | # |
11 | # This file is part of Luciole. |
12 | # |
13 | @@ -27,6 +27,7 @@ |
14 | """ |
15 | # standard library imports |
16 | from gettext import gettext as _ |
17 | +import webbrowser |
18 | |
19 | # related third party imports |
20 | import gobject |
21 | @@ -38,7 +39,7 @@ |
22 | import luciole.gui.constants as GUI_CONST |
23 | import luciole.constants as LCONST |
24 | from luciole.gui.windows.export_video_window import ExportVideoWindow |
25 | - |
26 | +from luciole.info import REVNO, VERSION |
27 | _tv_change_signal = 'treeview-change' |
28 | _tv_selected_signal = 'treeview-selected' |
29 | |
30 | @@ -183,6 +184,12 @@ |
31 | self._preferences_cb), |
32 | (self.builder_actions[GUI_CONST.ACTION_ABOUT], |
33 | self._about_cb), |
34 | + (self.builder_actions[GUI_CONST.ACTION_BUG], |
35 | + self._bug_cb), |
36 | + (self.builder_actions[GUI_CONST.ACTION_ASK], |
37 | + self._ask_cb), |
38 | + (self.builder_actions[GUI_CONST.ACTION_I18N], |
39 | + self._i18n_cb), |
40 | ] |
41 | |
42 | # |
43 | @@ -457,11 +464,41 @@ |
44 | pass |
45 | |
46 | def _about_cb(self, action ) : |
47 | - # TODO : implement About dialog |
48 | - pass |
49 | - |
50 | - |
51 | - |
52 | + _ver = "%s (%s)"%(VERSION, REVNO) |
53 | + self.debug('show about dialog: version %s', _ver) |
54 | + self.gui.windows.about(_ver) |
55 | + |
56 | + def _bug_cb(self, action ) : |
57 | + """ report bug action """ |
58 | + self.debug('Report bug action') |
59 | + try: |
60 | + webbrowser.open("https://bugs.launchpad.net/luciole/+filebug") |
61 | + except: |
62 | + _msg = _("Unable to open the Launchpad web page.") |
63 | + self.warning(_msg) |
64 | + self.gui.windows.error_message(_msg) |
65 | + |
66 | + def _ask_cb(self, action ) : |
67 | + """ ask a question action """ |
68 | + self.debug('Ask a question action') |
69 | + try: |
70 | + webbrowser.open("https://answers.launchpad.net/luciole/+addquestion") |
71 | + except: |
72 | + _msg = _("Unable to open the Launchpad web page.") |
73 | + self.warning(_msg) |
74 | + self.gui.windows.error_message(_msg) |
75 | + |
76 | + def _i18n_cb(self, action ) : |
77 | + """ Help trranslate action """ |
78 | + self.debug('Help translate action') |
79 | + try: |
80 | + webbrowser.open("https://translations.launchpad.net/luciole") |
81 | + except: |
82 | + _msg = _("Unable to open the Launchpad web page.") |
83 | + self.warning(_msg) |
84 | + self.gui.windows.error_message(_msg) |
85 | + |
86 | + |
87 | # |
88 | # project common callbacks |
89 | # |
90 | |
91 | === modified file 'luciole/gui/constants.py' |
92 | --- luciole/gui/constants.py 2011-02-27 18:32:53 +0000 |
93 | +++ luciole/gui/constants.py 2011-03-25 09:26:06 +0000 |
94 | @@ -64,6 +64,9 @@ |
95 | ACTION_PREFERENCES = "ActionPreferences" |
96 | ACTION_OPEN = "ActionOpen" |
97 | ACTION_NEW = "ActionNew" |
98 | +ACTION_BUG = "ActionReportBug" |
99 | +ACTION_ASK = "ActionAsk" |
100 | +ACTION_I18N = "ActionTranslate" |
101 | |
102 | ACTION_CLOSE = "ActionClose" |
103 | ACTION_SAVE = "ActionSave" |
104 | |
105 | === modified file 'luciole/po/POTFILES.in' |
106 | --- luciole/po/POTFILES.in 2010-09-06 12:10:40 +0000 |
107 | +++ luciole/po/POTFILES.in 2011-03-25 09:26:06 +0000 |
108 | @@ -1,15 +1,12 @@ |
109 | [encoding: UTF-8] |
110 | -../luciole/ui/luciole.glade |
111 | -../luciole/ui/export_file.glade |
112 | ../luciole/base/lcl_et.py |
113 | ../luciole/conf.py |
114 | ../luciole/constants.py |
115 | -../luciole/ctrl/ctrl.py |
116 | ../luciole/ctrl/import_image.py |
117 | ../luciole/ctrl/load_rush.py |
118 | -../luciole/ctrl/project_ctrl.py |
119 | -../luciole/ctrl/viewer_ctrl.py |
120 | +../luciole/ctrl/ctrl_project.py |
121 | ../luciole/gui/control_widget.py |
122 | +../luciole/gui/windows/actions.py |
123 | ../luciole/gui/windows/assistant_new_project.py |
124 | ../luciole/gui/windows/dialog_project_properties.py |
125 | ../luciole/gui/windows/dialog.py |
126 | @@ -22,3 +19,5 @@ |
127 | ../luciole/project/export/export_pitivi.py |
128 | ../luciole/project/export/export_tool_base.py |
129 | ../luciole/project/export/export_video.py |
130 | +../luciole/ui/export_file.glade |
131 | +../luciole/ui/luciole.glade |
132 | |
133 | === modified file 'luciole/ui/luciole.glade' |
134 | --- luciole/ui/luciole.glade 2011-02-28 12:58:02 +0000 |
135 | +++ luciole/ui/luciole.glade 2011-03-25 09:26:06 +0000 |
136 | @@ -1,4 +1,4 @@ |
137 | -<?xml version="1.0"?> |
138 | +<?xml version="1.0" encoding="UTF-8"?> |
139 | <interface> |
140 | <requires lib="gtk+" version="2.16"/> |
141 | <!-- interface-naming-policy toplevel-contextual --> |
142 | @@ -71,8 +71,8 @@ |
143 | <child> |
144 | <object class="GtkImageMenuItem" id="file_new"> |
145 | <property name="visible">True</property> |
146 | - <property name="use_action_appearance">True</property> |
147 | <property name="related_action">ActionNew</property> |
148 | + <property name="use_action_appearance">True</property> |
149 | <property name="use_underline">True</property> |
150 | <property name="use_stock">True</property> |
151 | <signal name="activate" handler="on_file_new_activate"/> |
152 | @@ -81,8 +81,8 @@ |
153 | <child> |
154 | <object class="GtkImageMenuItem" id="file_open"> |
155 | <property name="visible">True</property> |
156 | - <property name="use_action_appearance">True</property> |
157 | <property name="related_action">ActionOpen</property> |
158 | + <property name="use_action_appearance">True</property> |
159 | <property name="use_underline">True</property> |
160 | <property name="use_stock">True</property> |
161 | </object> |
162 | @@ -137,8 +137,8 @@ |
163 | <child> |
164 | <object class="GtkImageMenuItem" id="imagemenuitem3"> |
165 | <property name="visible">True</property> |
166 | - <property name="use_action_appearance">True</property> |
167 | <property name="related_action">ActionSave</property> |
168 | + <property name="use_action_appearance">True</property> |
169 | <property name="use_underline">True</property> |
170 | <property name="use_stock">True</property> |
171 | <signal name="activate" handler="on_file_save_activate"/> |
172 | @@ -147,8 +147,8 @@ |
173 | <child> |
174 | <object class="GtkImageMenuItem" id="imagemenuitem4"> |
175 | <property name="visible">True</property> |
176 | - <property name="use_action_appearance">True</property> |
177 | <property name="related_action">ActionSaveAs</property> |
178 | + <property name="use_action_appearance">True</property> |
179 | <property name="use_underline">True</property> |
180 | <property name="use_stock">True</property> |
181 | <signal name="activate" handler="on_file_save_as_activate"/> |
182 | @@ -162,8 +162,8 @@ |
183 | <child> |
184 | <object class="GtkImageMenuItem" id="file_import"> |
185 | <property name="visible">True</property> |
186 | - <property name="use_action_appearance">True</property> |
187 | <property name="related_action">ActionImportImage</property> |
188 | + <property name="use_action_appearance">True</property> |
189 | <property name="use_underline">True</property> |
190 | <property name="use_stock">True</property> |
191 | <signal name="activate" handler="on_file_import_activate"/> |
192 | @@ -172,8 +172,8 @@ |
193 | <child> |
194 | <object class="GtkImageMenuItem" id="file_export"> |
195 | <property name="visible">True</property> |
196 | - <property name="use_action_appearance">True</property> |
197 | <property name="related_action">ActionExportVideo</property> |
198 | + <property name="use_action_appearance">True</property> |
199 | <property name="use_underline">True</property> |
200 | <property name="use_stock">True</property> |
201 | <signal name="activate" handler="on_file_export_activate"/> |
202 | @@ -182,8 +182,8 @@ |
203 | <child> |
204 | <object class="GtkImageMenuItem" id="file_export_tool"> |
205 | <property name="visible">True</property> |
206 | - <property name="use_action_appearance">True</property> |
207 | <property name="related_action">ActionExportTool</property> |
208 | + <property name="use_action_appearance">True</property> |
209 | <property name="use_underline">True</property> |
210 | <property name="use_stock">True</property> |
211 | <signal name="activate" handler="on_file_export_tool_activate"/> |
212 | @@ -197,8 +197,8 @@ |
213 | <child> |
214 | <object class="GtkImageMenuItem" id="file_close"> |
215 | <property name="visible">True</property> |
216 | - <property name="use_action_appearance">True</property> |
217 | <property name="related_action">ActionClose</property> |
218 | + <property name="use_action_appearance">True</property> |
219 | <property name="use_underline">True</property> |
220 | <property name="use_stock">True</property> |
221 | <signal name="activate" handler="on_file_close_activate"/> |
222 | @@ -207,8 +207,8 @@ |
223 | <child> |
224 | <object class="GtkImageMenuItem" id="imagemenuitem5"> |
225 | <property name="visible">True</property> |
226 | - <property name="use_action_appearance">True</property> |
227 | <property name="related_action">ActionQuit</property> |
228 | + <property name="use_action_appearance">True</property> |
229 | <property name="use_underline">True</property> |
230 | <property name="use_stock">True</property> |
231 | <signal name="activate" handler="on_file_quit_activate"/> |
232 | @@ -229,8 +229,8 @@ |
233 | <child> |
234 | <object class="GtkImageMenuItem" id="view_project"> |
235 | <property name="visible">True</property> |
236 | - <property name="use_action_appearance">True</property> |
237 | <property name="related_action">ActionProjectProperties</property> |
238 | + <property name="use_action_appearance">True</property> |
239 | <property name="use_underline">True</property> |
240 | <property name="use_stock">True</property> |
241 | <signal name="activate" handler="on_view_project_activate"/> |
242 | @@ -239,8 +239,8 @@ |
243 | <child> |
244 | <object class="GtkImageMenuItem" id="Preferences_menu"> |
245 | <property name="visible">True</property> |
246 | - <property name="use_action_appearance">True</property> |
247 | <property name="related_action">ActionPreferences</property> |
248 | + <property name="use_action_appearance">True</property> |
249 | <property name="use_underline">True</property> |
250 | <property name="use_stock">True</property> |
251 | <signal name="activate" handler="on_preferences_activate"/> |
252 | @@ -261,8 +261,8 @@ |
253 | <child> |
254 | <object class="GtkRadioMenuItem" id="start_stop_acqusition_item"> |
255 | <property name="visible">True</property> |
256 | - <property name="use_action_appearance">True</property> |
257 | <property name="related_action">start_stop_acquisition</property> |
258 | + <property name="use_action_appearance">True</property> |
259 | </object> |
260 | </child> |
261 | </object> |
262 | @@ -278,10 +278,42 @@ |
263 | <object class="GtkMenu" id="menu3"> |
264 | <property name="visible">True</property> |
265 | <child> |
266 | + <object class="GtkImageMenuItem" id="mnuReportBug"> |
267 | + <property name="visible">True</property> |
268 | + <property name="related_action">ActionReportBug</property> |
269 | + <property name="use_action_appearance">True</property> |
270 | + <property name="use_underline">True</property> |
271 | + <property name="use_stock">True</property> |
272 | + </object> |
273 | + </child> |
274 | + <child> |
275 | + <object class="GtkImageMenuItem" id="MnuAskQquestion"> |
276 | + <property name="visible">True</property> |
277 | + <property name="related_action">ActionAsk</property> |
278 | + <property name="use_action_appearance">True</property> |
279 | + <property name="use_underline">True</property> |
280 | + <property name="use_stock">True</property> |
281 | + </object> |
282 | + </child> |
283 | + <child> |
284 | + <object class="GtkImageMenuItem" id="mnuTranslate"> |
285 | + <property name="visible">True</property> |
286 | + <property name="related_action">ActionTranslate</property> |
287 | + <property name="use_action_appearance">True</property> |
288 | + <property name="use_underline">True</property> |
289 | + <property name="use_stock">True</property> |
290 | + </object> |
291 | + </child> |
292 | + <child> |
293 | + <object class="GtkSeparatorMenuItem" id="menuitem2"> |
294 | + <property name="visible">True</property> |
295 | + </object> |
296 | + </child> |
297 | + <child> |
298 | <object class="GtkImageMenuItem" id="help_about"> |
299 | <property name="visible">True</property> |
300 | - <property name="use_action_appearance">True</property> |
301 | <property name="related_action">ActionAbout</property> |
302 | + <property name="use_action_appearance">True</property> |
303 | <property name="use_underline">True</property> |
304 | <property name="use_stock">True</property> |
305 | <signal name="activate" handler="on_help_about_activate"/> |
306 | @@ -665,7 +697,6 @@ |
307 | <property name="title" translatable="yes">Select a Luciole project</property> |
308 | <property name="window_position">center-on-parent</property> |
309 | <property name="type_hint">menu</property> |
310 | - <property name="has_separator">False</property> |
311 | <child internal-child="vbox"> |
312 | <object class="GtkVBox" id="dialog-vbox1"> |
313 | <property name="visible">True</property> |
314 | @@ -700,7 +731,6 @@ |
315 | <property name="resizable">False</property> |
316 | <property name="window_position">center-on-parent</property> |
317 | <property name="type_hint">dialog</property> |
318 | - <property name="has_separator">False</property> |
319 | <property name="program_name">Luciole</property> |
320 | <property name="version">0.8</property> |
321 | <property name="copyright" translatable="yes">Copyright 2009-2010 Nicolas Bertrand (nico@inattendu.org)</property> |
322 | @@ -763,7 +793,6 @@ |
323 | <property name="title" translatable="yes">Video Export</property> |
324 | <property name="window_position">center-on-parent</property> |
325 | <property name="type_hint">dialog</property> |
326 | - <property name="has_separator">False</property> |
327 | <child internal-child="vbox"> |
328 | <object class="GtkVBox" id="dialog-vbox11"> |
329 | <property name="visible">True</property> |
330 | @@ -1044,9 +1073,9 @@ |
331 | <object class="GtkFileChooserButton" id="filechooserbutton1"> |
332 | <property name="visible">True</property> |
333 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
334 | + <property name="action">select-folder</property> |
335 | <property name="do_overwrite_confirmation">True</property> |
336 | <property name="use_preview_label">False</property> |
337 | - <property name="action">select-folder</property> |
338 | <property name="title" translatable="yes">Select a folder</property> |
339 | </object> |
340 | <packing> |
341 | @@ -1268,7 +1297,6 @@ |
342 | <property name="border_width">5</property> |
343 | <property name="window_position">center-on-parent</property> |
344 | <property name="type_hint">dialog</property> |
345 | - <property name="has_separator">False</property> |
346 | <child internal-child="vbox"> |
347 | <object class="GtkVBox" id="dialog-vbox4"> |
348 | <property name="visible">True</property> |
349 | @@ -1304,7 +1332,6 @@ |
350 | <property name="title" translatable="yes">Preferences</property> |
351 | <property name="window_position">center-on-parent</property> |
352 | <property name="type_hint">dialog</property> |
353 | - <property name="has_separator">False</property> |
354 | <child internal-child="vbox"> |
355 | <object class="GtkVBox" id="dialog-vbox3"> |
356 | <property name="height_request">269</property> |
357 | @@ -1550,4 +1577,16 @@ |
358 | <object class="GtkAction" id="ActionProjectProperties"> |
359 | <property name="stock_id">gtk-properties</property> |
360 | </object> |
361 | + <object class="GtkAction" id="ActionReportBug"> |
362 | + <property name="label">_Report a Bug...</property> |
363 | + <property name="stock_id">gtk-dialog-warning</property> |
364 | + </object> |
365 | + <object class="GtkAction" id="ActionAsk"> |
366 | + <property name="label">_Ask a Question...</property> |
367 | + <property name="stock_id">gtk-dialog-question</property> |
368 | + </object> |
369 | + <object class="GtkAction" id="ActionTranslate"> |
370 | + <property name="label">_Translate this Application...</property> |
371 | + <property name="stock_id">gtk-index</property> |
372 | + </object> |
373 | </interface> |
374 | |
375 | === modified file 'luciole/version.py' |
376 | --- luciole/version.py 2010-09-06 11:02:42 +0000 |
377 | +++ luciole/version.py 2011-03-25 09:26:06 +0000 |
378 | @@ -4,12 +4,12 @@ |
379 | So don't edit it. :) |
380 | """ |
381 | |
382 | -version_info = {'branch_nick': u'luciole', |
383 | - 'build_date': '2010-09-06 15:01:02 +0400', |
384 | +version_info = {'branch_nick': u'bug_740324', |
385 | + 'build_date': '2011-03-24 19:11:26 +0100', |
386 | 'clean': None, |
387 | - 'date': '2010-09-06 13:00:55 +0400', |
388 | - 'revision_id': 'nico@inattendu.org-20100906090055-iafu3ghe623sroam', |
389 | - 'revno': 117} |
390 | + 'date': '2011-03-09 15:52:21 +0400', |
391 | + 'revision_id': 'nico@inattendu.org-20110309115221-l1nzqwerhwwcz9jf', |
392 | + 'revno': 129} |
393 | |
394 | revisions = {} |
395 |