Added calling script when an alarm is raised.
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 9 Sep 2013 11:58:41 +0000 (11:58 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 9 Sep 2013 11:58:41 +0000 (11:58 +0000)
25 files changed:
NEWS
po/Makefile.in
po/de.po
po/es.po
po/fr.po
po/hu.po
po/it.po
po/lv.po
po/psensor.pot
po/pt_BR.po
po/ru.po
po/sl.po
po/sr.po
po/tr.po
po/uk.po
po/zh_CN.po
src/Makefile.am
src/Makefile.in
src/cfg.c
src/cfg.h
src/glade/psensor-pref.glade
src/main.c
src/notify_cmd.c [new file with mode: 0644]
src/notify_cmd.h [new file with mode: 0644]
src/ui_pref.c

diff --git a/NEWS b/NEWS
index 5131cc4..aaa6002 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+* v0.8.0.4
+
+** Added calling script when an alarm is raised.
+
 * v0.8.0.3
 
 ** Switched to GtkColorChooserDialog instead of the
index 4281278..92bf0ff 100644 (file)
@@ -21,7 +21,7 @@ srcdir = .
 top_srcdir = ..
 
 
-prefix = /tmp
+prefix = /usr/local
 exec_prefix = ${prefix}
 datarootdir = ${prefix}/share
 datadir = ${datarootdir}
@@ -34,12 +34,12 @@ INSTALL_DATA = ${INSTALL} -m 644
 # We use $(mkdir_p).
 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/psensor/trunk/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /home/jporsini/work/wpitchoune/svnpub/psensor/trunk/install-sh does not start with $(SHELL), so we add it.
 # In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
 # versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/psensor/trunk/install-sh -d
-install_sh = $(SHELL) ${SHELL} /home/jporsini/work.local/wpitchoune/svnpub/psensor/trunk/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/psensor/trunk/install-sh -d
+install_sh = $(SHELL) ${SHELL} /home/jporsini/work/wpitchoune/svnpub/psensor/trunk/install-sh
 MKDIR_P = /bin/mkdir -p
 mkdir_p = /bin/mkdir -p
 
index a23e644..41753e9 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor 0.7.0.x\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-05-12 16:51+0000\n"
 "Last-Translator: Dennis Baudys <Unknown>\n"
 "Language-Team: German\n"
@@ -151,7 +151,11 @@ msgstr "Sensoren-Protokollierungsintervall"
 msgid "seconds(s)"
 msgstr "Sekunde(n)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Sensoren"
 
@@ -338,7 +342,7 @@ msgstr ""
 "Sensorprotokolldatei ist nicht geöffnet und kann deswegen nicht geschlossen "
 "werden."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -354,12 +358,12 @@ msgstr ""
 "weiterverbreiten.\n"
 "Sie wird OHNE JEGLICHE GEWÄHRLEISTUNG zur Verfügung gestellt.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Aufruf: %s [OPTION] …\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -367,11 +371,11 @@ msgstr ""
 "Psensor ist eine GTK+-Anwendung zur Überwachung von Hardware-Sensoren, "
 "inklusive Temperaturen und Lüftergeschwindigkeiten."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Optionen:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -379,7 +383,7 @@ msgstr ""
 "  -h, --help          Diese Hilfe anzeigen und beenden\n"
 "  -v, --version       Versionsinformationen anzeigen und beenden"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -387,7 +391,7 @@ msgstr ""
 "  -u, --url=URL       Die Adresse (URL) von psensor-server,\n"
 "                      Beispiel: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -395,41 +399,41 @@ msgstr ""
 "  --use-libatasmart   atasmart-Bibliothek zur Festplattenüberwachung\n"
 "                      anstelle des hddtemp-Dienstes nutzen"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 "  -n, --new-instance  Erzeugung einer neuen Psensor-Anwendung erzwingen"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 "  -d, --debug=STUFE   Fehlerdiagnosestufe festlegen, Ganzzahl zwischen 0 und "
 "3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Programmfehler melden an: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s-Website: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor wurde ohne Unterstützung für entfernte Sensoren kompiliert."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Fehlerdiagnosemodus wird aktiviert."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Rufen Sie »%s --help« auf, um weitere Informationen zu erhalten.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Es existiert bereits eine Psensor-Instanz."
 
index ca288ca..c369750 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-04-01 09:00+0000\n"
 "Last-Translator: Javier <buik8roadmaster@hotmail.com>\n"
 "Language-Team: Spanish <es@li.org>\n"
@@ -151,7 +151,11 @@ msgstr "Intervalo de registro de sensores"
 msgid "seconds(s)"
 msgstr "segundo(s)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Sensores"
 
@@ -336,7 +340,7 @@ msgstr "No se abrió el archivo de registro."
 msgid "Sensor log not open, cannot close."
 msgstr "¡No existe archivo que cerrar!"
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -352,12 +356,12 @@ msgstr ""
 "y apoyada por su autor.\n"
 "No existe NINGUNA GARANTÍA hasta donde la ley lo permita.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Uso: %s [OPTION]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -365,11 +369,11 @@ msgstr ""
 "Psensor es un programa GTK+ que muestra datos de temperatura y ventiladores "
 "a través de los sensores de su hardware."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Opciones"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -377,7 +381,7 @@ msgstr ""
 "  -h, --help         Muestra esta ayuda. \n"
 "  -v, --versión       Muestra información sobre la versión."
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -385,7 +389,7 @@ msgstr ""
 "  -u, --url=URL       La URL del servidor psensor,\n"
 "                      ejemplo: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -393,40 +397,40 @@ msgstr ""
 "  --usar-libatasmart   usar librería atasmart para leer el sensor del disco\n"
 "                        duro en lugar de hddtemp daemon"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr "  -n, --new-instance  Fuerza el inicio de otro Psensor paralelo"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 " -d, --debug=NIVEL   Establece el nivel de depuración con un valor entre 0 y "
 "3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Comunicar fallos: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s Página Oficial: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor no ha sido compilado con soporte para sensores remotos."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Activa el modo de depuración"
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Introducir `%s --ayuda' para obtener más información\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Ya existe un Psensor en ejecución."
 
index b6764a3..3b50dc5 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-04-20 19:57+0000\n"
 "Last-Translator: Jean-Philippe Orsini <Unknown>\n"
 "Language-Team: French <>\n"
@@ -151,7 +151,11 @@ msgstr "Intervalle de journallisation des capteurs"
 msgid "seconds(s)"
 msgstr "seconde(s)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Capteurs"
 
@@ -335,7 +339,7 @@ msgstr "Le journal des capteurs n'est pas ouvert."
 msgid "Sensor log not open, cannot close."
 msgstr "Le journal des capteurs n'est pas ouvert, il ne peut être fermé."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -352,12 +356,12 @@ msgstr ""
 "Ce logiciel n'est accompagné d’ABSOLUMENT AUCUNE GARANTIE, dans les limites\n"
 "autorisées par la loi.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Utilisation: %s [OPTION]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -365,11 +369,11 @@ msgstr ""
 "Psensor est une application GTK+ pour surveiller les capteurs thermiques et "
 "les vitesses de ventilateurs."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Options:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -377,14 +381,14 @@ msgstr ""
 "  -h, --help          afficher cette aide et quitter\n"
 "  -v, --version       afficher les informations de version et quitter"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 "  -u, --url=URL       l'URL de psensor-server, example: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -392,43 +396,43 @@ msgstr ""
 "  --use-libatasmart   utiliser la librairie atasmart pour la surveillance\n"
 "                      des disks a la place du serveur hddtemp"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 "  -n, --new-instance  forcer la création d'une nouvelle occurrence de "
 "l'application Psensor"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 "  -d, --debug=LEVEL   assigner le niveau de débogage, nombre entier entre 0 "
 "et 3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Signaler les bogues à: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s page d’accueil: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 "Psensor n'a pas été compilé avec le support de surveillance à distance."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Active le mode de débogage."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Essayez « %s --help » pour plus d'informations.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Une instance de Psensor existe déjà."
 
index 55ae36a..5c3e425 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-10-29 09:41+0000\n"
 "Last-Translator: Bence Lukács <Unknown>\n"
 "Language-Team: Hungarian <gnome-hu-list-request@gnome.org>\n"
@@ -152,7 +152,11 @@ msgstr "Naplózás időköze"
 msgid "seconds(s)"
 msgstr "másodperc(ek)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Érzékelők"
 
@@ -335,7 +339,7 @@ msgstr "Az érzékelő naplófájlja nincs nyitva."
 msgid "Sensor log not open, cannot close."
 msgstr "Az érzékelő naplófájlja nincs nyitva, nem lehet bezárni."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -350,12 +354,12 @@ msgstr ""
 "Ez egy szabad szoftver: szabadon terjesztheti és/vagy módosíthatja\n"
 "NINCS GARANCIA, a jogszabályok által megengedett mértékben.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Használat: %s [KAPCSOLÓK]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -363,11 +367,11 @@ msgstr ""
 "A Psensor egy GTK+ alkalmazás a hardver érzékelőinek figyelésére, beleértve "
 "a hőmérsékleteket és a ventilátor sebességét."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Kapcsolók:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -375,7 +379,7 @@ msgstr ""
 "  -h, --help          ezen súgó megjelenítése, majd kilépés\n"
 "  -v, --version         verzióinformációk megjelenítése, majd kilépés"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -383,7 +387,7 @@ msgstr ""
 "  -u, --url=URL       a psensor-server URL-címe,\n"
 "                      például: http://gepnev:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -392,39 +396,39 @@ msgstr ""
 "figyelésére a\n"
 "                      hddtemp démon helyett"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr "  -n, --new-instance  új Psensor alkalmazás indításának kényszerítése"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 "  -d, --debug=LEVEL   hibakeresési szint beállítása, egész 0 és 3 között"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "A talált hibákat itt jelentse be: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s honlap: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "A Psensor távoli érzékelők támogatása nélkül lett lefordítva."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Hibakeresési mód engedélyezése."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "További információkért adja ki a „%s --help” parancsot.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "A Psensors egy példánya már létezik."
 
index 058d035..1f18ff9 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor 0.7.0.x\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-04-14 16:06+0000\n"
 "Last-Translator: Diego Pierotto <Unknown>\n"
 "Language-Team: Italian\n"
@@ -151,7 +151,11 @@ msgstr "Intervallo registrazione sensori"
 msgid "seconds(s)"
 msgstr "secondo(i)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Sensori"
 
@@ -337,7 +341,7 @@ msgstr "File di registazione sensori non aperto."
 msgid "Sensor log not open, cannot close."
 msgstr "Registro sensori non aperto, impossibile chiuderlo."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -352,12 +356,12 @@ msgstr ""
 "Questo è software libero: sei libero di modificarlo e ridistribuirlo.\n"
 "NON esiste GARANZIA, per gli scopi permessi dalla legge.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Uso: %s [OPZIONE]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -365,11 +369,11 @@ msgstr ""
 "Psensor è un'applicazione GTK+ per monitorare i sensori dell'hardware, "
 "incluse temperature e velocità delle ventole."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Opzioni:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -377,7 +381,7 @@ msgstr ""
 "  -h, --help mostra questo help ed esce\n"
 "  -v, --version mostra le informazioni sulla versione ed esce"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -385,7 +389,7 @@ msgstr ""
 "  -u, --url=URL URL del server psensor,\n"
 "                      esempio: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -394,40 +398,40 @@ msgstr ""
 "dell'hard disk invece del \n"
 "                      servizio hddtemp"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 "  -n, --new-instance forza la creazione di una nuova applicazione Psensor"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 "  -d, --debug=LEVEL imposta il livello di debug, un intero compreso tra 0 e 3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Segnalare i bug a: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s home page: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor è stato compilato senza il supporto per sensori remoti."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Abilita la modalità debug."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Usare '%s --help' per maggiori informazioni.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Esiste già un'istanza di Psensor"
 
index 68cce52..9ce36a8 100644 (file)
--- a/po/lv.po
+++ b/po/lv.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-05-01 09:48+0000\n"
 "Last-Translator: tuxmaniack <Unknown>\n"
 "Language-Team: Latvian <lv@li.org>\n"
@@ -151,7 +151,11 @@ msgstr "Sensoru žurnalēšanas intervāls"
 msgid "seconds(s)"
 msgstr "sekunde(s)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Sensori"
 
@@ -334,7 +338,7 @@ msgstr "Sensora žurnāla fails nav atvērts."
 msgid "Sensor log not open, cannot close."
 msgstr "Sensora žurnāls nav atvērts, nevar aizvērt."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,12 +348,12 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr ""
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -357,11 +361,11 @@ msgstr ""
 "Psensor ir GTK+ lietotne aparatūras sensoru pārraudzībai, ieskaitot "
 "temperatūras un ventilatoru ātrumus."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Opcijas:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -369,7 +373,7 @@ msgstr ""
 "  -h, --help          rādīt šo palīdzību un iziet\n"
 "  -v, --version       rādīt versijas informāciju un iziet"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -377,7 +381,7 @@ msgstr ""
 "  -u, --url=SAITE       psensor-server adrese,\n"
 "                      piemērs: http://saimniekdatoravārds:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -385,38 +389,38 @@ msgstr ""
 "  --use-libatasmart   izmantot atasmart bibliotēku disku pārraudzībai\n"
 "                      hddtemp dēmona vietā"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr "  -n, --new-instance  piespiest izveidot jaunu Psensor lietotni"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr "  -d, --debug=LĪMENIS   iestatīt atkļūdošanas līmeni, starp 0 un 3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Ziņojiet kļūdas uz: %s.\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s mājas lapa: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor nav kompilēts ar attālināto sensoru atbalstu."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Aktivizēt atkļūdošanas režīmu."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Mēģiniet `%s --help', lai iegūtu vairāk informācijas.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Psensor instance jau eksistē."
 
index 749b708..e3714da 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -150,7 +150,11 @@ msgstr ""
 msgid "seconds(s)"
 msgstr ""
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr ""
 
@@ -333,7 +337,7 @@ msgstr ""
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -343,71 +347,71 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr ""
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr ""
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr ""
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
 msgstr ""
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr ""
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr ""
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr ""
 
index adda5dc..9f26997 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor 0.7.0.x\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-03-12 16:07+0000\n"
 "Last-Translator: MestreLion <launchpad@rodrigosilva.com>\n"
 "Language-Team: Brazilian Portuguese\n"
@@ -151,7 +151,11 @@ msgstr "Intervalo de registro dos sensores"
 msgid "seconds(s)"
 msgstr "segundo(s)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Sensores"
 
@@ -334,7 +338,7 @@ msgstr "Arquivo de registros do sensor não foi aberto."
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -349,12 +353,12 @@ msgstr ""
 "Este é um software livre: você é livre para modificar e  redistribuir.\n"
 "Não há NENHUMA GARANTIA, na medida do permitido por lei.\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Uso: %s [OPÇÃO]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -362,11 +366,11 @@ msgstr ""
 "Psensor é um aplicativo GTK+ para monitoramento de sensores de hardware, "
 "incluindo temperatura e velocidade de ventoinhas."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Opções:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -374,7 +378,7 @@ msgstr ""
 "  -h, --help          exibir esta ajuda e sair\n"
 "  -v, --version       exibir informação de versão e sair"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -382,44 +386,44 @@ msgstr ""
 "  -u, --url=URL       a URL  do psensor-server,\n"
 "                      exemplo: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
 msgstr ""
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Relatar falhas para: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Página inicial de %s: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Ativar o modo de depuração"
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Utilize `%s --help' para mais informações.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Uma instancia de Psensor já existe."
 
index 53497cd..2e645ff 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor 0.7.0.x\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-12-25 06:05+0000\n"
 "Last-Translator: Ilya Volchanetskiy <Unknown>\n"
 "Language-Team: Russian\n"
@@ -151,7 +151,11 @@ msgstr "Интервал ведения журнала событий датчи
 msgid "seconds(s)"
 msgstr "секунд(с)"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Датчики"
 
@@ -334,7 +338,7 @@ msgstr "Файл журнала датчика не открыт."
 msgid "Sensor log not open, cannot close."
 msgstr "Файл журнала датчика не открыт, не удалось закрыть."
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,12 +348,12 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Использование: %s [КЛЮЧ]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
@@ -357,11 +361,11 @@ msgstr ""
 "Psensor — это GTK+ приложение для мониторинга аппаратных датчиков, включая "
 "температуру и скорость вентилятора."
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Опции:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -369,14 +373,14 @@ msgstr ""
 "  -h, --help          показать эту справку и выйти\n"
 "  -v, --version      показать версию и выйти"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 "  -u, --url=URL       URL psensor-сервера, пример: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -384,39 +388,39 @@ msgstr ""
 "  --use-libatasmart   использовать библиотеку atasmart для мониторинга "
 "дисков вместо демона hddtemp"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 "  -n, --new-instance  принудительно запускает новую копию программы Psensor"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr "  -d, --debug=УРОВЕНЬ   установить уровень отладки, целое между 0 и 3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Сообщайте об ошибках на: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s домашняя страница: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor не был собран с поддержкой удалённых датчиков."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Включает режим отладки."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Попробуйте `%s --help' для дополнительной информации.↵\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "Копия Psensor уже запущена."
 
index cb8aa05..4223e64 100644 (file)
--- a/po/sl.po
+++ b/po/sl.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-04-14 21:02+0000\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Slovenian <sl@li.org>\n"
@@ -151,7 +151,11 @@ msgstr ""
 msgid "seconds(s)"
 msgstr ""
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr ""
 
@@ -334,7 +338,7 @@ msgstr ""
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,71 +348,71 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr ""
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr ""
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr ""
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
 msgstr ""
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr ""
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr ""
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr ""
 
index 5dcd745..445550d 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-05-03 02:31+0000\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <sr@li.org>\n"
@@ -151,7 +151,11 @@ msgstr ""
 msgid "seconds(s)"
 msgstr ""
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Сензор"
 
@@ -334,7 +338,7 @@ msgstr ""
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,71 +348,71 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Употреба: %s [ОПЦИЈА]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr ""
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Опције:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
 msgstr ""
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Пријавите грешку на: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s матична страна: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr ""
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Покушајте„%s --help“ за више информација.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr ""
 
index 8cec491..4ca28cd 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-04-28 11:24+0000\n"
 "Last-Translator: zeugma <Unknown>\n"
 "Language-Team: Turkish <tr@li.org>\n"
@@ -151,7 +151,11 @@ msgstr ""
 msgid "seconds(s)"
 msgstr ""
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Algılayıcı"
 
@@ -334,7 +338,7 @@ msgstr ""
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,71 +348,71 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Kullanım: %s [SEÇENEK]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr ""
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr ""
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
 msgstr ""
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
 msgstr ""
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr ""
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr ""
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Hataları rapor et:%s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s ana sayfa: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr ""
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr ""
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Daha fazla bilgi için `%s --help' yazın.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr ""
 
index af4f40f..7667102 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2012-10-13 16:24+0000\n"
 "Last-Translator: Ilya Volchanetskiy <Unknown>\n"
 "Language-Team: Ukrainian <uk@li.org>\n"
@@ -151,7 +151,11 @@ msgstr ""
 msgid "seconds(s)"
 msgstr ""
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "Датчики"
 
@@ -334,7 +338,7 @@ msgstr ""
 msgid "Sensor log not open, cannot close."
 msgstr ""
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -344,22 +348,22 @@ msgid ""
 "There is NO WARRANTY, to the extent permitted by law.\n"
 msgstr ""
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "Використання: %s [КЛЮЧ]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr ""
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "Опції:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -367,14 +371,14 @@ msgstr ""
 "  -h, --help          показати цю довідку і вийти\n"
 "  -v, --version       показати версію і вийти"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
 msgstr ""
 "  -u, --url=URL       URL psensor-сервера, наприклад: http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -382,38 +386,38 @@ msgstr ""
 "  --use-libatasmart   використовувати бібліотеку atasmart для моніторингу\n"
 "дисків замість демона hddtemp"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr "  -n, --new-instance  примусово створювати нову копію програми Psensor"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr "  -d, --debug=РІВЕНЬ   встановити рівень налагодження, ціле між 0 та 3"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "Звітуйте про помилки до: %s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s домашня сторінка: <%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor не був зібраний з підтримкою віддалених датчиків."
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "Включає режим налагодження."
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Спробуйте `%s --help' щоб отримати більше інформації.\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr ""
 
index e968b9f..463969a 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: psensor\n"
 "Report-Msgid-Bugs-To: jeanfi@gmail.com\n"
-"POT-Creation-Date: 2013-05-30 09:07+0200\n"
+"POT-Creation-Date: 2013-09-09 13:55+0200\n"
 "PO-Revision-Date: 2013-01-15 12:24+0000\n"
 "Last-Translator: Wang Dianjin <Unknown>\n"
 "Language-Team: Chinese (simplified)\n"
@@ -151,7 +151,11 @@ msgstr "监测器记录间隔"
 msgid "seconds(s)"
 msgstr "秒"
 
-#: src/glade/psensor-pref.glade:720
+#: src/glade/psensor-pref.glade:718
+msgid "Script executed when an alarm is raised"
+msgstr ""
+
+#: src/glade/psensor-pref.glade:751
 msgid "Sensors"
 msgstr "传感器"
 
@@ -334,7 +338,7 @@ msgstr "监测器日志文件未打开。"
 msgid "Sensor log not open, cannot close."
 msgstr "监测器日志未打开,故无法关闭。"
 
-#: src/main.c:76
+#: src/main.c:77
 #, c-format
 msgid ""
 "Copyright (C) %s jeanfi@gmail.com\n"
@@ -349,22 +353,22 @@ msgstr ""
 "该软件为自由软件:您可以自由修改并分发。\n"
 "There is NO WARRANTY, to the extent permitted by law。\n"
 
-#: src/main.c:87 src/server/server.c:93
+#: src/main.c:88 src/server/server.c:93
 #, c-format
 msgid "Usage: %s [OPTION]...\n"
 msgstr "用法:%s [选项]...\n"
 
-#: src/main.c:89
+#: src/main.c:90
 msgid ""
 "Psensor is a GTK+ application for monitoring hardware sensors, including "
 "temperatures and fan speeds."
 msgstr "Psensor 是一款 GTK+ 应用程序,可监测硬件传感器,包括温度与风扇转速。"
 
-#: src/main.c:93
+#: src/main.c:94
 msgid "Options:"
 msgstr "选项:"
 
-#: src/main.c:94
+#: src/main.c:95
 msgid ""
 "  -h, --help          display this help and exit\n"
 "  -v, --version       display version information and exit"
@@ -372,7 +376,7 @@ msgstr ""
 "  -h, --help 显示这个帮助并退出\n"
 "  -v, --version 显示版本信息并退出"
 
-#: src/main.c:100
+#: src/main.c:101
 msgid ""
 "  -u, --url=URL       the URL of the psensor-server,\n"
 "                      example: http://hostname:3131"
@@ -380,7 +384,7 @@ msgstr ""
 "  -u, --url=URL       psensor 服务器 URL\n"
 "                      例如:http://hostname:3131"
 
-#: src/main.c:103
+#: src/main.c:104
 msgid ""
 "  --use-libatasmart   use atasmart library for disk monitoring instead of\n"
 "                      hddtemp daemon"
@@ -388,38 +392,38 @@ msgstr ""
 "  --use-libatasmart   使用 atasmart 库来监测硬盘,而不是\n"
 "                      hddtemp 进程"
 
-#: src/main.c:106
+#: src/main.c:107
 msgid "  -n, --new-instance  force the creation of a new Psensor application"
 msgstr "  -n, --new-instance  强制创建一个新的 Psensor 例程"
 
-#: src/main.c:109
+#: src/main.c:110
 msgid "  -d, --debug=LEVEL   set the debug level, integer between 0 and 3"
 msgstr "  -d,--debug=LEVEL 设置调试等级,等级为 0 到 3 之间的整数"
 
-#: src/main.c:114 src/server/server.c:116
+#: src/main.c:115 src/server/server.c:116
 #, c-format
 msgid "Report bugs to: %s\n"
 msgstr "报告问题至:%s\n"
 
-#: src/main.c:116 src/server/server.c:118
+#: src/main.c:117 src/server/server.c:118
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s 主页:<%s>\n"
 
-#: src/main.c:451
+#: src/main.c:454
 msgid "Psensor has not been compiled with remote sensor support."
 msgstr "Psensor 不支持远程传感器。"
 
-#: src/main.c:514
+#: src/main.c:517
 msgid "Enables debug mode."
 msgstr "启用调试模式。"
 
-#: src/main.c:526 src/server/server.c:379
+#: src/main.c:529 src/server/server.c:379
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "试用‘%s --help’来获得更多信息。\n"
 
-#: src/main.c:539
+#: src/main.c:542
 msgid "A Psensor instance already exists."
 msgstr "已存在一个 Psensor 例程。"
 
index e54717e..f484916 100644 (file)
@@ -39,6 +39,7 @@ endif
 
 psensor_SOURCES = \
        cfg.h cfg.c \
+       notify_cmd.c notify_cmd.h \
        graph.h graph.c \
        main.c \
        ui.h ui.c \
index 3ce1622..99cce36 100644 (file)
@@ -89,19 +89,20 @@ CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
        "$(DESTDIR)$(schemadir)"
 PROGRAMS = $(bin_PROGRAMS)
-am__psensor_SOURCES_DIST = cfg.h cfg.c graph.h graph.c main.c ui.h \
-       ui.c ui_appindicator.h ui_color.h ui_color.c ui_graph.h \
-       ui_graph.c ui_pref.h ui_pref.c ui_sensorlist.h ui_sensorlist.c \
-       ui_sensorpref.h ui_sensorpref.c ui_status.h ui_status.c \
-       ui_notify.h ui_notify.c ui_appindicator.c ui_unity.h \
-       ui_unity.c rsensor.h rsensor.c
+am__psensor_SOURCES_DIST = cfg.h cfg.c notify_cmd.c notify_cmd.h \
+       graph.h graph.c main.c ui.h ui.c ui_appindicator.h ui_color.h \
+       ui_color.c ui_graph.h ui_graph.c ui_pref.h ui_pref.c \
+       ui_sensorlist.h ui_sensorlist.c ui_sensorpref.h \
+       ui_sensorpref.c ui_status.h ui_status.c ui_notify.h \
+       ui_notify.c ui_appindicator.c ui_unity.h ui_unity.c rsensor.h \
+       rsensor.c
 @LIBNOTIFY_TRUE@am__objects_1 = ui_notify.$(OBJEXT)
 @APPINDICATOR_TRUE@am__objects_2 = ui_appindicator.$(OBJEXT)
 @UNITY_TRUE@am__objects_3 = ui_unity.$(OBJEXT)
 @CURL_TRUE@@JSON_TRUE@am__objects_4 = rsensor.$(OBJEXT)
-am_psensor_OBJECTS = cfg.$(OBJEXT) graph.$(OBJEXT) main.$(OBJEXT) \
-       ui.$(OBJEXT) ui_color.$(OBJEXT) ui_graph.$(OBJEXT) \
-       ui_pref.$(OBJEXT) ui_sensorlist.$(OBJEXT) \
+am_psensor_OBJECTS = cfg.$(OBJEXT) notify_cmd.$(OBJEXT) \
+       graph.$(OBJEXT) main.$(OBJEXT) ui.$(OBJEXT) ui_color.$(OBJEXT) \
+       ui_graph.$(OBJEXT) ui_pref.$(OBJEXT) ui_sensorlist.$(OBJEXT) \
        ui_sensorpref.$(OBJEXT) ui_status.$(OBJEXT) $(am__objects_1) \
        $(am__objects_2) $(am__objects_3) $(am__objects_4)
 psensor_OBJECTS = $(am_psensor_OBJECTS)
@@ -361,12 +362,12 @@ AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror \
        $(am__append_10) $(am__append_12) $(am__append_14) \
        $(am__append_17) $(am__append_21)
 @GCONF_TRUE@@GTK_TRUE@@X11_TRUE@@XEXT_TRUE@dist_man_MANS = psensor.1
-psensor_SOURCES = cfg.h cfg.c graph.h graph.c main.c ui.h ui.c \
-       ui_appindicator.h ui_color.h ui_color.c ui_graph.h ui_graph.c \
-       ui_pref.h ui_pref.c ui_sensorlist.h ui_sensorlist.c \
-       ui_sensorpref.h ui_sensorpref.c ui_status.h ui_status.c \
-       $(am__append_4) $(am__append_7) $(am__append_16) \
-       $(am__append_19)
+psensor_SOURCES = cfg.h cfg.c notify_cmd.c notify_cmd.h graph.h \
+       graph.c main.c ui.h ui.c ui_appindicator.h ui_color.h \
+       ui_color.c ui_graph.h ui_graph.c ui_pref.h ui_pref.c \
+       ui_sensorlist.h ui_sensorlist.c ui_sensorpref.h \
+       ui_sensorpref.c ui_status.h ui_status.c $(am__append_4) \
+       $(am__append_7) $(am__append_16) $(am__append_19)
 EXTRA_DIST = description.txt psensor.schemas
 @GCONF_TRUE@schemadir = $(GCONF_SCHEMA_FILE_DIR)
 @GCONF_TRUE@schema_DATA = psensor.schemas
@@ -457,6 +458,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify_cmd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsensor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_appindicator.Po@am__quote@
index 0e7ab2b..41aa09a 100644 (file)
--- a/src/cfg.c
+++ b/src/cfg.c
@@ -94,6 +94,8 @@ static const char *KEY_INTERFACE_TEMPERATURE_UNIT
 static const char *KEY_SLOG_ENABLED = "/apps/psensor/slog/enabled";
 static const char *KEY_SLOG_INTERVAL = "/apps/psensor/slog/interval";
 
+static const char *KEY_NOTIFICATION_SCRIPT = "/apps/psensor/notif_script";
+
 static GConfClient *client;
 
 static char *get_string(const char *key, const char *default_value)
@@ -110,6 +112,29 @@ static char *get_string(const char *key, const char *default_value)
        return value;
 }
 
