doc
[indicator-chars.git] / indicator-chars.py
index 50fcee6..b57981a 100755 (executable)
@@ -4,6 +4,8 @@
 # Very simple chars indicator.
 # Author: Tobias Schlitt <toby@php.net>
 #
+# Hacked by Cyrille37 on 2016-02-03
+#
 # Copyright (c) 2011, Tobias Schlitt
 # All rights reserved.
 # 
@@ -36,6 +38,7 @@ import gtk
 import gio
 import signal
 import subprocess
+# sudo apt-get install python-appindicator
 import appindicator
 
 APP_NAME = 'indicator-chars'
@@ -77,7 +80,6 @@ class IndicatorChars:
 
         # Create menu
         menu = gtk.Menu()
-        self.ind.set_menu(menu)
         
         for charLine in charDef:
             charLine = unicode(charLine)
@@ -114,11 +116,14 @@ class IndicatorChars:
         menu.append(quit_item)
 
         # Show the menu
+        self.ind.set_menu(menu)
         menu.show_all()
 
     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()