X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=indicator-chars.py;h=b57981af28753480cd2634083323e32783b99fde;hb=51a9e97c84875def009af7faf7f41566aed7d0a9;hp=913437b0f696609963066bc48d01d8d7d80f5116;hpb=a417e10ae13d57893b7b30cf8c322514b886d754;p=indicator-chars.git diff --git a/indicator-chars.py b/indicator-chars.py index 913437b..b57981a 100755 --- a/indicator-chars.py +++ b/indicator-chars.py @@ -1,9 +1,11 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # Very simple chars indicator. # Author: Tobias Schlitt # +# 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' @@ -50,7 +53,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) @@ -116,6 +122,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()