Merge lp:~nico-inattendu/luciole/bug_500652 into lp:luciole/0.8

Proposed by NicoInattendu
Status: Merged
Approved by: NicoInattendu
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~nico-inattendu/luciole/bug_500652
Merge into: lp:luciole/0.8
Diff against target: 482 lines (+151/-119)
5 files modified
lucioLib/gui/gui_controller.py (+17/-13)
lucioLib/luciole_acquisition.py (+10/-8)
lucioLib/luciole_constants.py (+5/-5)
lucioLib/luciole_controller.py (+5/-3)
ui/luciole.glade (+114/-90)
To merge this branch: bzr merge lp:~nico-inattendu/luciole/bug_500652
Reviewer Review Type Date Requested Status
NicoInattendu Approve
Review via email: mp+18596@code.launchpad.net

Commit message

Merge with fix for bug #500652

To post a comment you must log in.
Revision history for this message
NicoInattendu (nico-inattendu) :
review: Approve
Revision history for this message
NicoInattendu (nico-inattendu) wrote :

run translation update

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lucioLib/gui/gui_controller.py'
2--- lucioLib/gui/gui_controller.py 2010-02-03 07:31:45 +0000
3+++ lucioLib/gui/gui_controller.py 2010-02-04 05:36:16 +0000
4@@ -123,6 +123,7 @@
5 # main window name
6 GUI_MAIN_WINDOW = "window1"
7
8+
9 #
10 # properties
11 #
12@@ -222,7 +223,11 @@
13
14 self.window.set_title( "%s : %s"%(APP_NAME, 'No project' ) )
15 self.window.show()
16-
17+ # widgets for project init
18+ self._init_project_buttons()
19+
20+ # acquistion buttons initialization
21+ self._init_acquistion_buttons()
22
23 callbacks = {
24 'on_acquisition_button_toggled' :self.on_acquisition_button_toggled,
25@@ -284,11 +289,7 @@
26 self._play_button = self.builder.get_object('button_play')
27 self._play_pause_image = self.builder.get_object('image_play_pause')
28
29- # widgets for project init
30- self._init_project_buttons()
31-
32- # acquistion buttons initialization
33- self._init_acquistion_buttons()
34+
35
36
37 #status bar
38@@ -305,18 +306,21 @@
39 self._snapshot_button = self.builder.get_object('snapshot_button')
40 self._mixer_checkbutton = self.builder.get_object('mixer_checkbutton')
41 self._alpha_hscale = self.builder.get_object('alpha_hscale')
42- # focus disable on Hscalse does not work with glade forced here
43+ # get default alpha value for mixer
44+ self._alpha_hscale.set_value(LCONST.ALPHA_DEFAULT)
45+
46+ # focus disable on Hscale does not work with glade forced here
47 self._alpha_hscale.set_property('can-focus',False)
48 self._alpha_hscale.set_property('can-default',False)
49
50- # load pixbuf for luciole activity in acquiistion button
51+ # load pixbuf for luciole activity in acquisition button
52 self._pxb_luciole_sleep = gtk.gdk.pixbuf_new_from_file("images/luciole-dodo.png")
53 self._pxb_luciole_wakedup = gtk.gdk.pixbuf_new_from_file("images/luciole-eveillee.png")
54
55 self.acquisition_widget_hide() #by default buttons are not active
56
57 def acquisition_widget_hide(self) :
58- """ set acqusition buttons in non acquisition mode """
59+ """ set acquisition buttons in non acquisition mode """
60 self._acq_button_image.set_from_pixbuf(self._pxb_luciole_sleep) # by default firefly is sleeping - no acquisition started
61
62 self._snapshot_button.hide() # snapshot button hide by default
63@@ -334,7 +338,7 @@
64 self._acq_button_image.set_from_pixbuf(self._pxb_luciole_wakedup)
65 self._snapshot_button.show() # snapshot button hide by default
66 self._mixer_checkbutton.show() # mixer checkbox hide by default
67- # if toggle butoon not acive : acivate it
68+ # if toggle button not active : activate it
69 if self._acq_button.get_active() == False :
70 # the set_active function cause the toggle button signal emitted
71 self._acq_button.set_active(True)
72@@ -342,7 +346,7 @@
73 def _init_project_buttons(self) :
74 """ initialisation of fpi buttons """
75
76- # get Hbox with acquistion widgets nas prent of this box
77+ # get Hbox with acquisition widgets nas prent of this box
78 self._hbox_acq = self.builder.get_object('hbox_acquisition')
79 self._parent_hbox_acq = self._hbox_acq.get_parent()
80
81@@ -364,7 +368,7 @@
82
83 def project_open_widgets(self) :
84 """ When this function is called the project open/new buttons are dispalyed
85- The acquisistion buttons are hidden
86+ The acquisition buttons are hidden
87 """
88 child = self._parent_hbox_acq.get_child()
89 if child != None :
90@@ -426,7 +430,7 @@
91
92 l_isOk = True
93 else :
94- # raise errror
95+ # raise error
96 lerr = " unable to find treeview capture "
97 raise LEXCEP.LucioException, lerr
98
99
100=== modified file 'lucioLib/luciole_acquisition.py'
101--- lucioLib/luciole_acquisition.py 2010-01-28 06:05:45 +0000
102+++ lucioLib/luciole_acquisition.py 2010-02-04 05:36:16 +0000
103@@ -1,10 +1,10 @@
104 #!/usr/bin/env python
105 # -*- coding: utf-8 -*-
106 # -*- Mode: Python -*-
107-# vi:si:ai:et:sw=4:sts=4:ts=4
108-#
109-#
110-# Copyright Nicolas Bertrand (nico@inattendu.org), 2009
111+# vim:si:ai:et:sw=4:sts=4:ts=4
112+#
113+#
114+# Copyright Nicolas Bertrand (nico@inattendu.org), 2009-2010
115 #
116 # This file is part of Luciole.
117 #
118@@ -34,10 +34,12 @@
119
120
121 class luciole_acquisition(object) :
122- """ Handle the acqusition from digital devices """
123+ """ Handle the acquisition from digital devices """
124+
125+ ALPHA_DEFAULT = LCONST.ALPHA_DEFAULT
126
127 ################################################################################################
128- # class proprerties
129+ # class properties
130 ################################################################################################
131
132
133@@ -78,7 +80,7 @@
134
135
136 if self.__HardType != LCONST.DIGICAM :
137- # Acquistion is gstreamer based
138+ # Acquisition is gstreamer based
139 self.GstObj = LGA.Lcl_gst_acq(displayWidget,self.__project_dir,self._cb_on_error, self._cb_capture_done)
140
141 self.Image2save = os.path.join(project_dir, LCONST.ACQUIRED_IMAGE_NAME)
142@@ -154,7 +156,7 @@
143 self.GstObj.image2Mix = self.__Image2Mix
144
145 self.GstObj.mix = LGA.Lcl_gst_acq.MIX
146- self.GstObj.alphaImage = 0.4
147+ self.GstObj.alphaImage = self.ALPHA_DEFAULT
148
149 if self.GstObj.is_playing(): self.GstObj.stop()
150 self.GstObj.reset_pipe() # reset pipe to take into account the mix
151
152=== modified file 'lucioLib/luciole_constants.py'
153--- lucioLib/luciole_constants.py 2009-05-07 09:27:18 +0000
154+++ lucioLib/luciole_constants.py 2010-02-04 05:36:16 +0000
155@@ -1,10 +1,10 @@
156 #!/usr/bin/env python
157 # -*- coding: utf-8 -*-
158 # -*- Mode: Python -*-
159-# vi:si:ai:et:sw=4:sts=4:ts=4
160-#
161-#
162-# Copyright Nicolas Bertrand (nico@inattendu.org), 2009
163+# vim:si:ai:et:sw=4:sts=4:ts=4
164+#
165+#
166+# Copyright Nicolas Bertrand (nico@inattendu.org), 2009-2010
167 #
168 # This file is part of Luciole.
169 #
170@@ -93,5 +93,5 @@
171 THUMB_TEXT_FAMILY = 'sans' # font family
172
173
174-
175+ALPHA_DEFAULT = 0.4 # default alpha value used for mixer
176
177
178=== modified file 'lucioLib/luciole_controller.py'
179--- lucioLib/luciole_controller.py 2010-02-03 07:31:45 +0000
180+++ lucioLib/luciole_controller.py 2010-02-04 05:36:16 +0000
181@@ -727,9 +727,11 @@
182
183 self.gui.append_capture(l_rush_image)
184
185- # 3. if onion skin active update image
186- if self.acq_obj.IsOnionSkinActive == True :
187- self.acq_obj.Image2Mix = l_rush_image.path
188+
189+ # always update the image 2 mix, even if mixer is not active
190+ # used to memorize the last capture
191+
192+ self.acq_obj.Image2Mix = l_rush_image.path
193
194
195 def _stop_acquisition(self):
196
197=== modified file 'ui/luciole.glade'
198--- ui/luciole.glade 2010-02-03 06:11:27 +0000
199+++ ui/luciole.glade 2010-02-04 05:36:16 +0000
200@@ -4,10 +4,10 @@
201 <!-- interface-naming-policy toplevel-contextual -->
202 <!-- interface-local-resource-path ../images -->
203 <object class="GtkAdjustment" id="adjustment1">
204- <property name="value">1</property>
205- <property name="upper">4</property>
206- <property name="step_increment">1</property>
207- <property name="page_increment">1</property>
208+ <property name="value">0.40000000000000002</property>
209+ <property name="upper">1</property>
210+ <property name="step_increment">0.10000000000000001</property>
211+ <property name="page_increment">0.10000000000000001</property>
212 </object>
213 <object class="GtkAdjustment" id="adjustment2">
214 <property name="value">1</property>
215@@ -317,6 +317,7 @@
216 <property name="height_request">51</property>
217 <property name="visible">True</property>
218 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
219+ <property name="spacing">1</property>
220 <child>
221 <object class="GtkFixed" id="fixed8">
222 <property name="width_request">20</property>
223@@ -361,119 +362,137 @@
224 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
225 </object>
226 <packing>
227+ <property name="expand">False</property>
228+ <property name="fill">False</property>
229 <property name="position">2</property>
230 </packing>
231 </child>
232 <child>
233- <object class="GtkButton" id="snapshot_button">
234+ <object class="GtkAspectFrame" id="aspectframe3">
235+ <property name="width_request">200</property>
236 <property name="visible">True</property>
237- <property name="can_focus">True</property>
238- <property name="can_default">True</property>
239- <property name="has_default">True</property>
240- <property name="receives_default">True</property>
241- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
242- <property name="has_tooltip">True</property>
243- <property name="tooltip_text" translatable="yes" comments="Capturer une image">make a snapshot</property>
244- <accelerator key="c" signal="clicked"/>
245- <signal name="clicked" handler="on_button_capture_clicked"/>
246+ <property name="label_xalign">0</property>
247+ <property name="shadow_type">none</property>
248 <child>
249- <object class="GtkImage" id="image_snapshot_button">
250+ <object class="GtkHBox" id="hbox5">
251+ <property name="width_request">200</property>
252 <property name="visible">True</property>
253- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
254- <property name="tooltip_text" translatable="yes">make a snapshot</property>
255- <property name="pixbuf">../images/capture.png</property>
256+ <child>
257+ <object class="GtkButton" id="snapshot_button">
258+ <property name="width_request">56</property>
259+ <property name="height_request">46</property>
260+ <property name="visible">True</property>
261+ <property name="can_focus">True</property>
262+ <property name="can_default">True</property>
263+ <property name="has_default">True</property>
264+ <property name="receives_default">True</property>
265+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
266+ <accelerator key="c" signal="clicked"/>
267+ <signal name="clicked" handler="on_button_capture_clicked"/>
268+ <child>
269+ <object class="GtkImage" id="image_snapshot_button">
270+ <property name="visible">True</property>
271+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
272+ <property name="tooltip_text" translatable="yes">make a snapshot</property>
273+ <property name="pixbuf">../images/capture.png</property>
274+ </object>
275+ </child>
276+ </object>
277+ <packing>
278+ <property name="expand">False</property>
279+ <property name="position">0</property>
280+ </packing>
281+ </child>
282+ <child>
283+ <object class="GtkFixed" id="fixed11">
284+ <property name="width_request">20</property>
285+ <property name="visible">True</property>
286+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
287+ </object>
288+ <packing>
289+ <property name="expand">False</property>
290+ <property name="fill">False</property>
291+ <property name="position">1</property>
292+ </packing>
293+ </child>
294+ <child>
295+ <object class="GtkVBox" id="vbox9">
296+ <property name="width_request">120</property>
297+ <property name="visible">True</property>
298+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
299+ <property name="orientation">vertical</property>
300+ <child>
301+ <object class="GtkCheckButton" id="mixer_checkbutton">
302+ <property name="label" translatable="yes">Mixer</property>
303+ <property name="width_request">120</property>
304+ <property name="visible">True</property>
305+ <property name="can_focus">True</property>
306+ <property name="receives_default">False</property>
307+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
308+ <property name="relief">half</property>
309+ <property name="draw_indicator">True</property>
310+ <signal name="toggled" handler="on_mixer_checkbutton_toggled"/>
311+ </object>
312+ <packing>
313+ <property name="expand">False</property>
314+ <property name="fill">False</property>
315+ <property name="padding">3</property>
316+ <property name="position">0</property>
317+ </packing>
318+ </child>
319+ <child>
320+ <object class="GtkHScale" id="alpha_hscale">
321+ <property name="width_request">120</property>
322+ <property name="visible">True</property>
323+ <property name="can_focus">True</property>
324+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
325+ <property name="update_policy">discontinuous</property>
326+ <property name="adjustment">adjustment1</property>
327+ <property name="value_pos">left</property>
328+ <signal name="value_changed" handler="on_alpha_hscale_value_changed"/>
329+ </object>
330+ <packing>
331+ <property name="expand">False</property>
332+ <property name="fill">False</property>
333+ <property name="padding">4</property>
334+ <property name="position">1</property>
335+ </packing>
336+ </child>
337+ </object>
338+ <packing>
339+ <property name="expand">False</property>
340+ <property name="position">2</property>
341+ </packing>
342+ </child>
343 </object>
344 </child>
345 </object>
346 <packing>
347 <property name="expand">False</property>
348- <property name="fill">False</property>
349 <property name="position">3</property>
350 </packing>
351 </child>
352 <child>
353- <object class="GtkFixed" id="fixed11">
354- <property name="width_request">20</property>
355- <property name="visible">True</property>
356- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
357- </object>
358- <packing>
359- <property name="position">4</property>
360- </packing>
361- </child>
362- <child>
363- <object class="GtkVBox" id="vbox9">
364+ <object class="GtkVBox" id="vbox10">
365 <property name="width_request">134</property>
366 <property name="visible">True</property>
367- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
368- <property name="orientation">vertical</property>
369- <child>
370- <object class="GtkCheckButton" id="mixer_checkbutton">
371- <property name="label" translatable="yes">Mixer</property>
372- <property name="visible">True</property>
373- <property name="can_focus">False</property>
374- <property name="receives_default">False</property>
375- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
376- <property name="has_tooltip">True</property>
377- <property name="tooltip_text" translatable="yes">Mixer activation (onion skin)</property>
378- <property name="relief">half</property>
379- <property name="draw_indicator">True</property>
380- <signal name="toggled" handler="on_mixer_checkbutton_toggled"/>
381- </object>
382- <packing>
383- <property name="position">0</property>
384- </packing>
385- </child>
386- <child>
387- <object class="GtkHScale" id="alpha_hscale">
388- <property name="visible">True</property>
389- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
390- <property name="has_tooltip">True</property>
391- <property name="tooltip_text" translatable="yes">Transparency level</property>
392- <property name="update_policy">discontinuous</property>
393- <property name="adjustment">adjustment1</property>
394- <property name="digits">0</property>
395- <property name="value_pos">left</property>
396- <signal name="value_changed" handler="on_alpha_hscale_value_changed"/>
397- </object>
398- <packing>
399- <property name="position">1</property>
400- </packing>
401- </child>
402- </object>
403- <packing>
404- <property name="expand">False</property>
405- <property name="fill">False</property>
406- <property name="position">5</property>
407- </packing>
408- </child>
409- <child>
410- <object class="GtkFixed" id="fixed22">
411- <property name="width_request">20</property>
412- <property name="visible">True</property>
413- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
414- </object>
415- <packing>
416- <property name="position">6</property>
417- </packing>
418- </child>
419- <child>
420- <object class="GtkVBox" id="vbox10">
421- <property name="visible">True</property>
422 <property name="orientation">vertical</property>
423 <child>
424 <object class="GtkLabel" id="label_fpi">
425+ <property name="width_request">134</property>
426 <property name="visible">True</property>
427 <property name="label" translatable="yes">Image per seconds</property>
428 <property name="justify">center</property>
429 </object>
430 <packing>
431+ <property name="expand">False</property>
432+ <property name="fill">False</property>
433 <property name="position">0</property>
434 </packing>
435 </child>
436 <child>
437 <object class="GtkHScale" id="hscale_fps">
438- <property name="width_request">125</property>
439+ <property name="width_request">134</property>
440 <property name="visible">True</property>
441 <property name="adjustment">adjustment2</property>
442 <property name="digits">0</property>
443@@ -481,20 +500,25 @@
444 <signal name="format_value" handler="on_hscale_fps_format_value"/>
445 </object>
446 <packing>
447+ <property name="expand">False</property>
448+ <property name="fill">False</property>
449 <property name="position">1</property>
450 </packing>
451 </child>
452 </object>
453 <packing>
454- <property name="position">7</property>
455+ <property name="expand">False</property>
456+ <property name="fill">False</property>
457+ <property name="position">4</property>
458 </packing>
459 </child>
460 <child>
461 <object class="GtkFixed" id="fixed4">
462+ <property name="width_request">3</property>
463 <property name="visible">True</property>
464 </object>
465 <packing>
466- <property name="position">8</property>
467+ <property name="position">5</property>
468 </packing>
469 </child>
470 </object>
471@@ -1395,9 +1419,9 @@
472 <object class="GtkFileChooserButton" id="filechooserbutton1">
473 <property name="visible">True</property>
474 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
475+ <property name="use_preview_label">False</property>
476+ <property name="action">select-folder</property>
477 <property name="do_overwrite_confirmation">True</property>
478- <property name="action">select-folder</property>
479- <property name="use_preview_label">False</property>
480 <property name="title" translatable="yes">Select a folder</property>
481 </object>
482 <packing>

Subscribers

People subscribed via source and target branches

to all changes: