[kupfer: 6/13] plugin.google_translate: Language icons



commit 9cb938aed0959a8e7d6b34ac39d98046b25266ba
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Fri Oct 30 13:35:17 2009 +0100

    plugin.google_translate: Language icons
    
    Language icons is a very hard issue, but we can use (from icon
    specification) preferences-desktop-locale as a start.

 kupfer/plugin/google_translate.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/google_translate.py b/kupfer/plugin/google_translate.py
index fc2a814..99defbd 100644
--- a/kupfer/plugin/google_translate.py
+++ b/kupfer/plugin/google_translate.py
@@ -6,7 +6,7 @@ import urllib
 from urlparse import urlparse
 
 from kupfer.objects import Source, Action, TextLeaf, Leaf
-from kupfer import utils, pretty
+from kupfer import icons, utils, pretty
 
 __kupfer_name__ = _("Google Translate")
 __kupfer_actions__ = ("Translate", )
@@ -157,7 +157,8 @@ class _TransateQuerySource(Source):
 
 
 class _Language(Leaf):
-	pass
+	def get_gicon(self):
+		return icons.ComposedIcon("text-x-generic","preferences-desktop-locale")
 
 
 class _LangSource(Source):
@@ -176,3 +177,6 @@ class _LangSource(Source):
 
 	def provides(self):
 		yield _Language
+
+	def get_icon_name(self):
+		return "preferences-desktop-locale"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]