From 6be44cc93f1c940992953d51dacef1b36e668c76 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 19 Feb 2018 01:38:41 +0100 Subject: [PATCH] Allow restart via plasmoid --- .../translations/syncthingconnector_de_DE.ts | 60 +++++++++---------- .../translations/syncthingconnector_en_US.ts | 60 +++++++++---------- plasmoid/package/contents/ui/main.qml | 8 +++ .../translations/syncthingplasmoid_de_DE.ts | 20 +++++-- .../translations/syncthingplasmoid_en_US.ts | 20 +++++-- 5 files changed, 98 insertions(+), 70 deletions(-) diff --git a/connector/translations/syncthingconnector_de_DE.ts b/connector/translations/syncthingconnector_de_DE.ts index db28f05..237ebb4 100644 --- a/connector/translations/syncthingconnector_de_DE.ts +++ b/connector/translations/syncthingconnector_de_DE.ts @@ -65,148 +65,148 @@ Fehler beim Anfordern Gerät zu Pausieren/Fortzusetzen - + Unable to request QR-Code: Fehler beim Abfragen des QR-Codes: - + Unable to parse Syncthing log: Fehler beim Auslesen des Syncthing-Logs: - + Unable to request Syncthing log: Fehler beim Abfragen des Syncthing-Logs: - + Unable to locate certificate used by Syncthing. Das SSL-Zertifikat von Syncthing kann nicht gefunden werden. - + Unable to load certificate used by Syncthing. Das SSL-Zertifikat von Syncthing kann nicht ausgelesen werden. - + Unable to parse Syncthing config: Fehler beim Auslesen der Syncthing-Konfiguration: - + Unable to request Syncthing config: Fehler beim Abfragen der Syncthing-Konfiguration: - + Unable to parse Syncthing status: Fehler beim Auslesen des Syncthing-Status: - + Unable to request Syncthing status: Fehler beim Abfragen des Syncthing-Status: - + Unable to parse connections: Fehler beim Auslesen der Verbindungen: - + Unable to request connections: Fehler beim Abfragen der Verbindungen: - + Unable to parse directory statistics: Fehler beim Auslesen der Verzeichnisstatistiken: - - + + Unable to request directory statistics: Fehler beim Abfragen der Verzeichnisstatistiken: - + Unable to parse device statistics: Fehler beim Auslesen der Gerätestatistiken: - + Unable to request device statistics: Fehler beim Abfragen der Gerätestatistiken: - + Unable to parse errors: Fehler beim Auslesen der Syncthing-Fehlermeldungen: - + Unable to request errors: Fehler beim Abfragen der Syncthing-Fehlermeldungen: - + Unable to request clearing errors: Fehler beim Löschen der Fehlermeldungen: - + Unable to parse Syncthing events: Fehler beim Auslesen der Syncthing-Ereignisse: - + Unable to request Syncthing events: Fehler beim Abfragen der Syncthing-Ereignisse: - + Unable to request rescan: Fehler beim Anfordern eines Verzeichnis-Rescans: - + Unable to request device pause/resume: Fehler beim Anfordern Gerät zu Pausieren/Fortzusetzen: - + Unable to request directory pause/resume: Fehler beim Anfordern Verzeichnis zu Pausieren/Fortzusetzen: - + Unable to request restart: Fehler beim Anfordern eines Neustarts: - + Unable to request shutdown: Fehler beim Anfordern Syncthing zu beenden: - + Unable to parse status for directory %1: Fehler beim Auslesen des Status von Verzeichnis %1: - + Unable to parse completion for device/directory %1/%2: Fehler beim Auslesen des Fortschrittes von Verzeichnis %1/%2: - + Unable to request completion for device/directory %1/%2: Fehler beim Anfordern des Fortschrittes von Verzeichnis %1/%2: - + at offset %1 bei Zeichen %1 diff --git a/connector/translations/syncthingconnector_en_US.ts b/connector/translations/syncthingconnector_en_US.ts index 0fcf367..97c300f 100644 --- a/connector/translations/syncthingconnector_en_US.ts +++ b/connector/translations/syncthingconnector_en_US.ts @@ -65,148 +65,148 @@ - + Unable to request QR-Code: - + Unable to parse Syncthing log: - + Unable to request Syncthing log: - + Unable to locate certificate used by Syncthing. - + Unable to load certificate used by Syncthing. - + Unable to parse Syncthing config: - + Unable to request Syncthing config: - + Unable to parse Syncthing status: - + Unable to request Syncthing status: - + Unable to parse connections: - + Unable to request connections: - + Unable to parse directory statistics: - - + + Unable to request directory statistics: - + Unable to parse device statistics: - + Unable to request device statistics: - + Unable to parse errors: - + Unable to request errors: - + Unable to request clearing errors: - + Unable to parse Syncthing events: - + Unable to request Syncthing events: - + Unable to request rescan: - + Unable to request device pause/resume: - + Unable to request directory pause/resume: - + Unable to request restart: - + Unable to request shutdown: - + Unable to parse status for directory %1: - + Unable to parse completion for device/directory %1/%2: - + Unable to request completion for device/directory %1/%2: - + at offset %1 diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 45c99c5..cd66c5c 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -36,6 +36,10 @@ Item { plasmoid.nativeInterface.connection.rescanAllDirs() } + function action_restartSyncthing() { + plasmoid.nativeInterface.connection.restart() + } + function action_showLog() { plasmoid.nativeInterface.showLog() } @@ -55,6 +59,10 @@ Item { plasmoid.setAction("showLog", qsTr("Log"), "text-x-generic") plasmoid.setAction("showErrors", qsTr("Internal errors"), "emblem-important") + plasmoid.setAction("rescanAllDirs", qsTr("Rescan all directories"), + "folder-sync") + plasmoid.setAction("restartSyncthing", qsTr("Restart Syncthing"), + "system-reboot") plasmoid.setAction("showAboutDialog", qsTr("About"), "help-about") } } diff --git a/plasmoid/translations/syncthingplasmoid_de_DE.ts b/plasmoid/translations/syncthingplasmoid_de_DE.ts index 37fcc0a..b2588d1 100644 --- a/plasmoid/translations/syncthingplasmoid_de_DE.ts +++ b/plasmoid/translations/syncthingplasmoid_de_DE.ts @@ -225,27 +225,37 @@ main - + Web UI Weboberfläche - + Settings Einstellungen - + Log Log - + Internal errors Interne Fehler - + + Rescan all directories + Alle Verzeichnisse neu scannen + + + + Restart Syncthing + Syncthing neustarten + + + About Über Syncthing Plasmoid diff --git a/plasmoid/translations/syncthingplasmoid_en_US.ts b/plasmoid/translations/syncthingplasmoid_en_US.ts index 9d5f611..d6d87d8 100644 --- a/plasmoid/translations/syncthingplasmoid_en_US.ts +++ b/plasmoid/translations/syncthingplasmoid_en_US.ts @@ -225,27 +225,37 @@ main - + Web UI - + Settings - + Log - + Internal errors - + + Rescan all directories + + + + + Restart Syncthing + + + + About