Permalink
Browse files

Fixed bug when MKISOFS uses comma instead of dot for float values. Al…

…so fixed the progress dialog: now it shows the text centered.
  • Loading branch information...
1 parent c1601b0 commit a574810e2d30f8f2fefd33e2b384367e92b0686c Sergio Costas committed May 18, 2011
Showing with 6 additions and 7 deletions.
  1. +2 −1 devede_bincue.py
  2. +1 −1 devede_dvd.py
  3. +3 −5 interface/wprogress.ui
View
@@ -88,7 +88,8 @@ def set_progress_bar(self):
punto=self.cadena.find("done, estimate")
if (punto!=-1):
if ((self.cadena[punto-6].isdigit()) and ((self.cadena[punto-7].isdigit()) or (self.cadena[punto-7]==" "))):
- percent2=float(self.cadena[punto-7:punto-2])
+ value=self.cadena[punto-7:punto-2]
+ percent2=float(value.replace(",","."))
self.bar.set_fraction(percent2/100)
self.bar.set_text(str(int(percent2))+"%")
return True
View
@@ -66,7 +66,7 @@ def set_progress_bar(self):
if (position2!=-1):
cadena=self.cadena[position2-2:position2]
self.bar.set_text(cadena+"%")
- self.bar.set_fraction((float(cadena))/100.0)
+ self.bar.set_fraction((float(cadena.replace(",",".")))/100.0)
self.read_chars=200
return True
return False
View
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
@@ -12,17 +12,15 @@
<signal name="delete_event" handler="cancel_clicked"/>
<child>
<object class="GtkVBox" id="vbox8">
+ <property name="width_request">400</property>
+ <property name="height_request">200</property>
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="lcreating">
- <property name="width_request">400</property>
- <property name="height_request">140</property>
<property name="visible">True</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
- <property name="wrap">True</property>
</object>
<packing>
<property name="position">0</property>

0 comments on commit a574810

Please sign in to comment.