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"
msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr ""

View File

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

View File

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

View File

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

View File

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

View File

@ -389,6 +389,10 @@ msgstr "Symbol im Tray anzeigen"
msgid "Show next break time in tray icon"
msgstr "Nächsten Pausen-Termin im Tray-Symbol anzeigen"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
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"
msgstr "Show next break time in tray icon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr "Allow disabling Safe Eyes"
#: plugins/trayicon
msgid "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"
msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "Acerca de"

View File

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

View File

@ -388,6 +388,10 @@ msgstr ""
msgid "Show next break time in tray icon"
msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
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"
msgstr "Afficher lheure de la prochaine pause dans licône de notification"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "À propos"

View File

@ -386,6 +386,10 @@ msgstr ""
msgid "Show next break time in tray icon"
msgstr ""
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
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"
msgstr "Mutasd a következő pihenőt a tálca ikonon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "Névjegy"

View File

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

View File

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

View File

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

View File

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

View File

@ -8,8 +8,8 @@ msgstr ""
"POT-Creation-Date: \n"
"PO-Revision-Date: 2019-02-12 11:27+0000\n"
"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/"
"safe-eyes/translations/nb_NO/>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/safe-"
"eyes/translations/nb_NO/>\n"
"Language: nb\n"
"MIME-Version: 1.0\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"
msgstr "Vis neste pausetid i systemkurvisikon"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "Om"

View File

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

View File

@ -391,6 +391,10 @@ msgstr "Pokaż ikonę w obszarze powiadomień"
msgid "Show next break time in tray icon"
msgstr "Pokaż następny czas przerwy w obszarze powiadomień"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
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"
msgstr "Mostrar a próxima hora de parada no ícone de bandeja"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "Sobre"

View File

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

View File

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

View File

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

View File

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

View File

@ -391,6 +391,10 @@ msgstr "அறிவிப்பு பகுதியில் Safe Eyes சி
msgid "Show next break time in tray icon"
msgstr "அடுத்த இடைவேளை நேரத்தை Safe Eyes சின்னத்திற்கு அருகில் காண்பிக்கவும்"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr "Safe Eyes ஐ செயல்நீக்க அனுமதிக்கவும்"
#: plugins/trayicon
msgid "About"
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"
msgstr "Sonraki mola zamanını tepsi simgesinde göster"
#: plugins/trayicon
msgid "Allow disabling Safe Eyes"
msgstr ""
#: plugins/trayicon
msgid "About"
msgstr "Hakkında"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -63,17 +63,19 @@
{
"id": "audiblealert",
"enabled": true,
"version": "0.0.2",
"version": "0.0.3",
"settings": {
"pre_break_alert": true
"pre_break_alert": true,
"post_break_alert": true
}
},
{
"id": "trayicon",
"enabled": true,
"version": "0.0.1",
"version": "0.0.3",
"settings": {
"show_time_in_tray": false,
"allow_disabling": true,
"disable_options": [{
"time": 30,
"unit": "minute"
@ -96,9 +98,11 @@
{
"id": "smartpause",
"enabled": true,
"version": "0.0.1",
"version": "0.0.3",
"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",
"label": "Minimum idle time to pause Safe Eyes (in seconds)",
"type": "INT",
"default": 60,
"default": 5,
"max": 3600,
"min": 5
},

View File

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

View File

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

View File

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