From: Adrian Iain Lam Date: Mon, 18 Sep 2017 11:56:06 +0000 (+0800) Subject: Edit code and rename files to prepare for .deb packaging X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=85c1429be09a96705eae40cbe1ac7478064a5130;p=indicator-keyboard-led.git Edit code and rename files to prepare for .deb packaging --- diff --git a/icon.svg b/icon.svg deleted file mode 100644 index d711e58..0000000 --- a/icon.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - image/svg+xml - - - - Jakub Steiner - - - Adrian I Lam - http://jimmac.musichall.cz - - Caps Lock icon - caps lock - - - - - - - - - - - - diff --git a/indicator-keyboard-led.desktop b/indicator-keyboard-led.desktop new file mode 100755 index 0000000..78c9958 --- /dev/null +++ b/indicator-keyboard-led.desktop @@ -0,0 +1,10 @@ +#!/usr/bin/env xdg-open + +[Desktop Entry] +Name=indicator-keyboard-led +Type=Application +Exec=/usr/bin/indicator-keyboard-led.py +Icon=indicator-keyboard-led +Hidden=false +NoDisplay=false +X-GNOME-Autostart-enabled=true diff --git a/indicator-keyboard-led.py b/indicator-keyboard-led.py index 7f78bc6..9213a83 100755 --- a/indicator-keyboard-led.py +++ b/indicator-keyboard-led.py @@ -40,9 +40,9 @@ from gi.repository import Gdk, Gtk, AppIndicator3 APP_NAME = 'indicator-keyboard-led' APP_VERSION = '1.1' -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +ICON_LOCATION = '/usr/share/icons/hicolor/scalable/apps/' + APP_NAME + '.svg' import gettext -t = gettext.translation('default', os.path.join(SCRIPT_DIR, 'locale')) +t = gettext.translation(APP_NAME, '/usr/share/locale') _ = t.gettext class IndicatorKeyboardLED: @@ -50,7 +50,7 @@ class IndicatorKeyboardLED: self.validate_order(order) self.indicator = AppIndicator3.Indicator.new( - APP_NAME, os.path.join(SCRIPT_DIR, 'icon.svg'), + APP_NAME, ICON_LOCATION, AppIndicator3.IndicatorCategory.APPLICATION_STATUS) self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE) diff --git a/indicator-keyboard-led.svg b/indicator-keyboard-led.svg new file mode 100644 index 0000000..d711e58 --- /dev/null +++ b/indicator-keyboard-led.svg @@ -0,0 +1,88 @@ + + + + + + + image/svg+xml + + + + Jakub Steiner + + + Adrian I Lam + http://jimmac.musichall.cz + + Caps Lock icon + caps lock + + + + + + + + + + + + diff --git a/locale/default.pot b/locale/default.pot deleted file mode 100644 index cbdf24f..0000000 --- a/locale/default.pot +++ /dev/null @@ -1,45 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -# indicator long label -msgid "Num" -msgstr "" - -# indicator long label -msgid "Caps" -msgstr "" - -# indicator long label -msgid "Scroll" -msgstr "" - -# indicator short label -msgid "N" -msgstr "" - -# indicator short label -msgid "C" -msgstr "" - -# indicator short label -msgid "S" -msgstr "" - -# menu entry -msgid "Num Lock" -msgstr "" - -# menu entry -msgid "Caps Lock" -msgstr "" - -# menu entry -msgid "Scroll Lock" -msgstr "" - -# menu entry -msgid "Quit" -msgstr "" diff --git a/locale/en/LC_MESSAGES/default.mo b/locale/en/LC_MESSAGES/default.mo deleted file mode 100644 index 1088045..0000000 Binary files a/locale/en/LC_MESSAGES/default.mo and /dev/null differ diff --git a/locale/en/LC_MESSAGES/default.po b/locale/en/LC_MESSAGES/default.po deleted file mode 100644 index 1370bfd..0000000 --- a/locale/en/LC_MESSAGES/default.po +++ /dev/null @@ -1,45 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -# indicator long label -msgid "Num" -msgstr "Num" - -# indicator long label -msgid "Caps" -msgstr "Caps" - -# indicator long label -msgid "Scroll" -msgstr "Scroll" - -# indicator short label -msgid "N" -msgstr "N" - -# indicator short label -msgid "C" -msgstr "C" - -# indicator short label -msgid "S" -msgstr "S" - -# menu entry -msgid "Num Lock" -msgstr "Num Lock" - -# menu entry -msgid "Caps Lock" -msgstr "Caps Lock" - -# menu entry -msgid "Scroll Lock" -msgstr "Scroll Lock" - -# menu entry -msgid "Quit" -msgstr "Quit" diff --git a/locale/en/LC_MESSAGES/indicator-keyboard-led.mo b/locale/en/LC_MESSAGES/indicator-keyboard-led.mo new file mode 100644 index 0000000..1088045 Binary files /dev/null and b/locale/en/LC_MESSAGES/indicator-keyboard-led.mo differ diff --git a/locale/en/LC_MESSAGES/indicator-keyboard-led.po b/locale/en/LC_MESSAGES/indicator-keyboard-led.po new file mode 100644 index 0000000..1370bfd --- /dev/null +++ b/locale/en/LC_MESSAGES/indicator-keyboard-led.po @@ -0,0 +1,45 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +# indicator long label +msgid "Num" +msgstr "Num" + +# indicator long label +msgid "Caps" +msgstr "Caps" + +# indicator long label +msgid "Scroll" +msgstr "Scroll" + +# indicator short label +msgid "N" +msgstr "N" + +# indicator short label +msgid "C" +msgstr "C" + +# indicator short label +msgid "S" +msgstr "S" + +# menu entry +msgid "Num Lock" +msgstr "Num Lock" + +# menu entry +msgid "Caps Lock" +msgstr "Caps Lock" + +# menu entry +msgid "Scroll Lock" +msgstr "Scroll Lock" + +# menu entry +msgid "Quit" +msgstr "Quit" diff --git a/locale/fr/LC_MESSAGES/default.mo b/locale/fr/LC_MESSAGES/default.mo deleted file mode 100644 index 011f9fc..0000000 Binary files a/locale/fr/LC_MESSAGES/default.mo and /dev/null differ diff --git a/locale/fr/LC_MESSAGES/default.po b/locale/fr/LC_MESSAGES/default.po deleted file mode 100644 index e1e6b04..0000000 --- a/locale/fr/LC_MESSAGES/default.po +++ /dev/null @@ -1,45 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -# indicator long label -msgid "Num" -msgstr "Num" - -# indicator long label -msgid "Caps" -msgstr "Maj" - -# indicator long label -msgid "Scroll" -msgstr "Défil" - -# indicator short label -msgid "N" -msgstr "N" - -# indicator short label -msgid "C" -msgstr "M" - -# indicator short label -msgid "S" -msgstr "D" - -# menu entry -msgid "Num Lock" -msgstr "Verr num" - -# menu entry -msgid "Caps Lock" -msgstr "Verr Maj" - -# menu entry -msgid "Scroll Lock" -msgstr "Arrêt défil" - -# menu entry -msgid "Quit" -msgstr "Quitter" diff --git a/locale/fr/LC_MESSAGES/indicator-keyboard-led.mo b/locale/fr/LC_MESSAGES/indicator-keyboard-led.mo new file mode 100644 index 0000000..011f9fc Binary files /dev/null and b/locale/fr/LC_MESSAGES/indicator-keyboard-led.mo differ diff --git a/locale/fr/LC_MESSAGES/indicator-keyboard-led.po b/locale/fr/LC_MESSAGES/indicator-keyboard-led.po new file mode 100644 index 0000000..e1e6b04 --- /dev/null +++ b/locale/fr/LC_MESSAGES/indicator-keyboard-led.po @@ -0,0 +1,45 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +# indicator long label +msgid "Num" +msgstr "Num" + +# indicator long label +msgid "Caps" +msgstr "Maj" + +# indicator long label +msgid "Scroll" +msgstr "Défil" + +# indicator short label +msgid "N" +msgstr "N" + +# indicator short label +msgid "C" +msgstr "M" + +# indicator short label +msgid "S" +msgstr "D" + +# menu entry +msgid "Num Lock" +msgstr "Verr num" + +# menu entry +msgid "Caps Lock" +msgstr "Verr Maj" + +# menu entry +msgid "Scroll Lock" +msgstr "Arrêt défil" + +# menu entry +msgid "Quit" +msgstr "Quitter" diff --git a/locale/indicator-keyboard-led.pot b/locale/indicator-keyboard-led.pot new file mode 100644 index 0000000..cbdf24f --- /dev/null +++ b/locale/indicator-keyboard-led.pot @@ -0,0 +1,45 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +# indicator long label +msgid "Num" +msgstr "" + +# indicator long label +msgid "Caps" +msgstr "" + +# indicator long label +msgid "Scroll" +msgstr "" + +# indicator short label +msgid "N" +msgstr "" + +# indicator short label +msgid "C" +msgstr "" + +# indicator short label +msgid "S" +msgstr "" + +# menu entry +msgid "Num Lock" +msgstr "" + +# menu entry +msgid "Caps Lock" +msgstr "" + +# menu entry +msgid "Scroll Lock" +msgstr "" + +# menu entry +msgid "Quit" +msgstr ""