please give me directions: how to install a patch

Asked by Clint

I have a problem per bug report (https://bugs.launchpad.net/openshot/+bug/1198555). How would I install this patch? I need step by step instructions verbose. Thank you! I'm using Debian Jessie 8 and openshot 1.4.3

Here's the patch below from (https://launchpadlibrarian.net/190471629/in_time_out_time.patch):

--- openshot/windows/ClipProperties.py.orig 2012-09-30 22:33:29.000000000 +0200
+++ openshot/windows/ClipProperties.py 2014-11-16 09:25:38.395363569 +0100
@@ -88,8 +88,8 @@
   self.txtFileName.set_text(fname)
   self.spinbtnStart.set_value(self.current_clip.position_on_track)
   self.txtLength.set_text(_("{0} seconds").format(str(self.current_clip.length())))
- self.txtIn.set_value(round(self.current_clip.start_time, 2))
   self.txtOut.set_value(round(self.current_clip.end_time, 2))
+ self.txtIn.set_value(round(self.current_clip.start_time, 2))
   self.txtAudioFadeInAmount.set_value(round(self.current_clip.audio_fade_in_amount, 2))
   self.txtAudioFadeOutAmount.set_value(round(self.current_clip.audio_fade_out_amount, 2))
   self.txtVideoFadeInAmount.set_value(round(self.current_clip.video_fade_in_amount, 2))
@@ -663,10 +663,6 @@
    local_out = local_in + 0.01
    self.txtOut.set_text(str(local_out))

- if local_out > local_max_length:
- local_out = local_max_length
- self.txtOut.set_text(str(local_out))
-
   # update length
   self.txtLength.set_text(_("{0} seconds").format(str(round(local_out - local_in, 2))))

Question information

Language:
English Edit question
Status:
Solved
For:
OpenShot Video Editor Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

The following should work as a manual workaround:

Issue the command
gksudo gedit /usr/share/pyshared/openshot/windows/ClipProperties.py

(if the command gksudo is not installed, try
sudo gedit /usr/share/pyshared/openshot/windows/ClipProperties.py
instead; if gedit is not available on your system, then use any other text editor.)

This should ask for your password as confirmation for an administrative action and then open the editor with one of the Openshot Python programs loaded.

Scroll down near line 91 and change the sequence of two lines
from
 self.txtIn.set_value(round(self.current_clip.start_time, 2))
 self.txtOut.set_value(round(self.current_clip.end_time, 2))
into
 self.txtOut.set_value(round(self.current_clip.end_time, 2))
 self.txtIn.set_value(round(self.current_clip.start_time, 2))
Keep the indentations exactly as they are in the file!

Search for the occurrence of 0.01
After the second occurrence (probably line 663) delete the block of the three lines

if local_out > local_max_length:
 local_out = local_max_length
 self.txtOut.set_text(str(local_out))

Attention, you have to make sure that you do not touch the indentation of other lines.
Save the file, close the editor, and try using OpenShot again.

In case that OpenShot does no more work after these modifications, just reinstall the openshot package and you should be at the same status as before.

Revision history for this message
Clint (grandpied2000) said :
#2

Completely excellent! Thanks so much. First time in two years since I've been using Linux that I actually needed to post a question anywhere. Usually I fish around until I sniff out an answer having learned there's more than one way to skin a cat it pays to search for simple, reliable and reputable answers which there is usually one available, but in this case applying a patch while I'm sure is a simple process for those in the know, I simply wasn't in the mood to decipher tutorials when they didn't include a simple clear-cut example for those who don't make understanding terminal command foobar-nomenclature a hobby.

For my one time fix needs, your solution while maybe clunky for some other people was very, very simple including the suggestion that if one screwed up they could reinstall openshot and, try again. I pretty much do things the old-fashion way: Setup my Debian Jessie so that I can right-click on folder containing ClipProperties.py and opened as root, then opened with mousepad and made backup file, next edited ClipProperties.py per the first of your one-two punch directions (I individually copy-n-pasted the first two lines from directions to appropriate location, and commented out (#) rather than delete three lines regarding second part of directions. Interesting the first two lines are exactly the same except the order is reversed or switched.

Last but not least, fired up openshot, and it appears to be working superb. Once again, thank you, very, very much!!

Revision history for this message
Clint (grandpied2000) said :
#3

Thanks Manfred Hampl, that solved my question.