Now supports adding subtitles

Allows to cancel a job

Allows to burn de image

Show a progress bar when copying a file

When adding a subtitles file, shows the last path used

Fixed the progress bar for the number of jobs to do
This commit is contained in:
Sergio Costas 2014-08-04 12:33:25 +02:00
parent 4cc1bee474
commit 64a33e1c74
24 changed files with 495 additions and 35 deletions

View file

@ -52,6 +52,7 @@ class executor(GObject.GObject):
self.handle = None
def add_dependency(self, dep):
self.add_dependency2(dep)
@ -134,12 +135,15 @@ class executor(GObject.GObject):
def launch_process(self,command,redirect_output = True):
self.launch_command = "\n\nLaunching:"
for e in command:
self.launch_command += (" "+e)
self.launch_command += "\n"
if command != None:
self.launch_command = "\n\nLaunching:"
for e in command:
self.launch_command += (" "+e)
self.launch_command += "\n"
self.config.append_log(self.text)
self.config.append_log(self.launch_command)
if command != None:
self.config.append_log(self.launch_command)
try:
if (self.stdin_file != None):
@ -193,14 +197,13 @@ class executor(GObject.GObject):
else:
GLib.source_remove(self.timer_pulse)
def run_pulse(self,v = None):
if self.progress_bar == None:
return
if self.pulse_text == None:
self.progress_bar[1].set_text("")
else:
if self.pulse_text != None:
self.progress_bar[1].set_text(self.pulse_text)
self.progress_bar[1].pulse()
return True
@ -309,4 +312,14 @@ class executor(GObject.GObject):
self.config.append_log(self.stdout_data)
self.config.append_log(self.stderr_data)
self.emit("ended",retval)
self.emit("ended",retval)
def expand_xml(self,text):
text=text.replace('&','&')
text=text.replace('<','&lt;')
text=text.replace('>','&gt;')
text=text.replace('"','&quot;')
text=text.replace("'",'&apos;')
return text