+char *config_get_notif_script()
+{
+       char *str;
+
+       str =  gconf_client_get_string(client, KEY_NOTIFICATION_SCRIPT, NULL);
+       if (str && !strlen(str)) {
+               free(str);
+               str = NULL;
+       }
+
+       return str;
+}
+
+void config_set_notif_script(const char *str)
+{
+       if (str && strlen(str) > 0)
+               gconf_client_set_string(client,
+                                       KEY_NOTIFICATION_SCRIPT, str, NULL);
+       else
+               gconf_client_set_string(client,
+                                       KEY_NOTIFICATION_SCRIPT, "", NULL);
+}
+
 static struct color *get_background_color()
 {
        char *scolor;
index ed77976..b8fccd1 100644 (file)
--- a/src/cfg.h
+++ b/src/cfg.h
@@ -116,4 +116,7 @@ int config_get_slog_interval();
 
 int config_get_sensor_position(const char *);
 void config_set_sensor_position(const char *, int);
+
+char *config_get_notif_script();
+void config_set_notif_script(const char *);
 #endif
index 7d96568..4a784be 100644 (file)
             <child>
               <object class="GtkButton" id="button1">
                 <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
             <child>
               <object class="GtkButton" id="button2">
                 <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
                 <child>
                   <object class="GtkCheckButton" id="hide_window_decoration">
                     <property name="label" translatable="yes">Hide window decoration</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 <child>
                   <object class="GtkCheckButton" id="keep_window_below">
                     <property name="label" translatable="yes">Keep window below</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 <child>
                   <object class="GtkCheckButton" id="enable_menu">
                     <property name="label" translatable="yes">Enable menu</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 <child>
                   <object class="GtkCheckButton" id="enable_launcher_counter">
                     <property name="label" translatable="yes">Enable Unity Launcher counter</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 <child>
                   <object class="GtkCheckButton" id="hide_on_startup">
                     <property name="label" translatable="yes">Hide window on startup</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 <child>
                   <object class="GtkCheckButton" id="restore_window">
                     <property name="label" translatable="yes">Restore window position and size</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxText" id="sensors_list_position">
+                  <object class="GtkComboBox" id="sensors_list_position">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="entry_text_column">0</property>
-                    <property name="id_column">1</property>
-                    <items>
-                      <item translatable="yes">Right</item>
-                      <item translatable="yes">Left</item>
-                      <item translatable="yes">Top</item>
-                      <item translatable="yes">Bottom</item>
-                    </items>
+                    <property name="model">position_list_store</property>
+                    <property name="active">0</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">3</property>
-                    <property name="x_padding">4</property>
-                    <property name="y_padding">4</property>
                   </packing>
                 </child>
               </object>
                 <property name="row_homogeneous">True</property>
                 <child>
                   <object class="GtkColorButton" id="color_fg">
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="margin_right">4</property>
                     <property name="margin_top">4</property>
                     <property name="margin_bottom">4</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="color">#000000000000</property>
                   </object>
                   <packing>
                 </child>
                 <child>
                   <object class="GtkColorButton" id="color_bg">
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="margin_right">4</property>
                     <property name="margin_top">4</property>
                     <property name="margin_bottom">4</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="color">#000000000000</property>
                   </object>
                   <packing>
                 <child>
                   <object class="GtkCheckButton" id="enable_slog">
                     <property name="label" translatable="yes">Enable sensors logging</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="margin_right">4</property>
                     <property name="margin_top">4</property>
                     <property name="margin_bottom">4</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="xalign">0</property>
                     <property name="yalign">0.49000000953674316</property>
                     <property name="draw_indicator">True</property>
                     <property name="height">1</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkLabel" id="notif_script_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">4</property>
+                    <property name="margin_right">4</property>
+                    <property name="margin_top">4</property>
+                    <property name="margin_bottom">4</property>
+                    <property name="label" translatable="yes">Script executed when an alarm is raised</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="notif_script">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="activates_default">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="position">2</property>
     <property name="step_increment">0.01</property>
     <property name="page_increment">0.10000000000000001</property>
   </object>
-  <object class="GtkAdjustment" id="secs">
+  <object class="GtkListStore" id="position_list_store">
+    <columns>
+      <!-- column-name gchararray1 -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" context="psensor">Right</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Left</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Top</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bottom</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkAdjustment" id="secs2">
     <property name="lower">1</property>
     <property name="upper">256</property>
-    <property name="value">1</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkAdjustment" id="secs2">
+  <object class="GtkAdjustment" id="secs">
     <property name="lower">1</property>
     <property name="upper">256</property>
+    <property name="value">1</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
index 0aafa15..ede84e6 100644 (file)
@@ -37,6 +37,7 @@
 #include "ui_sensorlist.h"
 #include "ui_color.h"
 #include "lmsensor.h"
+#include "notify_cmd.h"
 #include "slog.h"
 #include "ui_pref.h"
 #include "ui_graph.h"
@@ -241,6 +242,8 @@ static void cb_alarm_raised(struct psensor *sensor, void *data)
        if (sensor->alarm_enabled)
                ui_notify(sensor, (struct ui_psensor *)data);
 #endif
+
+       notify_cmd(sensor);
 }
 
 static void associate_colors(struct psensor **sensors)
