[Sugar-devel] Fwd: [PATCH v3 Word] Updated translated word when language to translate is changed. (Ticket #2210)
Ishan Bansal
ishan at seeta.in
Wed Oct 20 15:23:28 EDT 2010
hi
I had submitted the patch for ticket #2210.
Wish if you can review it and provide me any changes required.
Regards
ishan
---------- Forwarded message ----------
From: Ishan Bansal <ishan at seeta.in>
Date: Tue, Oct 12, 2010 at 12:32 PM
Subject: [PATCH v3 Word] Updated translated word when language to translate
is changed. (Ticket #2210)
To: bernie at codewiz.org
Cc: sugar-devel at lists.sugarlabs.org, dextrose at lists.sugarlabs.org
New global variable 'newtotranslate' added to update the translated text
when
the language to translate is being changed.
Signed-off-by: Ishan Bansal <ishan at seeta.in>, Anubhav Aggarwal <
anubhav at seeta.in>
---
pippy_app.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
v1->v2 : Global variable removed and subject updated.
v2->v3 : Co-author fields added in accordance with the guidelines for patch
submission
diff --git a/pippy_app.py b/pippy_app.py
index b9a5a25..f9b0be7 100644
--- a/pippy_app.py
+++ b/pippy_app.py
@@ -49,6 +49,7 @@ class WordsActivity(ViewSourceActivity):
self.fromlang = "English"
self.tolang = "Spanish"
self.languagemodel = LanguageModel.LanguageModel()
+ self.newtotranslate = 'none'
# Main layout.
hbox = gtk.HBox(homogeneous=True)
@@ -151,6 +152,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(self.newtotranslate)
def lang1sel_cb(self, column):
# FIXME: Complete the text entry box
@@ -177,6 +180,7 @@ class WordsActivity(ViewSourceActivity):
def totranslate_cb(self, totranslate):
entry = totranslate.get_text()
+ self.newtotranslate = totranslate
# Ask for completion suggestions
if not entry:
return
--
1.7.0.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101021/0947a36d/attachment.html>
More information about the Sugar-devel
mailing list