diff trunk/src/translator/project.py @ 481:04adc4e3fdda

Translator: some fixes and additions. Projects can be saved now. Documents can be switched using Ctrl+Tab and Ctrl+Shift+Tab. Some items in ProjectTree can be edited now. Added my last will to the file AUTHORS.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Wed, 14 Nov 2007 22:07:50 +0100
parents 3b5421d40f9b
children 1401e38d1e2e
line wrap: on
line diff
--- a/trunk/src/translator/project.py	Mon Nov 12 20:40:41 2007 +0100
+++ b/trunk/src/translator/project.py	Wed Nov 14 22:07:50 2007 +0100
@@ -38,7 +38,7 @@
     doc = self.doc
     self.checkType(doc, dict)
     try:
-      self.name = str(doc["Name"])
+      self.name = unicode(doc["Name"])
       self.srcLangFilePath = str(doc["SourceLangFile"])
       self.langFilePaths = list(doc["LangFiles"])
       self.msgIDs = list(doc["MsgIDs"])
@@ -91,5 +91,11 @@
       filePath = filePath2
     return langfile.LangFile(filePath)
 
+  def setName(self, name):
+    self.name = name
+
   def save(self):
-    pass
+    self.doc["Name"] = self.name
+    file_ = open(self.projectPath, "w")
+    yaml.dump(self.doc, stream=file_, allow_unicode=True)
+    file_.close()