Allow disabling Safe Eyes option to tray icon. Add #264

This commit is contained in:
Gobinath 2019-02-23 19:14:26 -05:00
parent e3697f4c0e
commit 40aacdf642
38 changed files with 165 additions and 12 deletions

View File

@ -388,6 +388,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -385,6 +385,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -389,6 +389,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Quant a" msgstr "Quant a"

View File

@ -391,6 +391,10 @@ msgstr "Zobrazovat ikonu v systémové oblasti"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Zobrazit čas příští přestávky v systémové oblasti" msgstr "Zobrazit čas příští přestávky v systémové oblasti"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "O aplikaci" msgstr "O aplikaci"

View File

@ -387,6 +387,10 @@ msgstr "Vise en ikon i meddelelsesområdet"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Vis næste pausetid i bakkeikon" msgstr "Vis næste pausetid i bakkeikon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Om" msgstr "Om"

View File

@ -389,6 +389,10 @@ msgstr "Symbol im Tray anzeigen"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Nächsten Pausen-Termin im Tray-Symbol anzeigen" msgstr "Nächsten Pausen-Termin im Tray-Symbol anzeigen"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Über" msgstr "Über"

View File

@ -389,6 +389,10 @@ msgstr "Show a tray icon in the notification area"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Show next break time in tray icon" msgstr "Show next break time in tray icon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr "Allow disabling Safe Eyes"
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "About" msgstr "About"

View File

@ -388,6 +388,10 @@ msgstr "Mostrar un icono de bandeja en el área de notificacion"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Acerca de" msgstr "Acerca de"

View File

@ -388,6 +388,10 @@ msgstr "Paneeliikooni näitamine teavitusalas"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Näita järgmise pausi aega paneeliikooni kõrval" msgstr "Näita järgmise pausi aega paneeliikooni kõrval"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Programmist" msgstr "Programmist"

View File

@ -388,6 +388,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -399,6 +399,10 @@ msgstr "Afficher une icône dans la zone de notification"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Afficher lheure de la prochaine pause dans licône de notification" msgstr "Afficher lheure de la prochaine pause dans licône de notification"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "À propos" msgstr "À propos"

View File

@ -386,6 +386,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -387,6 +387,10 @@ msgstr "Mutasd a tálca ikont az értesítési területen"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Mutasd a következő pihenőt a tálca ikonon" msgstr "Mutasd a következő pihenőt a tálca ikonon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Névjegy" msgstr "Névjegy"

View File

@ -386,6 +386,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -394,6 +394,10 @@ msgstr "Mostra l'icona nell'area di notifica"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Mostra la prossima pausa accanto all'icona" msgstr "Mostra la prossima pausa accanto all'icona"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Informazioni" msgstr "Informazioni"

View File

@ -394,6 +394,10 @@ msgstr "Rodyti dėklo piktogramą pranešimų srityje"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Rodyti dėklo piktogramoje kitos pertraukos laiką" msgstr "Rodyti dėklo piktogramoje kitos pertraukos laiką"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Apie" msgstr "Apie"

View File

@ -388,6 +388,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -8,8 +8,8 @@ msgstr ""
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2019-02-12 11:27+0000\n" "PO-Revision-Date: 2019-02-12 11:27+0000\n"
"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n" "Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/safe-"
"safe-eyes/translations/nb_NO/>\n" "eyes/translations/nb_NO/>\n"
"Language: nb\n" "Language: nb\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -388,6 +388,10 @@ msgstr "Vis systemkurvisikon i merknadsområde"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Vis neste pausetid i systemkurvisikon" msgstr "Vis neste pausetid i systemkurvisikon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Om" msgstr "Om"

View File

@ -394,6 +394,10 @@ msgstr "Pictogram tonen in systeemvak"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Volgende pauzetijd tonen op systeemvakpictogram" msgstr "Volgende pauzetijd tonen op systeemvakpictogram"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Over" msgstr "Over"

View File

@ -391,6 +391,10 @@ msgstr "Pokaż ikonę w obszarze powiadomień"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Pokaż następny czas przerwy w obszarze powiadomień" msgstr "Pokaż następny czas przerwy w obszarze powiadomień"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "O programie" msgstr "O programie"

View File

@ -393,6 +393,10 @@ msgstr "Mostrar um ícone de bandeja na área de notificação"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Mostrar a próxima hora de parada no ícone de bandeja" msgstr "Mostrar a próxima hora de parada no ícone de bandeja"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Sobre" msgstr "Sobre"

View File

@ -389,6 +389,10 @@ msgstr "Показывать иконку в трее в области увед
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Показывать время до следующего перерыва на иконке в трее" msgstr "Показывать время до следующего перерыва на иконке в трее"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "О программе" msgstr "О программе"

View File

@ -374,6 +374,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -389,6 +389,10 @@ msgstr "Zobraziť ikonu na paneli v oznamovacej oblasti"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Zobraziť čas nasledujúcej prestávku v ikone" msgstr "Zobraziť čas nasledujúcej prestávku v ikone"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "O programe" msgstr "O programe"

View File

@ -385,6 +385,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -391,6 +391,10 @@ msgstr "அறிவிப்பு பகுதியில் Safe Eyes சி
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "அடுத்த இடைவேளை நேரத்தை Safe Eyes சின்னத்திற்கு அருகில் காண்பிக்கவும்" msgstr "அடுத்த இடைவேளை நேரத்தை Safe Eyes சின்னத்திற்கு அருகில் காண்பிக்கவும்"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr "Safe Eyes ஐ செயல்நீக்க அனுமதிக்கவும்"
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Safe Eyes குறித்த தகவல்கள்" msgstr "Safe Eyes குறித்த தகவல்கள்"

View File

