[kupfer] google_translate: Make possible to save triggers with translate
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] google_translate: Make possible to save triggers with translate
- Date: Mon, 11 Jan 2010 22:52:11 +0000 (UTC)
commit 89d752f6a8b2871d39143566afec0124fad527fa
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Jan 11 02:46:08 2010 +0100
google_translate: Make possible to save triggers with translate
We mark the _Language class as serilizable; Kupfer will then save a
representation of the Language object right in the trigger (since it
can't find the language in the catalog). The only important part saved
is the _Language.object attribute.
If the plugin changes incompatibly in relation to _Language, you can
increase the 'serilizable' number: if it doesn't match the saved copy,
the serialized trigger won't be active anymore.
kupfer/plugin/google_translate.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/google_translate.py b/kupfer/plugin/google_translate.py
index 46cc06c..8929380 100644
--- a/kupfer/plugin/google_translate.py
+++ b/kupfer/plugin/google_translate.py
@@ -189,6 +189,7 @@ class _TranslateQuerySource(Source):
class _Language(Leaf):
+ serilizable = 1
def get_gicon(self):
return icons.ComposedIcon("text-x-generic","preferences-desktop-locale")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]