Merge lp:~fincha/openshot/andy-bugfixes into lp:openshot/1.4

Proposed by Andy Finch
Status: Merged
Merged at revision: not available
Proposed branch: lp:~fincha/openshot/andy-bugfixes
Merge into: lp:openshot/1.4
Diff against target: None lines
To merge this branch: bzr merge lp:~fincha/openshot/andy-bugfixes
Reviewer Review Type Date Requested Status
OpenShot Developers Pending
Review via email: mp+7821@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andy Finch (fincha) wrote :

The only changes in this branch relate to bug 385715, 'File Properties not showing'.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'main/westley.xml'
2--- main/westley.xml 2009-06-18 07:34:28 +0000
3+++ main/westley.xml 2009-06-23 21:39:19 +0000
4@@ -1,1 +1,1 @@
5-<?xml version="1.0" ?><xml><tractor id="tractor0"><multitrack><playlist id="Track 1"/><playlist id="Track 2"/></multitrack></tractor></xml>
6\ No newline at end of file
7+<?xml version="1.0" ?><xml><tractor id="tractor0"><multitrack><playlist id="Track 1"/><playlist id="Track 2"><producer id="In The Beginning.svg" in="0.0" out="899.100899101"><property name="resource">/home/andy/openshot/main/thumbnail/In The Beginning.svg</property></producer></playlist></multitrack><transition in="0.0" out="899.100899101"><property name="mlt_service">composite</property><property name="a_track">0</property><property name="b_track">1</property><property name="geometry">0=0%,0%:100%x100%:100; -1=0%,0%:100%x100%:100</property><property name="halign">centre</property><property name="valign">centre</property><property name="distort">1</property></transition><transition in="0.0" out="899.100899101"><property name="mlt_service">mix</property><property name="a_track">0</property><property name="b_track">1</property><property name="combine">1</property><property name="always_active">1</property></transition></tractor></xml>
8\ No newline at end of file
9
10=== modified file 'main/windows/FileProperties.py'
11--- main/windows/FileProperties.py 2009-05-19 06:07:26 +0000
12+++ main/windows/FileProperties.py 2009-06-23 21:39:19 +0000
13@@ -18,6 +18,7 @@
14
15 from classes.project import project
16 from classes.messagebox import *
17+import classes.timeline as timeline
18
19 import gtk, gtk.glade
20 import os
21@@ -40,36 +41,53 @@
22 self.form = form
23 self.project = project
24
25- #generic properties
26- self.lblName.set_label(file.name)
27- if file.thumb_location != "":
28- pixbuf = gtk.gdk.pixbuf_new_from_file(file.thumb_location)
29- pixbuf = pixbuf.scale_simple(102,76,gtk.gdk.INTERP_BILINEAR)
30+ # get the path of OpenShot
31+ path = os.path.dirname(os.path.abspath(sys.argv[0]))
32+
33+ #set the thumbnail - use the preview thumbnail
34+ #for video & image files
35+ if file.file_type != "audio":
36+ if file.thumb_location != "":
37+ pixbuf = gtk.gdk.pixbuf_new_from_file(file.thumb_location)
38+ pixbuf = pixbuf.scale_simple(112,83,gtk.gdk.INTERP_BILINEAR)
39+ self.imgPreview.set_from_pixbuf(pixbuf)
40+ else:
41+ #use the generic OpenShot audio thumbnail
42+ pixbuf = gtk.gdk.pixbuf_new_from_file("%s/images/AudioThumbnail.png" % (path))
43+ pixbuf = pixbuf.scale_simple(112,83,gtk.gdk.INTERP_BILINEAR)
44 self.imgPreview.set_from_pixbuf(pixbuf)
45- self.lblMimeType.set_label(file.mimetype)
46- #some mimetypes are quite long (e.g. mpeg), they'll never fit in the label space.
47- #add a tooltip to contain the mimetype, and set ellipses if the lable doesn't fit.
48- self.lblMimeType.set_tooltip_text(file.mimetype)
49- self.lblMimeType.set_ellipsize(pango.ELLIPSIZE_END)
50- self.lblLocation.set_label(file.name)
51- self.lblLengthValue.set_label(str(file.length) + " secs")
52+
53+ #set the file type
54+ self.lblMimeType.set_label(file.file_type)
55+
56+ #if the file name is too long to fit the space, add ellipses and a tooltip.
57+ self.lblLocation1.set_label(file.name)
58+ self.lblLocation1.set_tooltip_text(file.name)
59+ self.lblLocation1.set_ellipsize(pango.ELLIPSIZE_END)
60+ #format the file length
61+ milliseconds = file.length * 1000
62+ time = timeline.timeline().get_friendly_time(milliseconds)
63+
64+ hours = time[2]
65+ mins = time[3]
66+ secs = time[4]
67+ milli = time[5]
68+
69+ time_str = "%02d:%02d:%02d" % (time[2], time[3], time[4])
70+ self.lblLengthValue.set_label(time_str)
71+ #project label
72 self.txtLabel.set_text(file.label)
73
74- if file.mimetype.startswith("video"):
75+ if file.file_type.startswith("video"):
76 #video specific properties
77 self.lblRateValue.set_label(str(file.videorate[0]) + "/" + str(file.videorate[1]))
78 self.lblSizeValue.set_label(str(file.width) + " x " + str(file.height))
79
80- elif file.mimetype.startswith("audio"):
81- #audio specific properties
82- self.lblRate.set_label("Audio Depth")
83- self.lblRateValue.set_label(str(file.audiodepth))
84- self.lblSize.set_label("Audio width")
85- self.lblSizeValue.set_label(str(file.audiowidth))
86-
87- self.lblSampleRateValue.set_label(str(file.audiorate))
88- self.lblAudioChannelsValue.set_label(str(file.audiochannels))
89-
90+ else:
91+ self.lblRate.set_sensitive(False)
92+ self.lblSize.set_sensitive(False)
93+
94+ #show the form
95 self.frmFileProperties.show_all()
96
97 def on_btnClose_clicked(self, event):
98@@ -78,7 +96,7 @@
99 def on_btnApply_clicked(self, event):
100 if self.txtLabel.get_text() == "":
101 return
102- self.project.project_folder.UpdateFileLabel(self.lblName.get_label(), self.txtLabel.get_text(), 1)
103+ self.project.project_folder.UpdateFileLabel(self.lblLocation1.get_label(), self.txtLabel.get_text(), 1)
104 self.frmFileProperties.destroy()
105
106 def main():
107
108=== modified file 'main/windows/glade/FileProperties.glade'
109--- main/windows/glade/FileProperties.glade 2008-12-04 21:57:30 +0000
110+++ main/windows/glade/FileProperties.glade 2009-06-23 21:39:19 +0000
111@@ -1,15 +1,17 @@
112-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
113-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
114-<!--Generated with glade3 3.4.0 on Thu Dec 4 21:34:46 2008 -->
115+<?xml version="1.0"?>
116 <glade-interface>
117+ <!-- interface-requires gtk+ 2.16 -->
118+ <!-- interface-naming-policy toplevel-contextual -->
119 <widget class="GtkDialog" id="frmFileProperties">
120 <property name="width_request">450</property>
121 <property name="height_request">270</property>
122 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
123 <property name="border_width">5</property>
124 <property name="title" translatable="yes">OpenShot - File Properties</property>
125- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
126- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
127+ <property name="resizable">False</property>
128+ <property name="window_position">center-on-parent</property>
129+ <property name="icon">icons/openshot_logo.png</property>
130+ <property name="type_hint">dialog</property>
131 <property name="has_separator">False</property>
132 <child internal-child="vbox">
133 <widget class="GtkVBox" id="dialog-vbox1">
134@@ -21,6 +23,38 @@
135 <property name="visible">True</property>
136 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
137 <child>
138+ <widget class="GtkHBox" id="hbox3">
139+ <property name="visible">True</property>
140+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
141+ <child>
142+ <widget class="GtkLabel" id="lblLocation">
143+ <property name="visible">True</property>
144+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
145+ <property name="xalign">0</property>
146+ <property name="label" translatable="yes">&lt;b&gt;File Name:&lt;/b&gt;</property>
147+ <property name="use_markup">True</property>
148+ </widget>
149+ <packing>
150+ <property name="expand">False</property>
151+ <property name="position">0</property>
152+ </packing>
153+ </child>
154+ <child>
155+ <widget class="GtkLabel" id="lblLocation1">
156+ <property name="visible">True</property>
157+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
158+ <property name="xpad">3</property>
159+ </widget>
160+ <packing>
161+ <property name="position">1</property>
162+ </packing>
163+ </child>
164+ </widget>
165+ <packing>
166+ <property name="position">0</property>
167+ </packing>
168+ </child>
169+ <child>
170 <widget class="GtkHBox" id="hbox1">
171 <property name="visible">True</property>
172 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
173@@ -32,11 +66,15 @@
174 <property name="yalign">0</property>
175 <property name="stock">gtk-missing-image</property>
176 </widget>
177+ <packing>
178+ <property name="position">0</property>
179+ </packing>
180 </child>
181 <child>
182 <widget class="GtkVSeparator" id="vseparator1">
183 <property name="visible">True</property>
184 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
185+ <property name="orientation">vertical</property>
186 </widget>
187 <packing>
188 <property name="expand">False</property>
189@@ -66,7 +104,9 @@
190 <property name="visible">True</property>
191 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
192 <property name="xalign">0</property>
193- <property name="label" translatable="yes">Mime Type:</property>
194+ <property name="xpad">2</property>
195+ <property name="label" translatable="yes">&lt;b&gt;File Type:&lt;/b&gt;</property>
196+ <property name="use_markup">True</property>
197 </widget>
198 <packing>
199 <property name="top_attach">1</property>
200@@ -74,29 +114,13 @@
201 </packing>
202 </child>
203 <child>
204- <widget class="GtkLabel" id="lblName">
205- <property name="visible">True</property>
206- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
207- </widget>
208- <packing>
209- <property name="left_attach">1</property>
210- <property name="right_attach">2</property>
211- </packing>
212- </child>
213- <child>
214- <widget class="GtkLabel" id="label1">
215- <property name="visible">True</property>
216- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
217- <property name="xalign">0</property>
218- <property name="label" translatable="yes">File Name:</property>
219- </widget>
220- </child>
221- <child>
222 <widget class="GtkLabel" id="lblRate">
223 <property name="visible">True</property>
224 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
225 <property name="xalign">0</property>
226- <property name="label" translatable="yes">Bit Rate:</property>
227+ <property name="xpad">2</property>
228+ <property name="label" translatable="yes">&lt;b&gt;Bit Rate:&lt;/b&gt;</property>
229+ <property name="use_markup">True</property>
230 </widget>
231 <packing>
232 <property name="top_attach">2</property>
233@@ -120,7 +144,9 @@
234 <property name="visible">True</property>
235 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
236 <property name="xalign">0</property>
237- <property name="label" translatable="yes">Video Size:</property>
238+ <property name="xpad">2</property>
239+ <property name="label" translatable="yes">&lt;b&gt;Video Size:&lt;/b&gt;</property>
240+ <property name="use_markup">True</property>
241 </widget>
242 <packing>
243 <property name="top_attach">3</property>
244@@ -144,7 +170,9 @@
245 <property name="visible">True</property>
246 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
247 <property name="xalign">0</property>
248- <property name="label" translatable="yes">File Length:</property>
249+ <property name="xpad">2</property>
250+ <property name="label" translatable="yes">&lt;b&gt;File Length:&lt;/b&gt;</property>
251+ <property name="use_markup">True</property>
252 </widget>
253 <packing>
254 <property name="top_attach">4</property>
255@@ -164,52 +192,22 @@
256 </packing>
257 </child>
258 <child>
259- <widget class="GtkLabel" id="lblSizeValue2">
260- <property name="visible">True</property>
261- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
262- <property name="xalign">0</property>
263- <property name="label" translatable="yes">Sample Rate (hz):</property>
264- </widget>
265- <packing>
266- <property name="top_attach">5</property>
267- <property name="bottom_attach">6</property>
268- </packing>
269- </child>
270- <child>
271- <widget class="GtkLabel" id="lblSampleRateValue">
272- <property name="visible">True</property>
273- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
274- </widget>
275- <packing>
276- <property name="left_attach">1</property>
277- <property name="right_attach">2</property>
278- <property name="top_attach">5</property>
279- <property name="bottom_attach">6</property>
280- </packing>
281- </child>
282- <child>
283- <widget class="GtkLabel" id="lblSizeValue4">
284- <property name="visible">True</property>
285- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
286- <property name="xalign">0</property>
287- <property name="label" translatable="yes">Audio Channels:</property>
288- </widget>
289- <packing>
290- <property name="top_attach">6</property>
291- <property name="bottom_attach">7</property>
292- </packing>
293- </child>
294- <child>
295- <widget class="GtkLabel" id="lblAudioChannelsValue">
296- <property name="visible">True</property>
297- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
298- </widget>
299- <packing>
300- <property name="left_attach">1</property>
301- <property name="right_attach">2</property>
302- <property name="top_attach">6</property>
303- <property name="bottom_attach">7</property>
304- </packing>
305+ <placeholder/>
306+ </child>
307+ <child>
308+ <placeholder/>
309+ </child>
310+ <child>
311+ <placeholder/>
312+ </child>
313+ <child>
314+ <placeholder/>
315+ </child>
316+ <child>
317+ <placeholder/>
318+ </child>
319+ <child>
320+ <placeholder/>
321 </child>
322 </widget>
323 <packing>
324@@ -217,6 +215,9 @@
325 </packing>
326 </child>
327 </widget>
328+ <packing>
329+ <property name="position">1</property>
330+ </packing>
331 </child>
332 <child>
333 <widget class="GtkHSeparator" id="hseparator1">
334@@ -226,35 +227,6 @@
335 <packing>
336 <property name="expand">False</property>
337 <property name="padding">8</property>
338- <property name="position">1</property>
339- </packing>
340- </child>
341- <child>
342- <widget class="GtkHBox" id="hbox3">
343- <property name="visible">True</property>
344- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
345- <child>
346- <widget class="GtkLabel" id="lblLocation">
347- <property name="visible">True</property>
348- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
349- <property name="xalign">0</property>
350- <property name="label" translatable="yes">File Location:</property>
351- </widget>
352- <packing>
353- <property name="expand">False</property>
354- </packing>
355- </child>
356- <child>
357- <widget class="GtkLabel" id="lblLocation">
358- <property name="visible">True</property>
359- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
360- </widget>
361- <packing>
362- <property name="position">1</property>
363- </packing>
364- </child>
365- </widget>
366- <packing>
367 <property name="position">2</property>
368 </packing>
369 </child>
370@@ -267,10 +239,12 @@
371 <property name="visible">True</property>
372 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
373 <property name="xalign">0</property>
374- <property name="label" translatable="yes">Label:</property>
375+ <property name="label" translatable="yes">&lt;b&gt;Label:&lt;/b&gt;</property>
376+ <property name="use_markup">True</property>
377 </widget>
378 <packing>
379 <property name="expand">False</property>
380+ <property name="position">0</property>
381 </packing>
382 </child>
383 <child>
384@@ -297,38 +271,44 @@
385 <widget class="GtkHButtonBox" id="dialog-action_area1">
386 <property name="visible">True</property>
387 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
388- <property name="layout_style">GTK_BUTTONBOX_END</property>
389+ <property name="layout_style">end</property>
390 <child>
391 <widget class="GtkButton" id="btnClose">
392- <property name="visible">True</property>
393- <property name="can_focus">True</property>
394- <property name="receives_default">True</property>
395- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
396 <property name="label" translatable="yes">gtk-close</property>
397+ <property name="visible">True</property>
398+ <property name="can_focus">True</property>
399+ <property name="receives_default">True</property>
400+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
401 <property name="use_stock">True</property>
402- <property name="response_id">0</property>
403 <signal name="clicked" handler="on_btnClose_clicked"/>
404 </widget>
405+ <packing>
406+ <property name="expand">False</property>
407+ <property name="fill">False</property>
408+ <property name="position">0</property>
409+ </packing>
410 </child>
411 <child>
412 <widget class="GtkButton" id="btnApply">
413- <property name="visible">True</property>
414- <property name="can_focus">True</property>
415- <property name="receives_default">True</property>
416- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
417 <property name="label" translatable="yes">gtk-apply</property>
418+ <property name="visible">True</property>
419+ <property name="can_focus">True</property>
420+ <property name="receives_default">True</property>
421+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
422 <property name="use_stock">True</property>
423- <property name="response_id">0</property>
424 <signal name="clicked" handler="on_btnApply_clicked"/>
425 </widget>
426 <packing>
427+ <property name="expand">False</property>
428+ <property name="fill">False</property>
429 <property name="position">1</property>
430 </packing>
431 </child>
432 </widget>
433 <packing>
434 <property name="expand">False</property>
435- <property name="pack_type">GTK_PACK_END</property>
436+ <property name="pack_type">end</property>
437+ <property name="position">0</property>
438 </packing>
439 </child>
440 </widget>

Subscribers

People subscribed via source and target branches

to status/vote changes: