From 85c1429be09a96705eae40cbe1ac7478064a5130 Mon Sep 17 00:00:00 2001 From: Adrian Iain Lam Date: Mon, 18 Sep 2017 19:56:06 +0800 Subject: [PATCH] Edit code and rename files to prepare for .deb packaging --- icon.svg | 88 ------------------------ indicator-keyboard-led.desktop | 10 +++ indicator-keyboard-led.py | 6 +- indicator-keyboard-led.svg | 88 ++++++++++++++++++++++++ locale/default.pot | 45 ------------ locale/en/LC_MESSAGES/default.mo | Bin 480 -> 0 bytes locale/en/LC_MESSAGES/default.po | 45 ------------ locale/en/LC_MESSAGES/indicator-keyboard-led.mo | Bin 0 -> 480 bytes locale/en/LC_MESSAGES/indicator-keyboard-led.po | 45 ++++++++++++ locale/fr/LC_MESSAGES/default.mo | Bin 483 -> 0 bytes locale/fr/LC_MESSAGES/default.po | 45 ------------ locale/fr/LC_MESSAGES/indicator-keyboard-led.mo | Bin 0 -> 483 bytes locale/fr/LC_MESSAGES/indicator-keyboard-led.po | 45 ++++++++++++ locale/indicator-keyboard-led.pot | 45 ++++++++++++ 14 files changed, 236 insertions(+), 226 deletions(-) delete mode 100644 icon.svg create mode 100755 indicator-keyboard-led.desktop create mode 100644 indicator-keyboard-led.svg delete mode 100644 locale/default.pot delete mode 100644 locale/en/LC_MESSAGES/default.mo delete mode 100644 locale/en/LC_MESSAGES/default.po create mode 100644 locale/en/LC_MESSAGES/indicator-keyboard-led.mo create mode 100644 locale/en/LC_MESSAGES/indicator-keyboard-led.po delete mode 100644 locale/fr/LC_MESSAGES/default.mo delete mode 100644 locale/fr/LC_MESSAGES/default.po create mode 100644 locale/fr/LC_MESSAGES/indicator-keyboard-led.mo create mode 100644 locale/fr/LC_MESSAGES/indicator-keyboard-led.po create mode 100644 locale/indicator-keyboard-led.pot 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 108804513bb6ab57086b35c5f535c689c03d5e0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmbu3KQ9D97{&+Z-)bCjyc~$=&^3WF7qAR+C8*11d4YU_M(JP!S%Yfmev)^gQ zC(6~@npC#dH>1oNuZ)lTca=(|SGRtnDsyeNWpS0eTKS#h{$8B??YZ347s|zLQ`mED OE>oGDX&?RLr+xsH9Z!P* 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 0000000000000000000000000000000000000000..108804513bb6ab57086b35c5f535c689c03d5e0f GIT binary patch literal 480 zcmbu3KQ9D97{&+Z-)bCjyc~$=&^3WF7qAR+C8*11d4YU_M(JP!S%Yfmev)^gQ zC(6~@npC#dH>1oNuZ)lTca=(|SGRtnDsyeNWpS0eTKS#h{$8B??YZ347s|zLQ`mED OE>oGDX&?RLr+xsH9Z!P* literal 0 HcmV?d00001 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 011f9fc730b91b0668ff179043f4ac9976a316a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 483 zcmYk1&q~8U5XMKX|006biw6&jc<>Un7YQjMl2#B+L0Ua{i|JOQaT7LM&|cvL8?o<;7?bCs}+;Eo$}eSY>+JPYkuG9qTMjEy_xG z6gJ&+sf#32zNl^OI6W2sX>jwOD{?3KUn7YQjMl2#B+L0Ua{i|JOQaT7LM&|cvL8?o<;7?bCs}+;Eo$}eSY>+JPYkuG9qTMjEy_xG z6gJ&+sf#32zNl^OI6W2sX>jwOD{?3K