diff --git a/src/notify_cmd.c b/src/notify_cmd.c
new file mode 100644 (file)
index 0000000..dd42e92
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "notify_cmd.h"
+#include "cfg.h"
+
+void notify_cmd(struct psensor *s)
+{
+       char *script;
+       char *v;
+       char *cmd;
+       int ret;
+
+       script = config_get_notif_script();
+
+       if (script) {
+               v = psensor_current_value_to_str(s, 1);
+
+               cmd = malloc(strlen(script)+1+1+strlen(s->id)+1+strlen(v)+1);
+               sprintf(cmd, "%s \"%s\" %s", script, s->id, v);
+
+               log_debug("execute cmd: %s", cmd);
+
+               ret = system(cmd);
+
+               log_debug("cmd returns: %d", ret);
+
+               free(cmd);
+               free(v);
+               free(script);
+       }
+}
+
diff --git a/src/notify_cmd.h b/src/notify_cmd.h
new file mode 100644 (file)
index 0000000..8f60bcf
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#ifndef _PSENSOR_NOTIFY_CMD_H_
+#define _PSENSOR_NOTIFY_CMD_H_
+
+#include "psensor.h"
+
+void notify_cmd(struct psensor *);
+
+#endif
index 051c340..b66748e 100644 (file)
@@ -53,6 +53,8 @@ void ui_pref_dialog_run(struct ui_psensor *ui)
                *w_enable_menu, *w_enable_launcher_counter, *w_hide_on_startup,
                *w_win_restore, *w_slog_enabled;
        GtkComboBoxText *w_temp_unit;
+       GtkEntry *w_notif_script;
+       char *notif_script;
 
        cfg = ui->config;
 
@@ -71,6 +73,14 @@ void ui_pref_dialog_run(struct ui_psensor *ui)
 
        diag = GTK_DIALOG(gtk_builder_get_object(builder, "dialog1"));
 
+       w_notif_script = GTK_ENTRY(gtk_builder_get_object(builder,
+                                                         "notif_script"));
+       notif_script = config_get_notif_script();
+       if (notif_script) {
+               gtk_entry_set_text(GTK_ENTRY(w_notif_script), notif_script);
+               free(notif_script);
+       }
+
        color_fg = color_to_gdkcolor(cfg->graph_fgcolor);
        w_color_fg = GTK_COLOR_BUTTON(gtk_builder_get_object(builder,
                                                             "color_fg"));
@@ -158,6 +168,9 @@ void ui_pref_dialog_run(struct ui_psensor *ui)
 
                pthread_mutex_lock(&ui->sensors_mutex);
 
+               config_set_notif_script
+                       (gtk_entry_get_text(GTK_ENTRY(w_notif_script)));
+
                gtk_color_button_get_color(w_color_fg, &color);
                color_set(cfg->graph_fgcolor,
                          color.red, color.green, color.blue);