[Sugar-devel] [PATCH v3 Word] Updated translated word when language to translate is changed. (Ticket #2210)
Ishan Bansal
ishan at seeta.in
Wed Oct 13 05:47:27 EDT 2010
Hi
Wish if you could review the patch attached below and let me know your
feedback.
Thank you for your support.
Regards
Ishan
On Tue, Oct 12, 2010 at 12:32 PM, Ishan Bansal <ishan at seeta.in> wrote:
> 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/20101013/8d8b348c/attachment.html>
More information about the Sugar-devel
mailing list