Merge branch 'master' of https://github.com/Cyrille37/indicator-chars
authorCyrille Giquello <cyrille@giquello.fr>
Wed, 3 Feb 2016 18:37:15 +0000 (19:37 +0100)
committerCyrille Giquello <cyrille@giquello.fr>
Wed, 3 Feb 2016 18:37:15 +0000 (19:37 +0100)
README.rst
conf-example.indicator-chars [new file with mode: 0644]
indicator-chars.py

index bd44bb8..e31d12d 100644 (file)
@@ -11,6 +11,24 @@ Create a file .indicator-chars in your home directory with lines of
 characters to be selectable.
 
 -------
+Fork Cyrille37
+-------
+
+:Author: Cyrille37 <cyrille37@gmail.com>
+
+- Some changes to make indicator-chars works on Ubuntu 12.04LTS with Unity 2D
+
+  - replace the custom icon with a theme icon name
+
+  - add a char copy into Clipboard(selection="CLIPBOARD")
+
+- Other minors changes
+
+  - use env to find the Python engine
+
+  - add a configuration file example: "conf-example.indicator-chars"
+
+-------
 Install
 -------
 
diff --git a/conf-example.indicator-chars b/conf-example.indicator-chars
new file mode 100644 (file)
index 0000000..593ffee
--- /dev/null
@@ -0,0 +1,3 @@
+[letters]ÀÇÈÉø
+[signs]«»×ø¼½¾
+
index 0570a02..61c5365 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
 # Very simple chars indicator.
@@ -51,7 +51,10 @@ class IndicatorChars:
 
     def __init__(self):
         self.ind = appindicator.Indicator(
-            "Chars", os.path.join(self.SCRIPT_DIR, 'light16x16.png'),
+            # Custom icon seems to doesn't work on my Ubuntu 12.04 LTS running Unity 2D
+            #"Chars", os.path.join(self.SCRIPT_DIR, 'light16x16.png'),
+            # So fallback to an referenced theme's icon name
+            "Chars", "accessories-character-map",
             appindicator.CATEGORY_APPLICATION_STATUS)
         self.ind.set_status(appindicator.STATUS_ACTIVE)        
 
@@ -117,6 +120,8 @@ class IndicatorChars:
     def on_char_click(self, widget, char):
         cb = gtk.Clipboard(selection="PRIMARY")
         cb.set_text(char)
+        cb = gtk.Clipboard(selection="CLIPBOARD")
+        cb.set_text(char)
 
     def on_quit(self, widget):
         gtk.main_quit()