← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 625: Fixed a locale bug which prevents the settings window from opening, due to comma decimal seperator

 

------------------------------------------------------------
revno: 625
fixes bug: https://launchpad.net/bugs/923873
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Mon 2012-01-30 17:16:33 -0600
message:
  Fixed a locale bug which prevents the settings window from opening, due to comma decimal seperator
modified:
  openshot/windows/preferences.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/preferences.py'
--- openshot/windows/preferences.py	2011-10-19 20:59:26 +0000
+++ openshot/windows/preferences.py	2012-01-30 23:16:33 +0000
@@ -91,7 +91,7 @@
 		
 			
 		#populate form objects
-		self.valImageLength.set_value(float(self.form.settings.general["imported_image_length"]))
+		self.valImageLength.set_value(float(self.form.settings.general["imported_image_length"].replace(",",".")))
 		self.valHistoryStackSize.set_value(float(self.form.settings.general["max_history_size"]))
 		self.txtMeltCommandName.set_text(self.form.settings.general["melt_command"])
 		self.txtBlenderCommand.set_text(self.form.settings.general["blender_command"])
@@ -200,7 +200,7 @@
 		
 	def on_btnClose_clicked(self, widget, *args):
 		#write the values from the form to the dictionary objects
-		self.form.settings.general["imported_image_length"] = self.valImageLength.get_text()
+		self.form.settings.general["imported_image_length"] = self.valImageLength.get_text().replace(",",".")
 		self.form.settings.general["default_theme"] = self.cmbThemes.get_active_text()
 		self.form.settings.general["default_profile"] = self.cmbProfiles.get_active_text()
 		self.form.settings.general["melt_command"] = self.txtMeltCommandName.get_text()
@@ -214,7 +214,7 @@
 		self.frmPreferences.destroy()
 		
 	def on_valImageLength_value_changed(self, widget, *args):
-		self.form.settings.general["imported_image_length"] = self.valImageLength.get_value_as_int()
+		self.form.settings.general["imported_image_length"] = self.valImageLength.get_text().replace(",",".")
 		
 	def on_cmbProfiles_changed(self, widget, *args):
 		self.form.settings.general["default_profile"] = self.cmbProfiles.get_active_text()