[Sugar-devel] [PATCH] Updated translated word when language to translate is changed. (Ticket #2210)
Ishan Bansal
ishan at seeta.in
Fri Oct 8 04:08:46 EDT 2010
From: Ishan Bansal <ishan at seeta.in>,Anubhav Aggarwal <anubhav at seeta.in>
New global variable 'newtotranslate' added to update the translated text when
the language to translate is being changed.
---
pippy_app.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/pippy_app.py b/pippy_app.py
index b9a5a25..771e810 100644
--- a/pippy_app.py
+++ b/pippy_app.py
@@ -151,6 +151,8 @@ class WordsActivity(ViewSourceActivity):
def lang2combo_cb(self, combo):
self.languagemodel.SetLanguages("English", self.langs[combo.get_active()])
+ self.translated.set_text("")
+ self.totranslate_cb(newtotranslate)
def lang1sel_cb(self, column):
# FIXME: Complete the text entry box
@@ -176,7 +178,9 @@ class WordsActivity(ViewSourceActivity):
self.say(text, lang)
def totranslate_cb(self, totranslate):
+ global newtotranslate
entry = totranslate.get_text()
+ newtotranslate = totranslate
# Ask for completion suggestions
if not entry:
return
--
1.7.0.4
More information about the Sugar-devel
mailing list