diff --git a/.gitignore b/.gitignore index 358929b..1da1bb2 100644 --- a/.gitignore +++ b/.gitignore @@ -40,5 +40,5 @@ autoreconf.* debian/files debian/debhelper-build-stamp debian/.debhelper/ -debian/piagnostics/ -piagnostics +debian/agnostics/ +agnostics diff --git a/README b/README index e55e3e2..ca4fe54 100644 --- a/README +++ b/README @@ -1,3 +1,42 @@ This is an application to run tests on Raspberry Pi hardware. -To build, run ./autogen.sh, then ./configure and make. + +How to build +------------ + +1. Install dependencies + +The dependencies of any Debian project are listed in the "Build-Depends" section +of the file named "control" in the "debian" subdirectory of the project. + +If the project has already been released into apt, then the build dependencies +can be automatically installed using the command "sudo apt build-dep ". + +2. Prepare project + +To create the "configure" file and prepare the project directory, use the command +"./autogen.sh" in the top directory of the project. + +If this file is not present, then instead use the command "autoreconf -i -f" +followed by the command "intltoolize -c --automake --force", both in the top directory +of the project. + +3. Configure + +To configure the make system, use the command "./configure" in the top directory of +the project. This will by default set the project for installation in the /usr/local tree, +which will not overwrite a version which has been installed from apt. + +If you wish to overwrite a preinstalled version in the /usr tree, supply the arguments +"./configure --prefix=/usr --libdir=/usr/lib/" to the configure command. +On a 32-bit system, should be "arm-linux-gnueabihf". +On a 64-bit system, should be "aarch64-linux-gnu". + +4. Build + +To build the application, use the command "make" in the top directory of the project. + +5. Install + +To install the application and all required data files, use the command "sudo make install" +in the top directory of the project. diff --git a/data/agnostics.desktop.in b/data/agnostics.desktop.in index 5629789..cff7b04 100644 --- a/data/agnostics.desktop.in +++ b/data/agnostics.desktop.in @@ -5,6 +5,5 @@ _GenericName=Raspberry Pi Diagnostics _Comment=Test the Raspberry Pi hardware Icon=rpi Exec=agnostics -NotShowIn=GNOME;XFCE; StartupNotify=true Categories=Utility; diff --git a/data/agnostics.ui b/data/agnostics.ui index f2411bc..6d209e6 100644 --- a/data/agnostics.ui +++ b/data/agnostics.ui @@ -1,66 +1,93 @@ - + - + pixbox - False + False + False True - center-on-parent - True - True + center-on-parent + 340 + True + dialog + True + True False - - - True - False - 10 - 10 - 10 - 10 + False + 20 + 20 + 20 + 20 vertical - 5 + 20 - + + 300 True - False - Running tests... - True - 30 + False + label + True False - False - 5 + True 0 - + True - False + False False - False - 5 + True 1 - - Cancel + True - True - True + False + 20 + + + _Cancel + 100 + True + True + True + True + + + True + False + 0 + + + + + _OK + 100 + True + True + True + True + + + True + False + 1 + + False - False - 5 + True 2 @@ -68,31 +95,28 @@ - False + False Raspberry Pi Diagnostics - rpi - - - + rpi True - False - 5 - 5 - 5 - 5 + False + 5 + 5 + 5 + 5 vertical 5 True - True - in + True + in True - True + True @@ -108,16 +132,16 @@ True - False + False 3 - start + start _Close True - True - True - True + True + True + True True @@ -129,9 +153,9 @@ Show _Log True - True - True - True + True + True + True True @@ -144,9 +168,9 @@ Re_set True - True - True - True + True + True + True True @@ -159,9 +183,9 @@ _Run Tests True - True - True - True + True + True + True True @@ -174,7 +198,7 @@ False True - end + end 1 diff --git a/debian/changelog b/debian/changelog index 60f1a6f..5eb244b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,51 @@ +agnostics (0.10) bullseye; urgency=medium + + * Fix size of modal dialog + + -- Simon Long Tue, 15 Mar 2022 10:09:31 +0000 + +agnostics (0.9) buster; urgency=medium + + * Added Italian translation + + -- Simon Long Thu, 15 Apr 2021 16:01:46 +0100 + +agnostics (0.8) buster; urgency=medium + + * Remove hiding of app in other desktops + + -- Simon Long Thu, 01 Apr 2021 20:35:04 +0100 + +agnostics (0.7) buster; urgency=medium + + * Added Armenian translation + + -- Simon Long Wed, 24 Feb 2021 15:36:05 +0000 + +agnostics (0.6) buster; urgency=medium + + * Added Slovak translation + + -- Simon Long Sun, 13 Dec 2020 12:16:59 +0000 + +agnostics (0.5) buster; urgency=medium + + * Use system text file association to open log file + + -- Simon Long Fri, 18 Sep 2020 11:27:04 +0100 + +agnostics (0.4) buster; urgency=medium + + * Wait for specified PID while test is running + + -- Simon Long Sun, 03 May 2020 18:42:14 +0100 + +agnostics (0.3) buster; urgency=medium + + * Restrict memory usage in SD card test + + -- Simon Long Fri, 24 Apr 2020 10:38:54 +0100 + agnostics (0.2) buster; urgency=medium * Correct version of GTK in dependencies diff --git a/debian/compat b/debian/compat index ec63514..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/debian/control b/debian/control index 0a69142..ca31735 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: agnostics Section: admin Priority: optional Maintainer: Simon Long -Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev, libgtk-3-dev, +Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev, libgtk-3-dev (>= 3.24), libx11-dev, intltool Standards-Version: 3.9.6 Homepage: https://github.com/raspberrypi-ui/agnostics @@ -11,6 +11,6 @@ Vcs-Browser: https://github.com/raspberrypi-ui/agnostics Package: agnostics Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, mousepad, fio +Depends: ${shlibs:Depends}, ${misc:Depends}, libgtk-3-0 (>= 3.24), mousepad, fio Description: Raspberry Pi Diagnostics Extensible diagnostics package to test Raspberry Pi hardware diff --git a/po/en_GB.po b/po/en_GB.po index 540c42e..cbfe5fb 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: agnostics 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-18 14:40+0000\n" +"POT-Creation-Date: 2020-05-05 14:16+0100\n" "PO-Revision-Date: 2019-02-18 15:13+0000\n" "Last-Translator: Simon Long \n" "Language-Team: English (British)\n" @@ -17,7 +17,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../src/agnostics.c:151 +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 #, c-format msgid "" "%s\n" @@ -26,45 +27,49 @@ msgstr "" "%s\n" "%s" -#: ../src/agnostics.c:154 +#: ../src/agnostics.c:203 msgid "Not Run" msgstr "Not Run" -#: ../src/agnostics.c:198 +#: ../src/agnostics.c:266 msgid "Aborted" msgstr "Aborted" -#: ../src/agnostics.c:202 +#: ../src/agnostics.c:271 msgid "FAIL" msgstr "FAIL" -#: ../src/agnostics.c:207 +#: ../src/agnostics.c:276 msgid "PASS" msgstr "PASS" -#: ../src/agnostics.c:231 +#: ../src/agnostics.c:305 #, c-format msgid "Cancelling..." msgstr "Cancelling..." -#: ../src/agnostics.c:233 +#: ../src/agnostics.c:307 #, c-format msgid "Running %s..." msgstr "Running %s..." -#: ../src/agnostics.c:298 +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "tests" + +#: ../src/agnostics.c:350 msgid "Not run" msgstr "Not run" -#: ../src/agnostics.c:384 +#: ../src/agnostics.c:458 msgid "Test" msgstr "Test" -#: ../src/agnostics.c:387 +#: ../src/agnostics.c:463 msgid "Run Test?" msgstr "Run Test?" -#: ../src/agnostics.c:392 +#: ../src/agnostics.c:470 msgid "Result" msgstr "Result" diff --git a/po/hy.po b/po/hy.po new file mode 100644 index 0000000..becd56f --- /dev/null +++ b/po/hy.po @@ -0,0 +1,106 @@ +# Armenian translations for agnostics package. +# Copyright (C) 2020 Raspberry Pi Ltd +# This file is distributed under the same license as the agnostics package. +# Simon Long , 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: agnostics 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-05 14:16+0100\n" +"PO-Revision-Date: 2019-02-18 15:13+0000\n" +"Last-Translator: Armath \n" +"Language-Team: Armenian\n" +"Language: hy\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 +#, c-format +msgid "" +"%s\n" +"%s" +msgstr "" +"%s\n" +"%s" + +#: ../src/agnostics.c:203 +msgid "Not Run" +msgstr "Գործարկված չէ" + +#: ../src/agnostics.c:266 +msgid "Aborted" +msgstr "Ընդհավտած է" + +#: ../src/agnostics.c:271 +msgid "FAIL" +msgstr "Ձախողված" + +#: ../src/agnostics.c:276 +msgid "PASS" +msgstr "Հաջողված" + +#: ../src/agnostics.c:305 +#, c-format +msgid "Cancelling..." +msgstr "Չեղարկում..." + +#: ../src/agnostics.c:307 +#, c-format +msgid "Running %s..." +msgstr "%s -ի գործարկում..." + +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "թեստավորում" + +#: ../src/agnostics.c:350 +msgid "Not run" +msgstr "Չի գործարկվում" + +#: ../src/agnostics.c:458 +msgid "Test" +msgstr "Թեստ" + +#: ../src/agnostics.c:463 +msgid "Run Test?" +msgstr "Գործարկե՞լ թեստը" + +#: ../src/agnostics.c:470 +msgid "Result" +msgstr "Արդյունք" + +#: ../data/agnostics.ui.h:1 +msgid "Running tests..." +msgstr "Թեստի գործարկում..." + +#: ../data/agnostics.ui.h:2 +msgid "Cancel" +msgstr "Չեղարկել" + +#: ../data/agnostics.ui.h:3 ../data/agnostics.desktop.in.h:1 +msgid "Raspberry Pi Diagnostics" +msgstr "Raspberry Pi ախտորոշում" + +#: ../data/agnostics.ui.h:4 +msgid "_Close" +msgstr "Փակել" + +#: ../data/agnostics.ui.h:5 +msgid "Show _Log" +msgstr "Ցուցադրել տեղեկամատյաննը" + +#: ../data/agnostics.ui.h:6 +msgid "Re_set" +msgstr "Զրոյացնել կարգավորումները" + +#: ../data/agnostics.ui.h:7 +msgid "_Run Tests" +msgstr "Գործարկել թեստը" + +#: ../data/agnostics.desktop.in.h:2 +msgid "Test the Raspberry Pi hardware" +msgstr "Ստուգել Raspberry Pi ապարատը" diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..2e2cd38 --- /dev/null +++ b/po/it.po @@ -0,0 +1,126 @@ +# Italian translations for agnostics package. +# Copyright (C) 2020 Raspberry Pi Ltd +# This file is distributed under the same license as the agnostics package. +# Emanuele Goldoni , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-24 16:51+0100\n" +"PO-Revision-Date: 2021-04-05 18:30+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" +"Last-Translator: Emanuele Goldoni \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: it\n" + +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 +#, c-format +msgid "" +"%s\n" +"%s" +msgstr "" +"%s\n" +"%s" + +#: ../src/agnostics.c:203 +msgid "Not Run" +msgstr "Non eseguito" + +#: ../src/agnostics.c:266 +msgid "Aborted" +msgstr "Interrotto" + +#: ../src/agnostics.c:271 +msgid "FAIL" +msgstr "FALLITO" + +#: ../src/agnostics.c:276 +msgid "PASS" +msgstr "PASSATO" + +#: ../src/agnostics.c:305 +#, c-format +msgid "Cancelling..." +msgstr "Annullamento..." + +#: ../src/agnostics.c:307 +#, c-format +msgid "Running %s..." +msgstr "Esecuzione di %s..." + +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "test" + +#. setting transient in the UI file doesn't work - but then, logically, it can't... +#: ../src/agnostics.c:326 +msgid "Running tests..." +msgstr "Esecuzione dei test..." + +#: ../src/agnostics.c:351 +msgid "Not run" +msgstr "Non eseguito" + +#: ../src/agnostics.c:461 +msgid "Test" +msgstr "Test" + +#: ../src/agnostics.c:466 +msgid "Run Test?" +msgstr "Eseguire test?" + +#: ../src/agnostics.c:473 +msgid "Result" +msgstr "Risultato" + +#: ../data/sdtest.sh:2 +msgid "SD Card Speed Test" +msgstr "Test velocità scheda SD" + +#: ../data/sdtest.sh:3 +msgid "" +"Determines whether an SD card can read and write data fast enough to provide adequate performance.\n" +"\n" +"Should be run on a new or newly-formatted SD card." +msgstr "" +"Determina se una scheda SD può leggere e scrivere dati abbastanza velocemente da fornire prestazioni adeguate.\n" +"\n" +"Dovrebbe essere eseguito su una scheda SD nuova o appena formattata." + +#: ../data/agnostics.ui.h:2 +msgid "_Cancel" +msgstr "_Annulla" + +#: ../data/agnostics.ui.h:3 +msgid "_OK" +msgstr "_OK" + +#: ../data/agnostics.ui.h:4 ../data/agnostics.desktop.in.h:1 +msgid "Raspberry Pi Diagnostics" +msgstr "Diagnostica Raspberry Pi" + +#: ../data/agnostics.ui.h:5 +msgid "_Close" +msgstr "_Chiudi" + +#: ../data/agnostics.ui.h:6 +msgid "Show _Log" +msgstr "Mostra _registro" + +#: ../data/agnostics.ui.h:7 +msgid "Re_set" +msgstr "Re_setta" + +#: ../data/agnostics.ui.h:8 +msgid "_Run Tests" +msgstr "_Esegui i test" + +#: ../data/agnostics.desktop.in.h:2 +msgid "Test the Raspberry Pi hardware" +msgstr "Test dell'hardware di Raspberry Pi" diff --git a/po/lt.po b/po/lt.po new file mode 100644 index 0000000..1ebbb14 --- /dev/null +++ b/po/lt.po @@ -0,0 +1,126 @@ +# Lithuanian translations for agnostics package. +# Copyright (C) 2020 Raspberry Pi Ltd +# This file is distributed under the same license as the agnostics package. +# Paulius Narkevičius , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-02 14:51+0100\n" +"PO-Revision-Date: 2022-10-01 15:28+0300\n" +"Last-Translator: NP \n" +"Language-Team: \n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.1.1\n" + +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 +#, c-format +msgid "" +"%s\n" +"%s" +msgstr "" +"%s\n" +"%s" + +#: ../src/agnostics.c:203 +msgid "Not Run" +msgstr "Nevykdyti" + +#: ../src/agnostics.c:266 +msgid "Aborted" +msgstr "Nutraukta" + +#: ../src/agnostics.c:271 +msgid "FAIL" +msgstr "NEPAVYKO" + +#: ../src/agnostics.c:276 +msgid "PASS" +msgstr "PAVYKO" + +#: ../src/agnostics.c:305 +#, c-format +msgid "Cancelling..." +msgstr "Atšaukiama..." + +#: ../src/agnostics.c:307 +#, c-format +msgid "Running %s..." +msgstr "Vykdoma %s..." + +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "testai" + +#. setting transient in the UI file doesn't work - but then, logically, it can't... +#: ../src/agnostics.c:326 +msgid "Running tests..." +msgstr "Vykdomi testai..." + +#: ../src/agnostics.c:351 +msgid "Not run" +msgstr "Nevykdyti" + +#: ../src/agnostics.c:461 +msgid "Test" +msgstr "Test" + +#: ../src/agnostics.c:466 +msgid "Run Test?" +msgstr "Vykdyti testą?" + +#: ../src/agnostics.c:473 +msgid "Result" +msgstr "Rezultatas" + +#: ../data/sdtest.sh:2 +msgid "SD Card Speed Test" +msgstr "SD kortelės našumo testas" + +#: ../data/sdtest.sh:3 +msgid "" +"Determines whether an SD card can read and write data fast enough to provide adequate performance.\n" +"\n" +"Should be run on a new or newly-formatted SD card." +msgstr "" +"Nustatoma ar SD kortelė sugeba nuskaityti ir įrašyti duomenis išlaikant pakankamą greitį siekiu užtikrinti patenkinamus veiklos rezultatus.\n" +"\n" +"Turėtumei vykdyti panaudojant naują arba naujai išformatuotą SD kortelę." + +#: ../data/agnostics.ui.h:2 +msgid "_Cancel" +msgstr "_Atšaukti" + +#: ../data/agnostics.ui.h:3 +msgid "_OK" +msgstr "_Gerai" + +#: ../data/agnostics.ui.h:4 ../data/agnostics.desktop.in.h:1 +msgid "Raspberry Pi Diagnostics" +msgstr "Raspberry Pi diagnostika" + +#: ../data/agnostics.ui.h:5 +msgid "_Close" +msgstr "_Uždaryti" + +#: ../data/agnostics.ui.h:6 +msgid "Show _Log" +msgstr "Peržiūrėti _užregistruotus duomenis" + +#: ../data/agnostics.ui.h:7 +msgid "Re_set" +msgstr "Re_setas" + +#: ../data/agnostics.ui.h:8 +msgid "_Run Tests" +msgstr "_Vykdyti testus" + +#: ../data/agnostics.desktop.in.h:2 +msgid "Test the Raspberry Pi hardware" +msgstr "Testuoti Raspberry Pi aparatinę įrangą" diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 0000000..3abc63c --- /dev/null +++ b/po/pl.po @@ -0,0 +1,126 @@ +# Polish translations for agnostics package. +# Copyright (C) 2020 Raspberry Pi Ltd +# This file is distributed under the same license as the agnostics package. +# Paulius Narkevičius , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-02 14:51+0100\n" +"PO-Revision-Date: 2022-10-01 16:09+0300\n" +"Last-Translator: NP \n" +"Language-Team: \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.1.1\n" + +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 +#, c-format +msgid "" +"%s\n" +"%s" +msgstr "" +"%s\n" +"%s" + +#: ../src/agnostics.c:203 +msgid "Not Run" +msgstr "Nie wykonaj" + +#: ../src/agnostics.c:266 +msgid "Aborted" +msgstr "Przerwane" + +#: ../src/agnostics.c:271 +msgid "FAIL" +msgstr "Nie powiódło się" + +#: ../src/agnostics.c:276 +msgid "PASS" +msgstr "Powiódło się" + +#: ../src/agnostics.c:305 +#, c-format +msgid "Cancelling..." +msgstr "Anulujem..." + +#: ../src/agnostics.c:307 +#, c-format +msgid "Running %s..." +msgstr "Wykonajem %s..." + +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "test" + +#. setting transient in the UI file doesn't work - but then, logically, it can't... +#: ../src/agnostics.c:326 +msgid "Running tests..." +msgstr "Wykonajem test..." + +#: ../src/agnostics.c:351 +msgid "Not run" +msgstr "Nie wykonaj" + +#: ../src/agnostics.c:461 +msgid "Test" +msgstr "Test" + +#: ../src/agnostics.c:466 +msgid "Run Test?" +msgstr "Wykonaj test?" + +#: ../src/agnostics.c:473 +msgid "Result" +msgstr "Resultat" + +#: ../data/sdtest.sh:2 +msgid "SD Card Speed Test" +msgstr "Test prędkości SD karty" + +#: ../data/sdtest.sh:3 +msgid "" +"Determines whether an SD card can read and write data fast enough to provide adequate performance.\n" +"\n" +"Should be run on a new or newly-formatted SD card." +msgstr "" +"Ustaw, czy karta jest w stanie czytać i pisać z odpowiednią prędkością i zapewnia odpowiednią wydajność.\n" +"\n" +"Powinny wykonat przy użyciu nowej lub nowo sformatowanej karty." + +#: ../data/agnostics.ui.h:2 +msgid "_Cancel" +msgstr "_Anuluj" + +#: ../data/agnostics.ui.h:3 +msgid "_OK" +msgstr "_Dobra" + +#: ../data/agnostics.ui.h:4 ../data/agnostics.desktop.in.h:1 +msgid "Raspberry Pi Diagnostics" +msgstr "Diagnostyka Raspberry Pi" + +#: ../data/agnostics.ui.h:5 +msgid "_Close" +msgstr "_Zamknij" + +#: ../data/agnostics.ui.h:6 +msgid "Show _Log" +msgstr "Pokaż _zarejestrowane dane" + +#: ../data/agnostics.ui.h:7 +msgid "Re_set" +msgstr "Re_setuj" + +#: ../data/agnostics.ui.h:8 +msgid "_Run Tests" +msgstr "_Wykonaj test" + +#: ../data/agnostics.desktop.in.h:2 +msgid "Test the Raspberry Pi hardware" +msgstr "Testuj Raspberry Pi komputerow" diff --git a/po/sk.po b/po/sk.po new file mode 100644 index 0000000..d61a8a6 --- /dev/null +++ b/po/sk.po @@ -0,0 +1,107 @@ +# Slovak translations for agnostics package. +# Copyright (C) 2020 Raspberry Pi Ltd +# This file is distributed under the same license as the agnostics package. +# Jose Riha , 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: agnostics 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-05 14:16+0100\n" +"PO-Revision-Date: 2020-12-12 17:16+0100\n" +"Last-Translator: Jose Riha \n" +"Language-Team: Slovak\n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.4.1\n" + +#. create marked-up display text and add to list store +#: ../src/agnostics.c:200 +#, c-format +msgid "" +"%s\n" +"%s" +msgstr "" +"%s\n" +"%s" + +#: ../src/agnostics.c:203 +msgid "Not Run" +msgstr "Nebol spustený" + +#: ../src/agnostics.c:266 +msgid "Aborted" +msgstr "Zrušený" + +#: ../src/agnostics.c:271 +msgid "FAIL" +msgstr "CHYBA" + +#: ../src/agnostics.c:276 +msgid "PASS" +msgstr "ÚSPECH" + +#: ../src/agnostics.c:305 +#, c-format +msgid "Cancelling..." +msgstr "Ruším..." + +#: ../src/agnostics.c:307 +#, c-format +msgid "Running %s..." +msgstr "Spúšťam %s..." + +#: ../src/agnostics.c:307 +msgid "tests" +msgstr "testy" + +#: ../src/agnostics.c:350 +msgid "Not run" +msgstr "Nebol spustený" + +#: ../src/agnostics.c:458 +msgid "Test" +msgstr "Test" + +#: ../src/agnostics.c:463 +msgid "Run Test?" +msgstr "Spustiť test?" + +#: ../src/agnostics.c:470 +msgid "Result" +msgstr "Výsledok" + +#: ../data/agnostics.ui.h:1 +msgid "Running tests..." +msgstr "Spúšťam testy..." + +#: ../data/agnostics.ui.h:2 +msgid "Cancel" +msgstr "Zrušiť" + +#: ../data/agnostics.ui.h:3 ../data/agnostics.desktop.in.h:1 +msgid "Raspberry Pi Diagnostics" +msgstr "Diagnostika Raspberry Pi" + +#: ../data/agnostics.ui.h:4 +msgid "_Close" +msgstr "_Zavrieť" + +#: ../data/agnostics.ui.h:5 +msgid "Show _Log" +msgstr "Zobraziť zázna_m" + +#: ../data/agnostics.ui.h:6 +msgid "Re_set" +msgstr "O_bnoviť" + +#: ../data/agnostics.ui.h:7 +msgid "_Run Tests" +msgstr "_Spustiť testy" + +#: ../data/agnostics.desktop.in.h:2 +msgid "Test the Raspberry Pi hardware" +msgstr "Otestujte hardvér Raspberry Pi" diff --git a/src/Makefile.am b/src/Makefile.am index 320d6e4..dce06cd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,8 @@ agnostics_CFLAGS = \ -DPACKAGE_BIN_DIR=\""$(bindir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ $(PACKAGE_CFLAGS) \ - $(G_CAST_CHECKS) + $(G_CAST_CHECKS) \ + -Wall agnostics_SOURCES = agnostics.c diff --git a/src/agnostics.c b/src/agnostics.c index 4fa3d11..d0890ae 100644 --- a/src/agnostics.c +++ b/src/agnostics.c @@ -57,7 +57,7 @@ GtkTreeModel *stests; /* Inter-thread globals */ gchar *test_name; -gboolean cancelled; +gboolean running, cancelled; int testpid; /* Path to log file */ @@ -68,7 +68,7 @@ gchar *logfile; static void log_init (void); static void log_message (const char *format, ...); -static int find_tests (void); +static void find_tests (void); static void parse_test_file (gchar *path); static gpointer test_thread (gpointer data); static int dialog_update (gpointer data); @@ -91,7 +91,7 @@ static void log_init (void) // get version number of agnostics package sprintf (buffer, "(unknown)"); - if (fp = popen ("apt-cache policy agnostics | grep Installed | cut -d : -f 2", "r")) + if ((fp = popen ("apt-cache policy agnostics | grep Installed | cut -d : -f 2", "r"))) { if (!fgets (buffer, sizeof (buffer) - 1, fp)) sprintf (buffer, "(unknown)"); pclose (fp); @@ -102,7 +102,7 @@ static void log_init (void) tstr = localtime (&now); // write header, overwriting existing file - if (fp = fopen (logfile, "w")) + if ((fp = fopen (logfile, "w"))) { fprintf (fp, "Raspberry Pi Diagnostics - version %s\n%s\n", g_strstrip (buffer), asctime (tstr)); fclose (fp); @@ -121,7 +121,7 @@ static void log_message (const char *format, ...) vsprintf (buffer, format, args); va_end (args); - if (fp = fopen (logfile, "a")) + if ((fp = fopen (logfile, "a"))) { fprintf (fp, "%s\n", buffer); fclose (fp); @@ -130,7 +130,7 @@ static void log_message (const char *format, ...) /* Find all test files in the data directory and add them to the tests list store */ -static int find_tests (void) +static void find_tests (void) { GDir *data_dir; const gchar *name; @@ -259,7 +259,7 @@ static gpointer test_thread (gpointer data) setpgid (testpid, testpid); // wait for child process to end - wait (&status); + waitpid (testpid, &status, 0); if (cancelled) { @@ -284,6 +284,7 @@ static gpointer test_thread (gpointer data) g_free (test_name); test_name = NULL; + running = FALSE; // restore stdout and stderr dup2 (stdo, STDOUT_FILENO); @@ -298,12 +299,12 @@ static int dialog_update (gpointer data) { gchar *buffer; - if (test_name) + if (running) { if (cancelled) buffer = g_strdup_printf (_("Cancelling...")); else - buffer = g_strdup_printf (_("Running %s..."), test_name); + buffer = g_strdup_printf (_("Running %s..."), test_name ? test_name : _("tests")); gtk_label_set_text (GTK_LABEL (msg_label), buffer); g_free (buffer); gtk_progress_bar_pulse (GTK_PROGRESS_BAR (msg_prog)); @@ -322,8 +323,9 @@ static int dialog_update (gpointer data) static void run_test (GtkWidget *wid, gpointer data) { // setting transient in the UI file doesn't work - but then, logically, it can't... + gtk_label_set_text (GTK_LABEL (msg_label), _("Running tests...")); gtk_window_set_transient_for (GTK_WINDOW (msg_wd), GTK_WINDOW (piag_wd)); - gtk_widget_show_all (GTK_WIDGET (msg_wd)); + gtk_widget_show (GTK_WIDGET (msg_wd)); // add a timer to update the dialog gdk_threads_add_timeout (1000, dialog_update, NULL); @@ -331,6 +333,7 @@ static void run_test (GtkWidget *wid, gpointer data) // launch a thread with the system call to run the tests cancelled = FALSE; test_name = NULL; + running = TRUE; g_thread_new (NULL, test_thread, NULL); } @@ -356,11 +359,11 @@ static void reset_test (GtkWidget *wid, gpointer data) static void show_log (GtkWidget *wid, gpointer data) { - char *buffer; - - buffer = g_strdup_printf ("mousepad %s &", logfile); - system (buffer); - g_free (buffer); + if (fork () == 0) + { + execl ("/usr/bin/xdg-open", "xdg-open", logfile, NULL); + exit (0); + } } /* Handler for click on tree view check box */ @@ -412,6 +415,7 @@ int main (int argc, char *argv[]) { GtkBuilder *builder; GtkCellRenderer *crt, *crb, *crr; + GtkWidget *wid; #ifdef ENABLE_NLS setlocale (LC_ALL, ""); @@ -432,8 +436,7 @@ int main (int argc, char *argv[]) logfile = g_build_filename (g_get_home_dir (), "rpdiags.txt", NULL); // load widgets from UI file - builder = gtk_builder_new (); - gtk_builder_add_from_file (builder, PACKAGE_UI_DIR "/agnostics.ui", NULL); + builder = gtk_builder_new_from_file (PACKAGE_UI_DIR "/agnostics.ui"); piag_wd = (GtkWidget *) gtk_builder_get_object (builder, "piag_wd"); piag_tv = (GtkWidget *) gtk_builder_get_object (builder, "piag_tv"); @@ -442,10 +445,12 @@ int main (int argc, char *argv[]) btn_reset = (GtkWidget *) gtk_builder_get_object (builder, "btn_reset"); btn_log = (GtkWidget *) gtk_builder_get_object (builder, "btn_log"); - msg_wd = (GtkWidget *) gtk_builder_get_object (builder, "msg_wd"); - msg_label = (GtkWidget *) gtk_builder_get_object (builder, "msg_label"); - msg_prog = (GtkWidget *) gtk_builder_get_object (builder, "msg_prog"); - msg_btn = (GtkWidget *) gtk_builder_get_object (builder, "msg_btn"); + msg_wd = (GtkWidget *) gtk_builder_get_object (builder, "modal"); + msg_label = (GtkWidget *) gtk_builder_get_object (builder, "modal_msg"); + msg_prog = (GtkWidget *) gtk_builder_get_object (builder, "modal_pb"); + msg_btn = (GtkWidget *) gtk_builder_get_object (builder, "modal_cancel"); + wid = (GtkWidget *) gtk_builder_get_object (builder, "modal_ok"); + gtk_widget_hide (wid); g_object_unref (builder); // set up tree view