@ -392,6 +392,10 @@ msgstr "Bildirim alanında bir simge göster"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Sonraki mola zamanını tepsi simgesinde göster" msgstr "Sonraki mola zamanını tepsi simgesinde göster"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Hakkında" msgstr "Hakkında"

View File

@ -385,6 +385,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -394,6 +394,10 @@ msgstr "Показувати значок в панелі завдань в об
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Показувати час наступної перерви на значку" msgstr "Показувати час наступної перерви на значку"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Про програму" msgstr "Про програму"

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: uz@latin\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n" "X-Generator: Poedit 2.0.6\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"Language: uz@latin\n"
# Short break # Short break
msgid "Tightly close your eyes" msgid "Tightly close your eyes"
@ -385,6 +385,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -392,6 +392,10 @@ msgstr "Hiện biểu tượng ở khu vực thông báo"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "Hiện thời gian nghỉ tiếp theo ở biểu tượng khay" msgstr "Hiện thời gian nghỉ tiếp theo ở biểu tượng khay"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "Giới thiệu" msgstr "Giới thiệu"

View File

@ -388,6 +388,10 @@ msgstr "在通知区域显示一个托盘图标"
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "在托盘图标上显示下次休息的时间" msgstr "在托盘图标上显示下次休息的时间"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "关于" msgstr "关于"

View File

@ -386,6 +386,10 @@ msgstr ""
msgid "Show next break time in tray icon" msgid "Show next break time in tray icon"
msgstr "" msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon #: plugins/trayicon
msgid "About" msgid "About"
msgstr "" msgstr ""

View File

@ -63,17 +63,19 @@
{ {
"id": "audiblealert", "id": "audiblealert",
"enabled": true, "enabled": true,
"version": "0.0.2", "version": "0.0.3",
"settings": { "settings": {
"pre_break_alert": true "pre_break_alert": true,
"post_break_alert": true
} }
}, },
{ {
"id": "trayicon", "id": "trayicon",
"enabled": true, "enabled": true,
"version": "0.0.1", "version": "0.0.3",
"settings": { "settings": {
"show_time_in_tray": false, "show_time_in_tray": false,
"allow_disabling": true,
"disable_options": [{ "disable_options": [{
"time": 30, "time": 30,
"unit": "minute" "unit": "minute"
@ -96,9 +98,11 @@
{ {
"id": "smartpause", "id": "smartpause",
"enabled": true, "enabled": true,
"version": "0.0.1", "version": "0.0.3",
"settings": { "settings": {
"idle_time": 3 "idle_time": 5,
"interpret_idle_as_break": false,
"postpone_if_active": false
} }
}, },
{ {

View File

@ -16,7 +16,7 @@
"id": "idle_time", "id": "idle_time",
"label": "Minimum idle time to pause Safe Eyes (in seconds)", "label": "Minimum idle time to pause Safe Eyes (in seconds)",
"type": "INT", "type": "INT",
"default": 60, "default": 5,
"max": 3600, "max": 3600,
"min": 5 "min": 5
}, },

View File

@ -2,7 +2,7 @@
"meta": { "meta": {
"name": "Tray Icon", "name": "Tray Icon",
"description": "Show a tray icon in the notification area", "description": "Show a tray icon in the notification area",
"version": "0.0.1" "version": "0.0.3"
}, },
"dependencies": { "dependencies": {
"python_modules": [], "python_modules": [],
@ -18,6 +18,12 @@
"type": "BOOL", "type": "BOOL",
"default": false "default": false
}, },
{
"id": "allow_disabling",
"label": "Allow disabling Safe Eyes",
"type": "BOOL",
"default": true
},
{ {
"id": "disable_options", "id": "disable_options",
"label": "Disable options", "label": "Disable options",

View File

@ -56,6 +56,7 @@ class TrayIcon(object):
self.wakeup_time = None self.wakeup_time = None
self.idle_condition = threading.Condition() self.idle_condition = threading.Condition()
self.lock = threading.Lock() self.lock = threading.Lock()
self.allow_disabling = plugin_config['allow_disabling']
# Construct the tray icon # Construct the tray icon
self.indicator = appindicator.Indicator.new( self.indicator = appindicator.Indicator.new(
@ -151,6 +152,11 @@ class TrayIcon(object):
self.menu.append(self.item_quit) self.menu.append(self.item_quit)
self.menu.show_all() self.menu.show_all()
self.item_enable.set_visible(self.allow_disabling)
self.item_disable.set_visible(self.allow_disabling)
self.item_quit.set_visible(self.allow_disabling)
self.item_quit.set_visible(self.allow_disabling)
self.indicator.set_menu(self.menu) self.indicator.set_menu(self.menu)
def initialize(self, plugin_config): def initialize(self, plugin_config):
@ -159,6 +165,11 @@ class TrayIcon(object):
""" """
self.plugin_config = plugin_config self.plugin_config = plugin_config
self.set_labels() self.set_labels()
self.allow_disabling = plugin_config['allow_disabling']
self.item_enable.set_visible(self.allow_disabling)
self.item_disable.set_visible(self.allow_disabling)
self.item_quit.set_visible(self.allow_disabling)
self.item_quit.set_visible(self.allow_disabling)
def set_labels(self): def set_labels(self):
""" """

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
for filename in safeeyes/config/locale/*/LC_MESSAGES/safeeyes.po; do for filename in safeeyes/config/locale/*/LC_MESSAGES/safeeyes.po; do
echo "$filename" echo "$filename"
msgmerge -U "$filename" safeeyes/config/locale/safeeyes.pot msgmerge -U -N "$filename" safeeyes/config/locale/safeeyes.pot
if [ -f "$filename~" ] ; then if [ -f "$filename~" ] ; then
rm "$filename~" rm "$filename~"
fi fi