From 49ff5a7b65d9ec52a0ee7f928c4aa0a7538965ca Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 23 Apr 2017 18:27:31 +0200 Subject: [PATCH] Move widgets from tray app to separate lib So settings pages, web view and other widgets can be used in other components such as the Dolphin plugin and Plasmoid, too. --- CMakeLists.txt | 16 +- .../syncthingfileitemaction_de_DE.ts | 48 +- .../syncthingfileitemaction_en_US.ts | 48 +- model/translations/syncthingmodel_en_US.ts | 26 +- tray/CMakeLists.txt | 20 +- tray/application/main.cpp | 3 +- tray/gui/dirview.cpp | 2 +- tray/gui/trayicon.cpp | 2 +- tray/gui/traymenu.cpp | 2 +- tray/gui/traywidget.cpp | 19 +- tray/gui/traywidget.h | 12 +- tray/gui/traywidget.ui | 7 +- tray/gui/webviewdefs.h | 30 - tray/resources/syncthingtrayicons.qrc | 8 - tray/translations/syncthingtray_de_DE.ts | 438 +++----- tray/translations/syncthingtray_en_US.ts | 656 +----------- widgets/CMakeLists.txt | 87 ++ widgets/global.h | 27 + {tray/gui => widgets/misc}/textviewdialog.cpp | 0 {tray/gui => widgets/misc}/textviewdialog.h | 4 +- .../hicolor/scalable/actions/edit-paste.svg | 0 .../hicolor/scalable/actions/list-add.svg | 0 .../hicolor/scalable/actions/list-remove.svg | 0 .../hicolor/scalable/actions/process-stop.svg | 0 .../hicolor/scalable/actions/view-refresh.svg | 0 .../scalable/apps/internet-web-browser.svg | 0 .../scalable/apps/preferences-other.svg | 0 .../hicolor/scalable/apps/system-run.svg | 0 widgets/resources/syncthingwidgetsicons.qrc | 12 + .../settings}/appearanceoptionpage.ui | 0 .../settings}/autostartoptionpage.ui | 0 .../settings}/connectionoptionpage.ui | 10 +- .../settings}/launcheroptionpage.ui | 6 +- .../settings}/notificationsoptionpage.ui | 0 .../settings}/settings.cpp | 7 +- .../settings}/settings.h | 32 +- .../settings}/settingsdialog.cpp | 11 +- .../gui => widgets/settings}/settingsdialog.h | 8 +- .../settings}/systemdoptionpage.ui | 0 .../settings}/webviewoptionpage.ui | 0 .../translations/syncthingwidgets_de_DE.ts | 937 ++++++++++++++++++ .../translations/syncthingwidgets_en_US.ts | 602 +++++++++++ {tray/gui => widgets/webview}/webpage.cpp | 32 +- {tray/gui => widgets/webview}/webpage.h | 18 +- widgets/webview/webviewdefs.h | 30 + .../gui => widgets/webview}/webviewdialog.cpp | 20 +- {tray/gui => widgets/webview}/webviewdialog.h | 14 +- .../gui => widgets/webview}/webviewincludes.h | 12 +- 48 files changed, 2039 insertions(+), 1167 deletions(-) delete mode 100644 tray/gui/webviewdefs.h create mode 100644 widgets/CMakeLists.txt create mode 100644 widgets/global.h rename {tray/gui => widgets/misc}/textviewdialog.cpp (100%) rename {tray/gui => widgets/misc}/textviewdialog.h (85%) rename {tray => widgets}/resources/icons/hicolor/scalable/actions/edit-paste.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/actions/list-add.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/actions/list-remove.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/actions/process-stop.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/actions/view-refresh.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/apps/internet-web-browser.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/apps/preferences-other.svg (100%) rename {tray => widgets}/resources/icons/hicolor/scalable/apps/system-run.svg (100%) create mode 100644 widgets/resources/syncthingwidgetsicons.qrc rename {tray/gui => widgets/settings}/appearanceoptionpage.ui (100%) rename {tray/gui => widgets/settings}/autostartoptionpage.ui (100%) rename {tray/gui => widgets/settings}/connectionoptionpage.ui (98%) rename {tray/gui => widgets/settings}/launcheroptionpage.ui (98%) rename {tray/gui => widgets/settings}/notificationsoptionpage.ui (100%) rename {tray/application => widgets/settings}/settings.cpp (98%) rename {tray/application => widgets/settings}/settings.h (77%) rename {tray/gui => widgets/settings}/settingsdialog.cpp (99%) rename {tray/gui => widgets/settings}/settingsdialog.h (94%) rename {tray/gui => widgets/settings}/systemdoptionpage.ui (100%) rename {tray/gui => widgets/settings}/webviewoptionpage.ui (100%) create mode 100644 widgets/translations/syncthingwidgets_de_DE.ts create mode 100644 widgets/translations/syncthingwidgets_en_US.ts rename {tray/gui => widgets/webview}/webpage.cpp (85%) rename {tray/gui => widgets/webview}/webpage.h (73%) create mode 100644 widgets/webview/webviewdefs.h rename {tray/gui => widgets/webview}/webviewdialog.cpp (85%) rename {tray/gui => widgets/webview}/webviewdialog.h (75%) rename {tray/gui => widgets/webview}/webviewincludes.h (56%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9907348..b6d5d34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,10 +15,11 @@ set(META_VERSION_EXACT_SONAME ON) project(${META_PROJECT_NAME}) # options for partial build -option(NO_CLI "specifies whether building CLI should be skipped" OFF) -option(NO_TRAY "specifies whether building the tray should be skipped" OFF) -option(NO_FILE_ITEM_ACTION_PLUGIN "specifies whether building the file item action plugin should be skipped" OFF) -option(NO_MODEL "specifies whether building models should be skipped, implies NO_TRAY" OFF) +option(NO_CLI "whether building CLI should be skipped" OFF) +option(NO_TRAY "whether building the tray should be skipped" OFF) +option(NO_FILE_ITEM_ACTION_PLUGIN "whether building the file item action plugin should be skipped" OFF) +option(NO_MODEL "whether building models should be skipped, implies NO_TRAY" OFF) +option(NO_WIDGETS "whether building widgets should be skipped, implies NO_TRAY" OFF) # add subdirectories enable_testing() @@ -31,8 +32,11 @@ endif() if(NOT NO_MODEL) add_subdirectory(model) link_directories(${LIB_SYNCTHING_MODEL_BINARY_DIR}) - if(NOT NO_TRAY) - add_subdirectory(tray) + if(NOT NO_WIDGETS) + add_subdirectory(widgets) + if(NOT NO_TRAY) + add_subdirectory(tray) + endif() endif() endif() if(NOT NO_FILE_ITEM_ACTION_PLUGIN) diff --git a/fileitemactionplugin/translations/syncthingfileitemaction_de_DE.ts b/fileitemactionplugin/translations/syncthingfileitemaction_de_DE.ts index bb10ea9..d564239 100644 --- a/fileitemactionplugin/translations/syncthingfileitemaction_de_DE.ts +++ b/fileitemactionplugin/translations/syncthingfileitemaction_de_DE.ts @@ -8,27 +8,27 @@ nicht mehr verfügbar - + Status: not available anymore Status: nicht mehr verfügbar - + Directory info for %1 Verzeichnisinfo für %1 - + Status: Status: - + Last scan time: Letzter Scan: - + Rescan interval: %1 seconds Scanintervall: %1 Sekunden @@ -36,65 +36,65 @@ SyncthingFileItemAction - + Rescan %1 (in %2) "%1" neu scannen (in "%2") - + Rescan selected items Auswahl neu scannen - + Rescan selected directories Ausgewählte Verzeichnisse neu scannen - + Resume selected directories Ausgewählte verzeichnisse fortsetzen - - + + Rescan %1 "%1" neu scannen - + Syncthing connection error - - + + Resume %1 "%1" fortsetzen - - + + Pause %1 "%1" pausieren - + Pause selected directories Ausgewählte Verzeichnisse pausieren - + Rescan containing directories Beinhaltendes Verzeichnis neu scannen - + Resume containing directories Beinhaltendes Verzeichnis fortsetzen - + Pause containing directories Beinhaltendes Verzeichnis pausieren @@ -111,8 +111,8 @@ Scanintervall: %1 Sekunden - - + + About Über @@ -120,12 +120,12 @@ SyncthingMenuAction - + Syncthing - + Syncthing - connecting Syncthing - verbinde diff --git a/fileitemactionplugin/translations/syncthingfileitemaction_en_US.ts b/fileitemactionplugin/translations/syncthingfileitemaction_en_US.ts index 119192a..08d28e3 100644 --- a/fileitemactionplugin/translations/syncthingfileitemaction_en_US.ts +++ b/fileitemactionplugin/translations/syncthingfileitemaction_en_US.ts @@ -4,27 +4,27 @@ SyncthingDirActions - + Status: not available anymore - + Directory info for %1 - + Status: - + Last scan time: - + Rescan interval: %1 seconds @@ -32,71 +32,71 @@ SyncthingFileItemAction - + Rescan %1 (in %2) - + Rescan selected items - + Rescan selected directories - + Resume selected directories - - + + Rescan %1 - + Syncthing connection error - - + + Resume %1 - - + + Pause %1 - + Pause selected directories - + Rescan containing directories - + Resume containing directories - + Pause containing directories - - + + About @@ -104,12 +104,12 @@ SyncthingMenuAction - + Syncthing - + Syncthing - connecting diff --git a/model/translations/syncthingmodel_en_US.ts b/model/translations/syncthingmodel_en_US.ts index 3bf3785..51a73fb 100644 --- a/model/translations/syncthingmodel_en_US.ts +++ b/model/translations/syncthingmodel_en_US.ts @@ -178,8 +178,8 @@ %1 item(s) out of sync - %1 item out of sync - %1 items out of sync + + @@ -194,12 +194,17 @@ - Click for details + Failed items - Failed items + Click for details + + + + + Paused @@ -208,13 +213,13 @@ - - Idle + + Unshared - - Unshared + + Idle @@ -237,11 +242,6 @@ Synchronizing - - - Paused - - Out of sync diff --git a/tray/CMakeLists.txt b/tray/CMakeLists.txt index f038276..88067f1 100644 --- a/tray/CMakeLists.txt +++ b/tray/CMakeLists.txt @@ -9,52 +9,35 @@ set(META_APP_ACTION_OPEN_WEBUI "open-webui" "Open web UI" "--webui") # add project files set(WIDGETS_HEADER_FILES - application/settings.h application/singleinstance.h gui/trayicon.h gui/traywidget.h gui/traymenu.h - gui/settingsdialog.h - gui/webpage.h - gui/webviewdialog.h gui/dirbuttonsitemdelegate.h gui/devbuttonsitemdelegate.h gui/downloaditemdelegate.h gui/dirview.h gui/devview.h gui/downloadview.h - gui/textviewdialog.h ) set(WIDGETS_SRC_FILES application/main.cpp - application/settings.cpp application/singleinstance.cpp gui/trayicon.cpp gui/traywidget.cpp gui/traymenu.cpp - gui/settingsdialog.cpp - gui/webpage.cpp - gui/webviewdialog.cpp gui/dirbuttonsitemdelegate.cpp gui/devbuttonsitemdelegate.cpp gui/downloaditemdelegate.cpp gui/dirview.cpp gui/devview.cpp gui/downloadview.cpp - gui/textviewdialog.cpp ) set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc ) set(WIDGETS_UI_FILES gui/traywidget.ui - gui/connectionoptionpage.ui - gui/notificationsoptionpage.ui - gui/appearanceoptionpage.ui - gui/autostartoptionpage.ui - gui/launcheroptionpage.ui - gui/systemdoptionpage.ui - gui/webviewoptionpage.ui ) set(TS_FILES @@ -122,6 +105,8 @@ find_package(syncthingconnector ${META_APP_VERSION} REQUIRED) use_syncthingconnector() find_package(syncthingmodel ${META_APP_VERSION} REQUIRED) use_syncthingmodel() +find_package(syncthingwidgets ${META_APP_VERSION} REQUIRED) +use_syncthingwidgets() # link also explicitely against the following Qt 5 modules list(APPEND ADDITIONAL_QT_MODULES Network) @@ -131,7 +116,6 @@ include(BasicConfig) include(QtGuiConfig) include(QtConfig) include(WindowsResources) -include(WebViewProviderConfig) include(AppTarget) include(ShellCompletion) include(Doxygen) diff --git a/tray/application/main.cpp b/tray/application/main.cpp index adda17d..cf53e1e 100644 --- a/tray/application/main.cpp +++ b/tray/application/main.cpp @@ -1,9 +1,10 @@ -#include "./settings.h" #include "./singleinstance.h" #include "../gui/trayicon.h" #include "../gui/traywidget.h" +#include "../../widgets/settings/settings.h" + #include "../../connector/syncthingprocess.h" #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD # include "../../connector/syncthingservice.h" diff --git a/tray/gui/dirview.cpp b/tray/gui/dirview.cpp index 24d1f8f..dd96d1d 100644 --- a/tray/gui/dirview.cpp +++ b/tray/gui/dirview.cpp @@ -1,7 +1,7 @@ #include "./dirview.h" #include "./dirbuttonsitemdelegate.h" -#include "./textviewdialog.h" +#include "../../widgets/misc/textviewdialog.h" #include "../../model/syncthingdirectorymodel.h" #include "../../connector/syncthingconnection.h" diff --git a/tray/gui/trayicon.cpp b/tray/gui/trayicon.cpp index 93efb5e..1fc0d1b 100644 --- a/tray/gui/trayicon.cpp +++ b/tray/gui/trayicon.cpp @@ -1,7 +1,7 @@ #include "./trayicon.h" #include "./traywidget.h" -#include "../application/settings.h" +#include "../../widgets/settings/settings.h" #include "../../model/syncthingicons.h" diff --git a/tray/gui/traymenu.cpp b/tray/gui/traymenu.cpp index 526f051..0f3b663 100644 --- a/tray/gui/traymenu.cpp +++ b/tray/gui/traymenu.cpp @@ -2,7 +2,7 @@ #include "./traywidget.h" #include "./trayicon.h" -#include "../application/settings.h" +#include "../../widgets/settings/settings.h" #include #include diff --git a/tray/gui/traywidget.cpp b/tray/gui/traywidget.cpp index 281f352..249f407 100644 --- a/tray/gui/traywidget.cpp +++ b/tray/gui/traywidget.cpp @@ -1,11 +1,10 @@ #include "./traywidget.h" #include "./traymenu.h" #include "./trayicon.h" -#include "./settingsdialog.h" -#include "./webviewdialog.h" -#include "./textviewdialog.h" -#include "../application/settings.h" +#include "../../widgets/settings/settingsdialog.h" +#include "../../widgets/webview/webviewdialog.h" +#include "../../widgets/misc/textviewdialog.h" #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD # include "../../connector/syncthingservice.h" @@ -57,7 +56,7 @@ TrayWidget::TrayWidget(TrayMenu *parent) : QWidget(parent), m_menu(parent), m_ui(new Ui::TrayWidget), -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW m_webViewDlg(nullptr), #endif m_dirModel(m_connection), @@ -189,11 +188,11 @@ void TrayWidget::showAboutDialog() void TrayWidget::showWebUi() { -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW if(Settings::values().webView.disabled) { #endif QDesktopServices::openUrl(m_connection.syncthingUrl()); -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW } else { if(!m_webViewDlg) { m_webViewDlg = new WebViewDialog(this); @@ -392,7 +391,7 @@ void TrayWidget::applySettings() #endif // web view -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW if(instance->m_webViewDlg) { instance->m_webViewDlg->applySettings(*instance->m_selectedConnection); } @@ -572,7 +571,7 @@ void TrayWidget::connectIfServiceRunning() } #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW void TrayWidget::handleWebViewDeleted() { m_webViewDlg = nullptr; @@ -597,7 +596,7 @@ void TrayWidget::handleConnectionSelected(QAction *connectionAction) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD handleSystemdStatusChanged(); #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW if(m_webViewDlg) { m_webViewDlg->applySettings(*m_selectedConnection); } diff --git a/tray/gui/traywidget.h b/tray/gui/traywidget.h index 44e1602..61f5b55 100644 --- a/tray/gui/traywidget.h +++ b/tray/gui/traywidget.h @@ -1,15 +1,15 @@ #ifndef TRAY_WIDGET_H #define TRAY_WIDGET_H -#include "../application/settings.h" - -#include "../../connector/syncthingconnection.h" -#include "../../connector/syncthingprocess.h" +#include "../../widgets/settings/settings.h" #include "../../model/syncthingdirectorymodel.h" #include "../../model/syncthingdevicemodel.h" #include "../../model/syncthingdownloadmodel.h" +#include "../../connector/syncthingconnection.h" +#include "../../connector/syncthingprocess.h" + #include #include @@ -74,7 +74,7 @@ private slots: bool handleSystemdStatusChanged(); void connectIfServiceRunning(); #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW void handleWebViewDeleted(); #endif void handleNewNotification(ChronoUtilities::DateTime when, const QString &msg); @@ -86,7 +86,7 @@ private: std::unique_ptr m_ui; static SettingsDialog *m_settingsDlg; static Dialogs::AboutDialog *m_aboutDlg; -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW WebViewDialog *m_webViewDlg; #endif QFrame *m_cornerFrame; diff --git a/tray/gui/traywidget.ui b/tray/gui/traywidget.ui index 636d045..98b7ee7 100644 --- a/tray/gui/traywidget.ui +++ b/tray/gui/traywidget.ui @@ -99,7 +99,7 @@ Connect - + :/icons/hicolor/scalable/actions/view-refresh.svg:/icons/hicolor/scalable/actions/view-refresh.svg @@ -113,7 +113,7 @@ Start - + :/icons/hicolor/scalable/apps/system-run.svg:/icons/hicolor/scalable/apps/system-run.svg @@ -154,7 +154,7 @@ Web UI - + :/icons/hicolor/scalable/apps/internet-web-browser.svg:/icons/hicolor/scalable/apps/internet-web-browser.svg @@ -499,6 +499,7 @@ For <i>all</i> notifications, checkout the log + diff --git a/tray/gui/webviewdefs.h b/tray/gui/webviewdefs.h deleted file mode 100644 index d5cce5d..0000000 --- a/tray/gui/webviewdefs.h +++ /dev/null @@ -1,30 +0,0 @@ -// Created via CMake from template webviewdefs.h.in -// WARNING! Any changes to this file will be overwritten by the next CMake run! - -#ifndef SYNCTHINGTRAY_WEB_VIEW_DEFINES -#define SYNCTHINGTRAY_WEB_VIEW_DEFINES - -#include - -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) -# define SYNCTHINGTRAY_WEB_VIEW QWebEngineView -# define SYNCTHINGTRAY_WEB_PAGE QWebEnginePage -#elif defined(SYNCTHINGTRAY_USE_WEBKIT) -# define SYNCTHINGTRAY_WEB_VIEW QWebView -# define SYNCTHINGTRAY_WEB_PAGE QWebPage -# define SYNCTHINGTRAY_WEB_FRAME QWebFrame -#elif !defined(SYNCTHINGTRAY_NO_WEBVIEW) -# error "No definition for web view provider present." -#endif - -#ifdef SYNCTHINGTRAY_WEB_VIEW -QT_FORWARD_DECLARE_CLASS(SYNCTHINGTRAY_WEB_VIEW) -#endif -#ifdef SYNCTHINGTRAY_WEB_PAGE -QT_FORWARD_DECLARE_CLASS(SYNCTHINGTRAY_WEB_PAGE) -#endif -#ifdef SYNCTHINGTRAY_WEB_FRAME -QT_FORWARD_DECLARE_CLASS(SYNCTHINGTRAY_WEB_FRAME) -#endif - -#endif // SYNCTHINGTRAY_WEB_VIEW_DEFINES diff --git a/tray/resources/syncthingtrayicons.qrc b/tray/resources/syncthingtrayicons.qrc index f3af383..49b6840 100644 --- a/tray/resources/syncthingtrayicons.qrc +++ b/tray/resources/syncthingtrayicons.qrc @@ -8,21 +8,13 @@ icons/hicolor/scalable/actions/media-playback-pause.svg icons/hicolor/scalable/actions/media-playback-start.svg icons/hicolor/scalable/actions/view-barcode.svg - icons/hicolor/scalable/actions/view-refresh.svg icons/hicolor/scalable/actions/window-close.svg icons/hicolor/scalable/apps/help-about.svg - icons/hicolor/scalable/apps/internet-web-browser.svg - icons/hicolor/scalable/apps/preferences-other.svg icons/hicolor/scalable/devices/network-card.svg icons/hicolor/scalable/places/folder-open.svg icons/hicolor/scalable/places/folder.svg icons/hicolor/scalable/places/network-workgroup.svg - icons/hicolor/scalable/apps/system-run.svg icons/hicolor/scalable/actions/network-connect.svg icons/hicolor/scalable/places/folder-download.svg - icons/hicolor/scalable/actions/process-stop.svg - icons/hicolor/scalable/actions/list-add.svg - icons/hicolor/scalable/actions/list-remove.svg - icons/hicolor/scalable/actions/edit-paste.svg diff --git a/tray/translations/syncthingtray_de_DE.ts b/tray/translations/syncthingtray_de_DE.ts index 1d3372d..a79963f 100644 --- a/tray/translations/syncthingtray_de_DE.ts +++ b/tray/translations/syncthingtray_de_DE.ts @@ -4,288 +4,194 @@ QtGui::AppearanceOptionPage - Appearance - Erscheinungsbild + Erscheinungsbild - Menu size - Größe des Menüs + Größe des Menüs - Optional GUI elements - Optionale Elemente + Optionale Elemente - Traffic statistics - Traffic-Statistiken + Traffic-Statistiken - - x - - - - - px - - - - Frame shape - Rahmenform + Rahmenform - Frame shadow - Rahmenschatten + Rahmenschatten - No frame - Kein Rahmen + Kein Rahmen - - Box - - - - - Panel - - - - - Styled panel - - - - Plain - Einfach + Einfach - Raised - Angehoben + Angehoben - Sunken - Eingedrückt + Eingedrückt - Tab position - Position der Tabs + Position der Tabs - Top - Oben + Oben - Bottom - Unten + Unten - Left - Links + Links - Right - Rechts + Rechts - Colors - Farben + Farben - Bright custom text colors (use for dark color scheme) - Helle benutzerdefinierte Schriftfarben (für dunkles Farbschema gedacht) + Helle benutzerdefinierte Schriftfarben (für dunkles Farbschema gedacht) QtGui::AutostartOptionPage - Autostart - Auto-Start + Auto-Start - Start the tray icon when the desktop environment launches - Tray-Icon beim Starten der Desktopumgebung automatisch starten + Tray-Icon beim Starten der Desktopumgebung automatisch starten - This is achieved by adding a *.desktop file under <i>~/.config/autostart</i> so the setting only affects the current user. - Durch das Hinzufügen einer *.desktop-Datei unter <i>~/.config/autostart</i> realisiert - betrifft also nur den aktuellen Benutzer. + Durch das Hinzufügen einer *.desktop-Datei unter <i>~/.config/autostart</i> realisiert - betrifft also nur den aktuellen Benutzer. - This is achieved by adding a registry key under <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> so the setting only affects the current user. Note that the startup entry is invalidated when moving <i>syncthingtray.exe</i>. - Durch das Hinzufügen eines Registry-Schlüssels unter <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> realisiert - betrifft also nur den aktuellen Benutzer. + Durch das Hinzufügen eines Registry-Schlüssels unter <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> realisiert - betrifft also nur den aktuellen Benutzer. - This feature has not been implemented for your platform (yet). - Diese Funktion wurde für die aktuelle Plattform nicht nicht implementiert. + Diese Funktion wurde für die aktuelle Plattform nicht nicht implementiert. - unable to modify startup entry - Fehler beim aktualisieren des Auto-Start-Eintrags + Fehler beim aktualisieren des Auto-Start-Eintrags QtGui::ConnectionOptionPage - Connection - Verbindung + Verbindung - Config label - Name der Konfig. + Name der Konfig. - Add secondary instance - Sekundäre Konfiguration hinzufügen + Sekundäre Konfiguration hinzufügen - Remove currently selected secondary instance - Sekundäre Konfiguration löschen + Sekundäre Konfiguration löschen - It is possible to save multiple configurations. This allows switching quickly between multiple Syncthing instances using the connection button in the right corner of the tray menu. The config label is an arbitrary name to identify a configuration and does not have to match the name of the corresponding Syncthing device. - Es ist möglich, mehrere Konfigurationen zu speichern. Zwischen diesen kann anschließend über das Verbindungsmenü rechts oben im Tray schnell hin- und hergewechselt werden. Der Name der Konfiguration muss nicht mit dem Namen des entsprechenden Syncthing-Gerätes übereinstimmen. + Es ist möglich, mehrere Konfigurationen zu speichern. Zwischen diesen kann anschließend über das Verbindungsmenü rechts oben im Tray schnell hin- und hergewechselt werden. Der Name der Konfiguration muss nicht mit dem Namen des entsprechenden Syncthing-Gerätes übereinstimmen. - - Syncthing URL - - - - Authentication - Authentifizierung + Authentifizierung - User - Benutzername + Benutzername - Password - Passwort + Passwort - API key - API-Schlüssel + API-Schlüssel - HTTPS certificate - HTTPS-Zertifikat + HTTPS-Zertifikat - Insert values from local Syncthing configuration - Werte aus lokaler Syncthing-Konfiguration einfügen + Werte aus lokaler Syncthing-Konfiguration einfügen - Errors - Fehler + Fehler - - Status - - - - disconnected - getrennt + getrennt - Apply connection settings and try to reconnect with the currently selected config - Verbindungseinstellungen übernehmen und mit neuen Einstellungen verbinden + Verbindungseinstellungen übernehmen und mit neuen Einstellungen verbinden - Poll interval - Abfrageintervall + Abfrageintervall - - Traffic - - - - - - - - ms - - - - Device statistics - Gerätestatistiken + Gerätestatistiken - Reconnect - Verbindungsveruch + Verbindungsveruch - no - nicht neu verbinden + nicht neu verbinden - Auto-detected for local instance - Kann für lokale Instanz automatisch ermittelt werden + Kann für lokale Instanz automatisch ermittelt werden - Select Syncthing config file - Wähle die Syncthing-Konfigurationsdatei + Wähle die Syncthing-Konfigurationsdatei - Unable to parse the Syncthing config file. - Fehler beim Auslesen der Syncthing-Konfigurationsdatei. + Fehler beim Auslesen der Syncthing-Konfigurationsdatei. - Unable to load specified certificate "%1". - Fehler beim Auslesen des angegebenen Zertifikats: %1 + Fehler beim Auslesen des angegebenen Zertifikats: %1 - Instance %1 - Instanz %1 + Instanz %1 @@ -345,81 +251,66 @@ QtGui::LauncherOptionPage - Syncthing launcher - Syncthing-Starter + Syncthing-Starter - Launch Syncthing when starting the tray icon - Starte Syncthing beim Starten des Tray-Icons + Starte Syncthing beim Starten des Tray-Icons - Syncthing executable - Ausführbare Datei von Syncthing + Ausführbare Datei von Syncthing - Arguments - Argumente + Argumente - Syncthing log (interleaved stdout/stderr) - Syncthing-Log (stdout/stderr) + Syncthing-Log (stdout/stderr) - Apply and launch now - Jetzt starten + Jetzt starten - Stop launched instance - Stoppen + Stoppen - No log messages available yet - Bisher keine Log-Meldungen + Bisher keine Log-Meldungen - Ensure latest log is visible - Log folgen + Log folgen - %1-launcher - %1-Starter + %1-Starter - Launch %1 when starting the tray icon - Starte %1 beim Starten des Tray-Icons + Starte %1 beim Starten des Tray-Icons - %1 executable - Ausführbare Datei von %1 + Ausführbare Datei von %1 - %1 log (interleaved stdout/stderr) - %1-Log (stdout/stderr) + %1-Log (stdout/stderr) - %1 exited with exit code %2 - %1 wurde mit dem Statuscode %2 beendet + %1 wurde mit dem Statuscode %2 beendet - %1 crashed with exit code %2 - %1 ist mit dem Statuscode %2 abgestürzt + %1 ist mit dem Statuscode %2 abgestürzt Syncthing exited with exit code %1 @@ -435,178 +326,126 @@ QtGui::NotificationsOptionPage - Notifications - Benachrichtigungen + Benachrichtigungen - Notify on - Benachrichtigen, wenn + Benachrichtigen, wenn - disconnect - die Verbindung zu Syncthing getrennt wird + die Verbindung zu Syncthing getrennt wird - internal errors - interne Fehler auftreten + interne Fehler auftreten - errors/notifications from Syncthing - Fehler/Warnungen von Syncthing gemeldet werden + Fehler/Warnungen von Syncthing gemeldet werden - sync complete - die Synchronisierung abgeschlossen wurde + die Synchronisierung abgeschlossen wurde - Notification API - Benachrichtigungs-API + Benachrichtigungs-API - D-Bus notifi&cations (org.freedesktop.Notifications) - D-Bus (org.freedesktop.Notifications) + D-Bus (org.freedesktop.Notifications) - &Method provided by Qt (might be overridden by QPA plugin) - Methode die von Qt verwendet wird (kann vom QPA-Plugin überschrieben werden) + Methode die von Qt verwendet wird (kann vom QPA-Plugin überschrieben werden) - Misc - Verschiedenes + Verschiedenes - Ignore inavailability of Syncthing the specified number of seconds after Syncthing has been started; has only effect if the Syncthing start can be determined which is currently only supported for the local instance by checking Systemd unit status - Ignoriere, dass Syncthing ein paar Sekunden nach dem Start noch nicht verfügbar ist. Hat nur Auswirkungen, wenn der Syncthing-Startzeitpunkt ermittelt werden kann, was aktuell nur für die lokale Instanz via Systemd unterstützt wird. + Ignoriere, dass Syncthing ein paar Sekunden nach dem Start noch nicht verfügbar ist. Hat nur Auswirkungen, wenn der Syncthing-Startzeitpunkt ermittelt werden kann, was aktuell nur für die lokale Instanz via Systemd unterstützt wird. - don't ignore - nicht ignorieren + nicht ignorieren - - s - - - - Configured to use D-Bus notifications but D-Bus notification daemon seems unavailabe. - Benachrichtigungen via D-Bus wurden eingestellt, aber es scheint kein Daemon zu laufen der den Dienst bereitstellt. + Benachrichtigungen via D-Bus wurden eingestellt, aber es scheint kein Daemon zu laufen der den Dienst bereitstellt. QtGui::SettingsDialog - - Tray - - - - Web view - Weboberfläche + Weboberfläche - Startup - Starten + Starten - Settings - Einstellungen + Einstellungen QtGui::SystemdOptionPage - - Systemd - - - - Show start/stop button on tray for local instance when systemd is available - Zeige Start/Stop-Button für die lokale Instanz wenn systemd verfügbar ist + Zeige Start/Stop-Button für die lokale Instanz wenn systemd verfügbar ist - - Syncthing unit - - - - Description - Beschreibung + Beschreibung - Current status - Aktueller Status + Aktueller Status - Unit file state - Status des Unit files + Status des Unit files - - - - - unknown - unbekannt + unbekannt - Consider systemd unit status for reconnect attempts to local instance • Don't reconnect when unit not active/running • Try to reconnect when unit becomes active/running - Verwende den systemd-Status für Neuverbindungsversuche zur lokalen Instanz + Verwende den systemd-Status für Neuverbindungsversuche zur lokalen Instanz • Nicht versuchen neu zu verbinden, wenn die Syncthing unit nicht läuft • Automatisch neu verbinden, wenn die Syncthing unit gestartet wird - Enable - Autom. starten + Autom. starten - Disable - Nicht autom. starten + Nicht autom. starten - Start - Starten + Starten - Stop - Stoppen + Stoppen - specified unit is either inactive or doesn't exist - angegebene Unit ist entweder nicht geladen oder existiert nicht + angegebene Unit ist entweder nicht geladen oder existiert nicht - since - seit + seit @@ -675,7 +514,7 @@ Log - + @@ -750,7 +589,7 @@ Syncthing Tray - + @@ -759,19 +598,19 @@ - + About Über Syncthing Tray - + Connect Verbinden - + Start Starten @@ -803,7 +642,7 @@ - + unknown unbekannt @@ -826,8 +665,8 @@ For <i>all</i> notifications, checkout the log - - + + New notifications Neue Benachrichtigungen @@ -844,7 +683,7 @@ For <i>all</i> notifications, checkout the log Downloads - + @@ -857,87 +696,87 @@ For <i>all</i> notifications, checkout the log Ignorieren - + View own device ID Eigene Geräte-ID anzeigen - + Restart Syncthing Syncthing neustarten - + Show Syncthing log Syncthing-Log zeigen - + Rescan all directories Alle Verzeichnisse neu scannen - + Connection Verbindung - + Own device ID Eigene Geräte-ID - + device ID is unknown die Geräte-ID ist unbekannt - + Copy to clipboard in Zwischenablage kopieren - + Log - + - + Do you really want to restart Syncthing? Soll Syncthing wirklich neu gestartet werden? - + Not connected to Syncthing, click to connect Verbindung zu Syncthing getrennt, klicke um zu verbinden - + Pause Pausieren - + Syncthing is running, click to pause all devices Syncthing läuft, klicke um alle Geräte zu pausieren - + Continue Fortsetzen - + At least one device is paused, click to resume Mind. ein Gerät ist pausiert, klicke um fortzusetzen - + The directory <i>%1</i> does not exist on the local machine. Das Verzeichnis <i>%1</i> existiert nicht lokal. - + The containing directory <i>%1</i> does not exist on the local machine. Das beinhaltende Verzeichnis <i>%1</i> existiert nicht lokal. @@ -946,92 +785,75 @@ For <i>all</i> notifications, checkout the log Die Datei <i>%1</i> existiert nicht (lokal). - + Stop Stoppen - - QtGui::WebViewDialog - - - Syncthing - - - QtGui::WebViewOptionPage - - General - Allgemein + Allgemein - Usage - Verwendung + Verwendung - Disable web view (open regular web browser instead) - Eingebaute Anzeige deaktivieren (stattdessen Standardbrowser verwenden) + Eingebaute Anzeige deaktivieren (stattdessen Standardbrowser verwenden) - Zoom factor - Zoom-Faktor + Zoom-Faktor - Hiding - Schließen + Schließen - Keep web view running when currently not shown - Lasse Weboberfläche im Hintgergrund weiter offen, wenn Fenster nicht offen + Lasse Weboberfläche im Hintgergrund weiter offen, wenn Fenster nicht offen - Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. The Web UI will be opened in the default web browser instead. - Syncthing Tray wurde nicht mit Unterstützung für die eingebaute Anzeige der Weboberfläche unter Verwendung von Qt WebKit oder Qt WebEngine gebaut. + Syncthing Tray wurde nicht mit Unterstützung für die eingebaute Anzeige der Weboberfläche unter Verwendung von Qt WebKit oder Qt WebEngine gebaut. Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. Settings::restore - Unable to load certificate "%1" when restoring settings. - Fehler beim laden des Zertifikats "%1" beim wiederherstellen der Einstellungen. + Fehler beim laden des Zertifikats "%1" beim wiederherstellen der Einstellungen. main - + Unable to Fehler beim - + You must configure how to connect to Syncthing when using Syncthing Tray the first time. Vor der ersten Verwendung muss eingestellt werden, wie sich das Syncthing Tray mit Syncthing verbinden soll. - + Note that the settings dialog allows importing URL, credentials and API-key from the local Syncthing configuration. Der Einstellungsdialog ermöglicht es die URL, Zugangsdaten und den API-Key automatisch aus der lokalen Syncthing-Konfiguration auszulesen. - + The system tray is (currently) not available. You could open the tray menu as a regular window using the -w flag, though. Das System-Tray bzw. der Infobereich ist aktuell nicht verfügbar. Es wäre möglich, Syncthing Tray als normales Fenster zu starten (mit Option -w). - + The Qt libraries have not been built with tray icon support. You could open the tray menu as a regular window using the -w flag, though. Die verwendete Qt-Bibliothek wurde nicht mit Unterstützung für System-Tray konfiguriert. Es wäre möglich, Syncthing Tray als normales Fenster zu starten (mit Option -w). diff --git a/tray/translations/syncthingtray_en_US.ts b/tray/translations/syncthingtray_en_US.ts index ef45228..07a4440 100644 --- a/tray/translations/syncthingtray_en_US.ts +++ b/tray/translations/syncthingtray_en_US.ts @@ -1,293 +1,6 @@ - - QtGui::AppearanceOptionPage - - - Appearance - - - - - Menu size - - - - - Optional GUI elements - - - - - Traffic statistics - - - - - x - - - - - px - - - - - Frame shape - - - - - Frame shadow - - - - - No frame - - - - - Box - - - - - Panel - - - - - Styled panel - - - - - Plain - - - - - Raised - - - - - Sunken - - - - - Tab position - - - - - Top - - - - - Bottom - - - - - Left - - - - - Right - - - - - Colors - - - - - Bright custom text colors (use for dark color scheme) - - - - - QtGui::AutostartOptionPage - - - Autostart - - - - - Start the tray icon when the desktop environment launches - - - - - This is achieved by adding a *.desktop file under <i>~/.config/autostart</i> so the setting only affects the current user. - - - - - This is achieved by adding a registry key under <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> so the setting only affects the current user. Note that the startup entry is invalidated when moving <i>syncthingtray.exe</i>. - - - - - This feature has not been implemented for your platform (yet). - - - - - unable to modify startup entry - - - - - QtGui::ConnectionOptionPage - - - Connection - - - - - Config label - - - - - Add secondary instance - - - - - Remove currently selected secondary instance - - - - - It is possible to save multiple configurations. This allows switching quickly between multiple Syncthing instances using the connection button in the right corner of the tray menu. The config label is an arbitrary name to identify a configuration and does not have to match the name of the corresponding Syncthing device. - - - - - Syncthing URL - - - - - Authentication - - - - - User - - - - - Password - - - - - API key - - - - - HTTPS certificate - - - - - Insert values from local Syncthing configuration - - - - - Poll interval - - - - - - - - ms - - - - - Traffic - - - - - Device statistics - - - - - Errors - - - - - Reconnect - - - - - no - - - - - Status - - - - - disconnected - - - - - Apply connection settings and try to reconnect with the currently selected config - - - - - Auto-detected for local instance - - - - - Select Syncthing config file - - - - - Unable to parse the Syncthing config file. - - - - - Unable to load specified certificate "%1". - - - - - Instance %1 - - - QtGui::DevView @@ -342,261 +55,6 @@ - - QtGui::LauncherOptionPage - - - Syncthing launcher - - - - - Launch Syncthing when starting the tray icon - - - - - Syncthing executable - - - - - Arguments - - - - - Syncthing log (interleaved stdout/stderr) - - - - - Apply and launch now - - - - - Stop launched instance - - - - - No log messages available yet - - - - - Ensure latest log is visible - - - - - %1-launcher - - - - - Launch %1 when starting the tray icon - - - - - %1 executable - - - - - %1 log (interleaved stdout/stderr) - - - - - %1 exited with exit code %2 - - - - - - %1 crashed with exit code %2 - - - - - - QtGui::NotificationsOptionPage - - - Notifications - - - - - Notify on - - - - - disconnect - - - - - internal errors - - - - - errors/notifications from Syncthing - - - - - sync complete - - - - - Notification API - - - - - D-Bus notifi&cations (org.freedesktop.Notifications) - - - - - &Method provided by Qt (might be overridden by QPA plugin) - - - - - Misc - - - - - Ignore inavailability of Syncthing the specified number of seconds after Syncthing has been started; has only effect if the Syncthing start can be determined which is currently only supported for the local instance by checking Systemd unit status - - - - - don't ignore - - - - - s - - - - - Configured to use D-Bus notifications but D-Bus notification daemon seems unavailabe. - - - - - QtGui::SettingsDialog - - - Tray - - - - - Web view - - - - - Startup - - - - - Settings - - - - - QtGui::SystemdOptionPage - - - Systemd - - - - - Show start/stop button on tray for local instance when systemd is available - - - - - Consider systemd unit status for reconnect attempts to local instance - • Don't reconnect when unit not active/running - • Try to reconnect when unit becomes active/running - - - - - Syncthing unit - - - - - Description - - - - - - - - - unknown - - - - - Current status - - - - - Start - - - - - Stop - - - - - Unit file state - - - - - Enable - - - - - Disable - - - - - specified unit is either inactive or doesn't exist - - - - - since - - - QtGui::TrayIcon @@ -746,19 +204,19 @@ - + About - + Connect - + Start @@ -790,7 +248,7 @@ - + unknown @@ -812,8 +270,8 @@ For <i>all</i> notifications, checkout the log - - + + New notifications @@ -843,176 +301,120 @@ For <i>all</i> notifications, checkout the log - + View own device ID - + Restart Syncthing - + Show Syncthing log - + Rescan all directories - + Connection - + Own device ID - + device ID is unknown - + Copy to clipboard - + Log - + Do you really want to restart Syncthing? - + Not connected to Syncthing, click to connect - + Pause - + Syncthing is running, click to pause all devices - + Continue - + At least one device is paused, click to resume - + The directory <i>%1</i> does not exist on the local machine. - + The containing directory <i>%1</i> does not exist on the local machine. - + Stop - - QtGui::WebViewDialog - - - Syncthing - - - - - QtGui::WebViewOptionPage - - - - General - - - - - Usage - - - - - Disable web view (open regular web browser instead) - - - - - Zoom factor - - - - - Hiding - - - - - Keep web view running when currently not shown - - - - - Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. -The Web UI will be opened in the default web browser instead. - - - - - Settings::restore - - - Unable to load certificate "%1" when restoring settings. - - - main - + Unable to - + You must configure how to connect to Syncthing when using Syncthing Tray the first time. - + Note that the settings dialog allows importing URL, credentials and API-key from the local Syncthing configuration. - + The system tray is (currently) not available. You could open the tray menu as a regular window using the -w flag, though. - + The Qt libraries have not been built with tray icon support. You could open the tray menu as a regular window using the -w flag, though. diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt new file mode 100644 index 0000000..c12eb8f --- /dev/null +++ b/widgets/CMakeLists.txt @@ -0,0 +1,87 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) + +# metadata +set(META_PROJECT_NAME syncthingwidgets) +set(META_PROJECT_TYPE library) +set(META_GUI_OPTIONAL false) +set(META_APP_NAME "Widgets of Syncthing Tray") +set(META_PUBLIC_QT_MODULES Gui Widgets) +set(META_WEBVIEW_SRC_DIR webview) +set(META_PUBLIC_SHARED_LIB_DEPENDS syncthingconnector syncthingmodel) +set(META_PUBLIC_STATIC_LIB_DEPENDS syncthingconnector_static syncthingmodel_static) + +# add project files +set(WIDGETS_HEADER_FILES + settings/settings.h + settings/settingsdialog.h + webview/webpage.h + webview/webviewdialog.h + misc/textviewdialog.h +) +set(WIDGETS_SRC_FILES + settings/settings.cpp + settings/settingsdialog.cpp + webview/webpage.cpp + webview/webviewdialog.cpp + misc/textviewdialog.cpp +) +set(RES_FILES + resources/${META_PROJECT_NAME}icons.qrc +) +set(WIDGETS_UI_FILES + settings/connectionoptionpage.ui + settings/notificationsoptionpage.ui + settings/appearanceoptionpage.ui + settings/autostartoptionpage.ui + settings/launcheroptionpage.ui + settings/systemdoptionpage.ui + settings/webviewoptionpage.ui +) + +set(TS_FILES + translations/${META_PROJECT_NAME}_de_DE.ts + translations/${META_PROJECT_NAME}_en_US.ts +) + +set(REQUIRED_ICONS + preferences-other + process-stop + list-add + preferences-desktop + internet-web-browser + system-run + edit-paste + list-remove + preferences-desktop-notification + view-refresh + emblem-checked + network-connect + emblem-remove +) + +# find c++utilities +find_package(c++utilities 4.6.0 REQUIRED) +use_cpp_utilities() + +# find qtutilities +find_package(qtutilities 5.6.0 REQUIRED) +use_qt_utilities() + +# find backend libraries +find_package(syncthingconnector ${META_APP_VERSION} REQUIRED) +use_syncthingconnector() +find_package(syncthingmodel ${META_APP_VERSION} REQUIRED) +use_syncthingmodel() + +# link also explicitely against the following Qt 5 modules +list(APPEND ADDITIONAL_QT_MODULES Network) + +# include modules to apply configuration +include(BasicConfig) +include(QtGuiConfig) +include(QtConfig) +include(WindowsResources) +include(WebViewProviderConfig) +include(LibraryTarget) +include(Doxygen) +include(ConfigHeader) diff --git a/widgets/global.h b/widgets/global.h new file mode 100644 index 0000000..baae0db --- /dev/null +++ b/widgets/global.h @@ -0,0 +1,27 @@ +// Created via CMake from template global.h.in +// WARNING! Any changes to this file will be overwritten by the next CMake run! + +#ifndef SYNCTHINGWIDGETS_GLOBAL +#define SYNCTHINGWIDGETS_GLOBAL + +#include + +#ifdef SYNCTHINGWIDGETS_STATIC +# define SYNCTHINGWIDGETS_EXPORT +# define SYNCTHINGWIDGETS_IMPORT +#else +# define SYNCTHINGWIDGETS_EXPORT LIB_EXPORT +# define SYNCTHINGWIDGETS_IMPORT LIB_IMPORT +#endif + +/*! + * \def SYNCTHINGWIDGETS_EXPORT + * \brief Marks the symbol to be exported by the syncthingwidgets library. + */ + +/*! + * \def SYNCTHINGWIDGETS_IMPORT + * \brief Marks the symbol to be imported from the syncthingwidgets library. + */ + +#endif // SYNCTHINGWIDGETS_GLOBAL diff --git a/tray/gui/textviewdialog.cpp b/widgets/misc/textviewdialog.cpp similarity index 100% rename from tray/gui/textviewdialog.cpp rename to widgets/misc/textviewdialog.cpp diff --git a/tray/gui/textviewdialog.h b/widgets/misc/textviewdialog.h similarity index 85% rename from tray/gui/textviewdialog.h rename to widgets/misc/textviewdialog.h index 276f46f..1bc5589 100644 --- a/tray/gui/textviewdialog.h +++ b/widgets/misc/textviewdialog.h @@ -1,13 +1,15 @@ #ifndef TEXTVIEWDIALOG_H #define TEXTVIEWDIALOG_H +#include "../global.h" + #include QT_FORWARD_DECLARE_CLASS(QTextBrowser) namespace QtGui { -class TextViewDialog : public QWidget +class SYNCTHINGWIDGETS_EXPORT TextViewDialog : public QWidget { Q_OBJECT public: diff --git a/tray/resources/icons/hicolor/scalable/actions/edit-paste.svg b/widgets/resources/icons/hicolor/scalable/actions/edit-paste.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/actions/edit-paste.svg rename to widgets/resources/icons/hicolor/scalable/actions/edit-paste.svg diff --git a/tray/resources/icons/hicolor/scalable/actions/list-add.svg b/widgets/resources/icons/hicolor/scalable/actions/list-add.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/actions/list-add.svg rename to widgets/resources/icons/hicolor/scalable/actions/list-add.svg diff --git a/tray/resources/icons/hicolor/scalable/actions/list-remove.svg b/widgets/resources/icons/hicolor/scalable/actions/list-remove.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/actions/list-remove.svg rename to widgets/resources/icons/hicolor/scalable/actions/list-remove.svg diff --git a/tray/resources/icons/hicolor/scalable/actions/process-stop.svg b/widgets/resources/icons/hicolor/scalable/actions/process-stop.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/actions/process-stop.svg rename to widgets/resources/icons/hicolor/scalable/actions/process-stop.svg diff --git a/tray/resources/icons/hicolor/scalable/actions/view-refresh.svg b/widgets/resources/icons/hicolor/scalable/actions/view-refresh.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/actions/view-refresh.svg rename to widgets/resources/icons/hicolor/scalable/actions/view-refresh.svg diff --git a/tray/resources/icons/hicolor/scalable/apps/internet-web-browser.svg b/widgets/resources/icons/hicolor/scalable/apps/internet-web-browser.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/apps/internet-web-browser.svg rename to widgets/resources/icons/hicolor/scalable/apps/internet-web-browser.svg diff --git a/tray/resources/icons/hicolor/scalable/apps/preferences-other.svg b/widgets/resources/icons/hicolor/scalable/apps/preferences-other.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/apps/preferences-other.svg rename to widgets/resources/icons/hicolor/scalable/apps/preferences-other.svg diff --git a/tray/resources/icons/hicolor/scalable/apps/system-run.svg b/widgets/resources/icons/hicolor/scalable/apps/system-run.svg similarity index 100% rename from tray/resources/icons/hicolor/scalable/apps/system-run.svg rename to widgets/resources/icons/hicolor/scalable/apps/system-run.svg diff --git a/widgets/resources/syncthingwidgetsicons.qrc b/widgets/resources/syncthingwidgetsicons.qrc new file mode 100644 index 0000000..3abfa5d --- /dev/null +++ b/widgets/resources/syncthingwidgetsicons.qrc @@ -0,0 +1,12 @@ + + + icons/hicolor/scalable/actions/view-refresh.svg + icons/hicolor/scalable/apps/internet-web-browser.svg + icons/hicolor/scalable/apps/preferences-other.svg + icons/hicolor/scalable/apps/system-run.svg + icons/hicolor/scalable/actions/process-stop.svg + icons/hicolor/scalable/actions/list-add.svg + icons/hicolor/scalable/actions/list-remove.svg + icons/hicolor/scalable/actions/edit-paste.svg + + diff --git a/tray/gui/appearanceoptionpage.ui b/widgets/settings/appearanceoptionpage.ui similarity index 100% rename from tray/gui/appearanceoptionpage.ui rename to widgets/settings/appearanceoptionpage.ui diff --git a/tray/gui/autostartoptionpage.ui b/widgets/settings/autostartoptionpage.ui similarity index 100% rename from tray/gui/autostartoptionpage.ui rename to widgets/settings/autostartoptionpage.ui diff --git a/tray/gui/connectionoptionpage.ui b/widgets/settings/connectionoptionpage.ui similarity index 98% rename from tray/gui/connectionoptionpage.ui rename to widgets/settings/connectionoptionpage.ui index 6ca1fa9..8be5559 100644 --- a/tray/gui/connectionoptionpage.ui +++ b/widgets/settings/connectionoptionpage.ui @@ -75,7 +75,7 @@ Add secondary instance - + :/icons/hicolor/scalable/actions/list-add.svg:/icons/hicolor/scalable/actions/list-add.svg @@ -92,7 +92,7 @@ Remove currently selected secondary instance - + :/icons/hicolor/scalable/actions/list-remove.svg:/icons/hicolor/scalable/actions/list-remove.svg @@ -232,7 +232,7 @@ Insert values from local Syncthing configuration - + :/icons/hicolor/scalable/actions/edit-paste.svg:/icons/hicolor/scalable/actions/edit-paste.svg @@ -408,7 +408,7 @@ Apply connection settings and try to reconnect with the currently selected config - + :/icons/hicolor/scalable/actions/view-refresh.svg:/icons/hicolor/scalable/actions/view-refresh.svg @@ -429,7 +429,7 @@ - + diff --git a/tray/gui/launcheroptionpage.ui b/widgets/settings/launcheroptionpage.ui similarity index 98% rename from tray/gui/launcheroptionpage.ui rename to widgets/settings/launcheroptionpage.ui index fa90f00..7e472e2 100644 --- a/tray/gui/launcheroptionpage.ui +++ b/widgets/settings/launcheroptionpage.ui @@ -103,7 +103,7 @@ Apply and launch now - + :/icons/hicolor/scalable/actions/view-refresh.svg:/icons/hicolor/scalable/actions/view-refresh.svg @@ -120,7 +120,7 @@ Stop launched instance - + :/icons/hicolor/scalable/actions/process-stop.svg:/icons/hicolor/scalable/actions/process-stop.svg @@ -171,7 +171,7 @@ - + diff --git a/tray/gui/notificationsoptionpage.ui b/widgets/settings/notificationsoptionpage.ui similarity index 100% rename from tray/gui/notificationsoptionpage.ui rename to widgets/settings/notificationsoptionpage.ui diff --git a/tray/application/settings.cpp b/widgets/settings/settings.cpp similarity index 98% rename from tray/application/settings.cpp rename to widgets/settings/settings.cpp index 80386b8..b6a877e 100644 --- a/tray/application/settings.cpp +++ b/widgets/settings/settings.cpp @@ -1,7 +1,8 @@ #include "./settings.h" #include "../../connector/syncthingprocess.h" -#include "resources/config.h" +// use meta-data of syncthingtray application here +#include "resources/../../tray/resources/config.h" #include #ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS @@ -189,7 +190,7 @@ void restore() #endif settings.endGroup(); -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT) settings.beginGroup(QStringLiteral("webview")); auto &webView = v.webView; webView.disabled = settings.value(QStringLiteral("disabled"), webView.disabled).toBool(); @@ -270,7 +271,7 @@ void save() #endif settings.endGroup(); -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT) settings.beginGroup(QStringLiteral("webview")); const auto &webView = v.webView; settings.setValue(QStringLiteral("disabled"), webView.disabled); diff --git a/tray/application/settings.h b/widgets/settings/settings.h similarity index 77% rename from tray/application/settings.h rename to widgets/settings/settings.h index 3266fd3..ecf13fa 100644 --- a/tray/application/settings.h +++ b/widgets/settings/settings.h @@ -1,6 +1,7 @@ #ifndef SETTINGS_H #define SETTINGS_H +#include "../global.h" #include "../../connector/syncthingconnectionsettings.h" #include @@ -16,11 +17,6 @@ #include -namespace Media { -enum class TagUsage; -enum class ElementPosition; -} - namespace Dialogs { class QtSettings; } @@ -31,13 +27,13 @@ class SyncthingProcess; namespace Settings { -struct Connection +struct SYNCTHINGWIDGETS_EXPORT Connection { Data::SyncthingConnectionSettings primary; std::vector secondary; }; -struct NotifyOn +struct SYNCTHINGWIDGETS_EXPORT NotifyOn { bool disconnect = true; bool internalErrors = true; @@ -45,7 +41,7 @@ struct NotifyOn bool syncthingErrors = true; }; -struct Appearance +struct SYNCTHINGWIDGETS_EXPORT Appearance { bool showTraffic = true; QSize trayMenuSize = QSize(450, 400); @@ -54,14 +50,14 @@ struct Appearance bool brightTextColors = false; }; -struct ToolParameter +struct SYNCTHINGWIDGETS_EXPORT ToolParameter { QString path; QString args; bool autostart = false; }; -struct Launcher +struct SYNCTHINGWIDGETS_EXPORT Launcher { bool enabled = false; QString syncthingPath = @@ -80,7 +76,7 @@ struct Launcher }; #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD -struct Systemd +struct SYNCTHINGWIDGETS_EXPORT Systemd { QString syncthingUnit = QStringLiteral("syncthing.service"); bool showButton = false; @@ -88,8 +84,8 @@ struct Systemd }; #endif -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) -struct WebView +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT) +struct SYNCTHINGWIDGETS_EXPORT WebView { bool disabled = false; double zoomFactor = 1.0; @@ -98,7 +94,7 @@ struct WebView }; #endif -struct Settings +struct SYNCTHINGWIDGETS_EXPORT Settings { bool firstLaunch = false; Connection connection; @@ -112,15 +108,15 @@ struct Settings #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD Systemd systemd; #endif -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT) WebView webView; #endif Dialogs::QtSettings qt; }; -Settings &values(); -void restore(); -void save(); +Settings SYNCTHINGWIDGETS_EXPORT &values(); +void SYNCTHINGWIDGETS_EXPORT restore(); +void SYNCTHINGWIDGETS_EXPORT save(); } diff --git a/tray/gui/settingsdialog.cpp b/widgets/settings/settingsdialog.cpp similarity index 99% rename from tray/gui/settingsdialog.cpp rename to widgets/settings/settingsdialog.cpp index a9da4a7..825e471 100644 --- a/tray/gui/settingsdialog.cpp +++ b/widgets/settings/settingsdialog.cpp @@ -18,7 +18,8 @@ #endif #include "ui_webviewoptionpage.h" -#include "resources/config.h" +// use meta-data of syncthingtray application here +#include "resources/../../tray/resources/config.h" #include #include @@ -720,7 +721,7 @@ WebViewOptionPage::WebViewOptionPage(QWidget *parentWidget) : WebViewOptionPage::~WebViewOptionPage() {} -#ifdef SYNCTHINGTRAY_NO_WEBVIEW +#ifdef SYNCTHINGWIDGETS_NO_WEBVIEW QWidget *WebViewOptionPage::setupWidget() { auto *label = new QLabel; @@ -733,7 +734,7 @@ QWidget *WebViewOptionPage::setupWidget() bool WebViewOptionPage::apply() { -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW if(hasBeenShown()) { auto &webView = values().webView; webView.disabled = ui()->disableCheckBox->isChecked(); @@ -746,7 +747,7 @@ bool WebViewOptionPage::apply() void WebViewOptionPage::reset() { -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW if(hasBeenShown()) { const auto &webView = values().webView; ui()->disableCheckBox->setChecked(webView.disabled); @@ -810,6 +811,6 @@ INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, LauncherOptionPage) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, SystemdOptionPage) #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, WebViewOptionPage) #endif diff --git a/tray/gui/settingsdialog.h b/widgets/settings/settingsdialog.h similarity index 94% rename from tray/gui/settingsdialog.h rename to widgets/settings/settingsdialog.h index 5e37eb1..15a0595 100644 --- a/tray/gui/settingsdialog.h +++ b/widgets/settings/settingsdialog.h @@ -1,7 +1,7 @@ #ifndef SETTINGS_DIALOG_H #define SETTINGS_DIALOG_H -#include "../application/settings.h" +#include "./settings.h" #include #include @@ -74,13 +74,13 @@ private: END_DECLARE_OPTION_PAGE #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW DECLARE_UI_FILE_BASED_OPTION_PAGE(WebViewOptionPage) #else DECLARE_OPTION_PAGE(WebViewOptionPage) #endif -class SettingsDialog : public Dialogs::SettingsDialog +class SYNCTHINGWIDGETS_EXPORT SettingsDialog : public Dialogs::SettingsDialog { Q_OBJECT public: @@ -98,7 +98,7 @@ DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, LauncherOptionPage) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, SystemdOptionPage) #endif -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, WebViewOptionPage) #endif diff --git a/tray/gui/systemdoptionpage.ui b/widgets/settings/systemdoptionpage.ui similarity index 100% rename from tray/gui/systemdoptionpage.ui rename to widgets/settings/systemdoptionpage.ui diff --git a/tray/gui/webviewoptionpage.ui b/widgets/settings/webviewoptionpage.ui similarity index 100% rename from tray/gui/webviewoptionpage.ui rename to widgets/settings/webviewoptionpage.ui diff --git a/widgets/translations/syncthingwidgets_de_DE.ts b/widgets/translations/syncthingwidgets_de_DE.ts new file mode 100644 index 0000000..d7a8737 --- /dev/null +++ b/widgets/translations/syncthingwidgets_de_DE.ts @@ -0,0 +1,937 @@ + + + + + QtGui::AppearanceOptionPage + + + Appearance + Erscheinungsbild + + + + Menu size + Größe des Menüs + + + + Optional GUI elements + Optionale Elemente + + + + Traffic statistics + Traffic-Statistiken + + + + x + + + + + px + + + + + Frame shape + Rahmenform + + + + Frame shadow + Rahmenschatten + + + + No frame + Kein Rahmen + + + + Box + + + + + Panel + + + + + Styled panel + + + + + Plain + Einfach + + + + Raised + Angehoben + + + + Sunken + Eingedrückt + + + + Tab position + Position der Tabs + + + + Top + Oben + + + + Bottom + Unten + + + + Left + Links + + + + Right + Rechts + + + + Colors + Farben + + + + Bright custom text colors (use for dark color scheme) + Helle benutzerdefinierte Schriftfarben (für dunkles Farbschema gedacht) + + + + QtGui::AutostartOptionPage + + + Autostart + Auto-Start + + + + Start the tray icon when the desktop environment launches + Tray-Icon beim Starten der Desktopumgebung automatisch starten + + + + This is achieved by adding a *.desktop file under <i>~/.config/autostart</i> so the setting only affects the current user. + Durch das Hinzufügen einer *.desktop-Datei unter <i>~/.config/autostart</i> realisiert - betrifft also nur den aktuellen Benutzer. + + + + This is achieved by adding a registry key under <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> so the setting only affects the current user. Note that the startup entry is invalidated when moving <i>syncthingtray.exe</i>. + Durch das Hinzufügen eines Registry-Schlüssels unter <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> realisiert - betrifft also nur den aktuellen Benutzer. + + + + This feature has not been implemented for your platform (yet). + Diese Funktion wurde für die aktuelle Plattform nicht nicht implementiert. + + + + unable to modify startup entry + Fehler beim aktualisieren des Auto-Start-Eintrags + + + + QtGui::ConnectionOptionPage + + + Connection + Verbindung + + + + Config label + Name der Konfig. + + + + Add secondary instance + Sekundäre Konfiguration hinzufügen + + + + Remove currently selected secondary instance + Sekundäre Konfiguration löschen + + + + It is possible to save multiple configurations. This allows switching quickly between multiple Syncthing instances using the connection button in the right corner of the tray menu. The config label is an arbitrary name to identify a configuration and does not have to match the name of the corresponding Syncthing device. + Es ist möglich, mehrere Konfigurationen zu speichern. Zwischen diesen kann anschließend über das Verbindungsmenü rechts oben im Tray schnell hin- und hergewechselt werden. Der Name der Konfiguration muss nicht mit dem Namen des entsprechenden Syncthing-Gerätes übereinstimmen. + + + + Syncthing URL + + + + + Authentication + Authentifizierung + + + + User + Benutzername + + + + Password + Passwort + + + + API key + API-Schlüssel + + + + HTTPS certificate + HTTPS-Zertifikat + + + + Insert values from local Syncthing configuration + Werte aus lokaler Syncthing-Konfiguration einfügen + + + + Errors + Fehler + + + + Status + + + + + disconnected + getrennt + + + + Apply connection settings and try to reconnect with the currently selected config + Verbindungseinstellungen übernehmen und mit neuen Einstellungen verbinden + + + + Poll interval + Abfrageintervall + + + + Traffic + + + + + + + + ms + + + + + Device statistics + Gerätestatistiken + + + + Reconnect + Verbindungsveruch + + + + no + nicht neu verbinden + + + + Auto-detected for local instance + Kann für lokale Instanz automatisch ermittelt werden + + + + Select Syncthing config file + Wähle die Syncthing-Konfigurationsdatei + + + + Unable to parse the Syncthing config file. + Fehler beim Auslesen der Syncthing-Konfigurationsdatei. + + + + Unable to load specified certificate "%1". + Fehler beim Auslesen des angegebenen Zertifikats: %1 + + + + Instance %1 + Instanz %1 + + + + QtGui::DevView + + Copy value + Wert kopieren + + + Copy name + Namen kopieren + + + Copy ID + ID kopieren + + + + QtGui::DirView + + Errors of %1 + Fehler von %1 + + + Copy value + Wert kopieren + + + Copy label/ID + Namen/ID kopieren + + + Copy path + Pfad kopieren + + + + QtGui::DownloadView + + Copy value + Wert kopieren + + + Copy label/ID + Namen/ID kopieren + + + + QtGui::LauncherOptionPage + + + Syncthing launcher + Syncthing-Starter + + + + Launch Syncthing when starting the tray icon + Starte Syncthing beim Starten des Tray-Icons + + + + Syncthing executable + Ausführbare Datei von Syncthing + + + + Arguments + Argumente + + + + Syncthing log (interleaved stdout/stderr) + Syncthing-Log (stdout/stderr) + + + + Apply and launch now + Jetzt starten + + + + Stop launched instance + Stoppen + + + + No log messages available yet + Bisher keine Log-Meldungen + + + + Ensure latest log is visible + Log folgen + + + + %1-launcher + %1-Starter + + + + Launch %1 when starting the tray icon + Starte %1 beim Starten des Tray-Icons + + + + %1 executable + Ausführbare Datei von %1 + + + + %1 log (interleaved stdout/stderr) + %1-Log (stdout/stderr) + + + + %1 exited with exit code %2 + + %1 wurde mit dem Statuscode %2 beendet + + + + %1 crashed with exit code %2 + + %1 ist mit dem Statuscode %2 abgestürzt + + + Syncthing exited with exit code %1 + + Syncthing wurde mit dem Statuscode %1 beendet + + + Syncthing crashed with exit code %1 + + Syncthing ist mit dem Statuscode %1 abgestürzt + + + + QtGui::NotificationsOptionPage + + + Notifications + Benachrichtigungen + + + + Notify on + Benachrichtigen, wenn + + + + disconnect + die Verbindung zu Syncthing getrennt wird + + + + internal errors + interne Fehler auftreten + + + + errors/notifications from Syncthing + Fehler/Warnungen von Syncthing gemeldet werden + + + + sync complete + die Synchronisierung abgeschlossen wurde + + + + Notification API + Benachrichtigungs-API + + + + D-Bus notifi&cations (org.freedesktop.Notifications) + D-Bus (org.freedesktop.Notifications) + + + + &Method provided by Qt (might be overridden by QPA plugin) + Methode die von Qt verwendet wird (kann vom QPA-Plugin überschrieben werden) + + + + Misc + Verschiedenes + + + + Ignore inavailability of Syncthing the specified number of seconds after Syncthing has been started; has only effect if the Syncthing start can be determined which is currently only supported for the local instance by checking Systemd unit status + Ignoriere, dass Syncthing ein paar Sekunden nach dem Start noch nicht verfügbar ist. Hat nur Auswirkungen, wenn der Syncthing-Startzeitpunkt ermittelt werden kann, was aktuell nur für die lokale Instanz via Systemd unterstützt wird. + + + + don't ignore + nicht ignorieren + + + + s + + + + + Configured to use D-Bus notifications but D-Bus notification daemon seems unavailabe. + Benachrichtigungen via D-Bus wurden eingestellt, aber es scheint kein Daemon zu laufen der den Dienst bereitstellt. + + + + QtGui::SettingsDialog + + + Tray + + + + + Web view + Weboberfläche + + + + Startup + Starten + + + + Settings + Einstellungen + + + + QtGui::SystemdOptionPage + + + Systemd + + + + + Show start/stop button on tray for local instance when systemd is available + Zeige Start/Stop-Button für die lokale Instanz wenn systemd verfügbar ist + + + + Syncthing unit + + + + + Description + Beschreibung + + + + Current status + Aktueller Status + + + + Unit file state + Status des Unit files + + + + + + + + unknown + unbekannt + + + + Consider systemd unit status for reconnect attempts to local instance + • Don't reconnect when unit not active/running + • Try to reconnect when unit becomes active/running + Verwende den systemd-Status für Neuverbindungsversuche zur lokalen Instanz + • Nicht versuchen neu zu verbinden, wenn die Syncthing unit nicht läuft + • Automatisch neu verbinden, wenn die Syncthing unit gestartet wird + + + + Enable + Autom. starten + + + + Disable + Nicht autom. starten + + + + Start + Starten + + + + Stop + Stoppen + + + + specified unit is either inactive or doesn't exist + angegebene Unit ist entweder nicht geladen oder existiert nicht + + + + since + seit + + + + QtGui::TrayIcon + + - internal error + - interner Fehler + + + Syncthing notification + Syncthing-Benachrichtigung + + + Web UI + Weboberfäche + + + Settings + Einstellungen + + + Rescan all + Alle neu scannen + + + About + Über Syncthing Tray + + + Close + Beenden + + + Error + Fehler + + + Syncthing notification - click to dismiss + Neue Syncthing-Benachrichtigung + + + Not connected to Syncthing - trying to reconnect every %1 ms + Nicht mit Syncthing verbunden - versuche alle %1 ms zu verbinden + + + Not connected to Syncthing + Nicht mit Syncthing verbunden + + + Disconnected from Syncthing + Verbindung zu Syncthing getrennt + + + Try to reconnect + Versuche Verbindung wieder herzustellen + + + Dismiss + Ignorieren + + + Show + Zeigen + + + Reconnecting ... + Neu verbinden ... + + + Synchronization is ongoing but at least one directory is out of sync + Synchronisiert, aber mind. ein Verzeichnis hat Fehler + + + At least one directory is out of sync + Mind. ein Verzeichnis hat Fehler + + + Notifications available + Es gibt neue Benachrichtigungen + + + Syncthing is idling + Syncthing ist im Leerlauf + + + Syncthing is scanning + Syncthing scannt + + + At least one device is paused + Mind. ein Gerät ist pausiert + + + Synchronization is ongoing + Syncthing synchronisiert + + + Synchronization of %1 complete + %1 wurde synchronisiert + + + Synchronization of the following devices complete: + + Folgende Verzeichnisse wurden synchronisiert: + + + + + QtGui::TrayWidget + + Close + Beenden + + + About + Über Syncthing Tray + + + Connect + Verbinden + + + Start + Starten + + + Settings + Einstellungen + + + Web UI + Weboberfläche + + + Traffic + Eingehender und ausgehender Datenverkehr + + + In + eing. + + + Incoming traffic + Eingehender Datenverkehr + + + unknown + unbekannt + + + Out + ausg. + + + Outgoing traffic + Ausgehender Datenverkehr + + + Click to show <i>new</i> notifications<br> +For <i>all</i> notifications, checkout the log + Klicke um <i>neue</i> Benachrichtigungen zu zeigen<br> +(für <i>alle</i> Benachrichtigungen, in den Log schauen) + + + New notifications + Neue Benachrichtigungen + + + Directories + Verzeichnisse + + + Devices + Geräte + + + Show + Zeigen + + + Dismiss + Ignorieren + + + View own device ID + Eigene Geräte-ID anzeigen + + + Restart Syncthing + Syncthing neustarten + + + Show Syncthing log + Syncthing-Log zeigen + + + Rescan all directories + Alle Verzeichnisse neu scannen + + + Connection + Verbindung + + + Own device ID + Eigene Geräte-ID + + + device ID is unknown + die Geräte-ID ist unbekannt + + + Copy to clipboard + in Zwischenablage kopieren + + + Do you really want to restart Syncthing? + Soll Syncthing wirklich neu gestartet werden? + + + Not connected to Syncthing, click to connect + Verbindung zu Syncthing getrennt, klicke um zu verbinden + + + Pause + Pausieren + + + Syncthing is running, click to pause all devices + Syncthing läuft, klicke um alle Geräte zu pausieren + + + Continue + Fortsetzen + + + At least one device is paused, click to resume + Mind. ein Gerät ist pausiert, klicke um fortzusetzen + + + The directory <i>%1</i> does not exist on the local machine. + Das Verzeichnis <i>%1</i> existiert nicht lokal. + + + The containing directory <i>%1</i> does not exist on the local machine. + Das beinhaltende Verzeichnis <i>%1</i> existiert nicht lokal. + + + The file <i>%1</i> does not exist on the local machine. + Die Datei <i>%1</i> existiert nicht (lokal). + + + Stop + Stoppen + + + + QtGui::WebViewDialog + + + Syncthing + + + + + QtGui::WebViewOptionPage + + + + General + Allgemein + + + + Usage + Verwendung + + + + Disable web view (open regular web browser instead) + Eingebaute Anzeige deaktivieren (stattdessen Standardbrowser verwenden) + + + + Zoom factor + Zoom-Faktor + + + + Hiding + Schließen + + + + Keep web view running when currently not shown + Lasse Weboberfläche im Hintgergrund weiter offen, wenn Fenster nicht offen + + + + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. +The Web UI will be opened in the default web browser instead. + Syncthing Tray wurde nicht mit Unterstützung für die eingebaute Anzeige der Weboberfläche unter Verwendung von Qt WebKit oder Qt WebEngine gebaut. +Die Weboberfläche wird stattdessen im Standardwebrowser geöffnet. + + + + Settings::restore + + + Unable to load certificate "%1" when restoring settings. + Fehler beim laden des Zertifikats "%1" beim wiederherstellen der Einstellungen. + + + + main + + Unable to + Fehler beim + + + You must configure how to connect to Syncthing when using Syncthing Tray the first time. + Vor der ersten Verwendung muss eingestellt werden, wie sich das Syncthing Tray mit Syncthing verbinden soll. + + + Note that the settings dialog allows importing URL, credentials and API-key from the local Syncthing configuration. + Der Einstellungsdialog ermöglicht es die URL, Zugangsdaten und den API-Key automatisch aus der lokalen Syncthing-Konfiguration auszulesen. + + + The system tray is (currently) not available. You could open the tray menu as a regular window using the -w flag, though. + Das System-Tray bzw. der Infobereich ist aktuell nicht verfügbar. Es wäre möglich, Syncthing Tray als normales Fenster zu starten (mit Option -w). + + + The Qt libraries have not been built with tray icon support. You could open the tray menu as a regular window using the -w flag, though. + Die verwendete Qt-Bibliothek wurde nicht mit Unterstützung für System-Tray konfiguriert. Es wäre möglich, Syncthing Tray als normales Fenster zu starten (mit Option -w). + + + diff --git a/widgets/translations/syncthingwidgets_en_US.ts b/widgets/translations/syncthingwidgets_en_US.ts new file mode 100644 index 0000000..81d24b5 --- /dev/null +++ b/widgets/translations/syncthingwidgets_en_US.ts @@ -0,0 +1,602 @@ + + + + + QtGui::AppearanceOptionPage + + + Appearance + + + + + Menu size + + + + + Optional GUI elements + + + + + Traffic statistics + + + + + x + + + + + px + + + + + Frame shape + + + + + Frame shadow + + + + + No frame + + + + + Box + + + + + Panel + + + + + Styled panel + + + + + Plain + + + + + Raised + + + + + Sunken + + + + + Tab position + + + + + Top + + + + + Bottom + + + + + Left + + + + + Right + + + + + Colors + + + + + Bright custom text colors (use for dark color scheme) + + + + + QtGui::AutostartOptionPage + + + Autostart + + + + + Start the tray icon when the desktop environment launches + + + + + This is achieved by adding a *.desktop file under <i>~/.config/autostart</i> so the setting only affects the current user. + + + + + This is achieved by adding a registry key under <i>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> so the setting only affects the current user. Note that the startup entry is invalidated when moving <i>syncthingtray.exe</i>. + + + + + This feature has not been implemented for your platform (yet). + + + + + unable to modify startup entry + + + + + QtGui::ConnectionOptionPage + + + Connection + + + + + Config label + + + + + Add secondary instance + + + + + Remove currently selected secondary instance + + + + + It is possible to save multiple configurations. This allows switching quickly between multiple Syncthing instances using the connection button in the right corner of the tray menu. The config label is an arbitrary name to identify a configuration and does not have to match the name of the corresponding Syncthing device. + + + + + Syncthing URL + + + + + Authentication + + + + + User + + + + + Password + + + + + API key + + + + + HTTPS certificate + + + + + Insert values from local Syncthing configuration + + + + + Poll interval + + + + + + + + ms + + + + + Traffic + + + + + Device statistics + + + + + Errors + + + + + Reconnect + + + + + no + + + + + Status + + + + + disconnected + + + + + Apply connection settings and try to reconnect with the currently selected config + + + + + Auto-detected for local instance + + + + + Select Syncthing config file + + + + + Unable to parse the Syncthing config file. + + + + + Unable to load specified certificate "%1". + + + + + Instance %1 + + + + + QtGui::LauncherOptionPage + + + Syncthing launcher + + + + + Launch Syncthing when starting the tray icon + + + + + Syncthing executable + + + + + Arguments + + + + + Syncthing log (interleaved stdout/stderr) + + + + + Apply and launch now + + + + + Stop launched instance + + + + + No log messages available yet + + + + + Ensure latest log is visible + + + + + %1-launcher + + + + + Launch %1 when starting the tray icon + + + + + %1 executable + + + + + %1 log (interleaved stdout/stderr) + + + + + %1 exited with exit code %2 + + + + + + %1 crashed with exit code %2 + + + + + + QtGui::NotificationsOptionPage + + + Notifications + + + + + Notify on + + + + + disconnect + + + + + internal errors + + + + + errors/notifications from Syncthing + + + + + sync complete + + + + + Notification API + + + + + D-Bus notifi&cations (org.freedesktop.Notifications) + + + + + &Method provided by Qt (might be overridden by QPA plugin) + + + + + Misc + + + + + Ignore inavailability of Syncthing the specified number of seconds after Syncthing has been started; has only effect if the Syncthing start can be determined which is currently only supported for the local instance by checking Systemd unit status + + + + + don't ignore + + + + + s + + + + + Configured to use D-Bus notifications but D-Bus notification daemon seems unavailabe. + + + + + QtGui::SettingsDialog + + + Tray + + + + + Web view + + + + + Startup + + + + + Settings + + + + + QtGui::SystemdOptionPage + + + Systemd + + + + + Show start/stop button on tray for local instance when systemd is available + + + + + Consider systemd unit status for reconnect attempts to local instance + • Don't reconnect when unit not active/running + • Try to reconnect when unit becomes active/running + + + + + Syncthing unit + + + + + Description + + + + + + + + + unknown + + + + + Current status + + + + + Start + + + + + Stop + + + + + Unit file state + + + + + Enable + + + + + Disable + + + + + specified unit is either inactive or doesn't exist + + + + + since + + + + + QtGui::WebViewDialog + + + Syncthing + + + + + QtGui::WebViewOptionPage + + + + General + + + + + Usage + + + + + Disable web view (open regular web browser instead) + + + + + Zoom factor + + + + + Hiding + + + + + Keep web view running when currently not shown + + + + + Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit or Qt WebEngine. +The Web UI will be opened in the default web browser instead. + + + + + Settings::restore + + + Unable to load certificate "%1" when restoring settings. + + + + diff --git a/tray/gui/webpage.cpp b/widgets/webview/webpage.cpp similarity index 85% rename from tray/gui/webpage.cpp rename to widgets/webview/webpage.cpp index 4fa7b13..37e5b9a 100644 --- a/tray/gui/webpage.cpp +++ b/widgets/webview/webpage.cpp @@ -1,8 +1,8 @@ -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW #include "./webpage.h" #include "./webviewdialog.h" -#include "../application/settings.h" +#include "../settings/settings.h" #include "../../connector/syncthingconnection.h" @@ -12,11 +12,11 @@ #include #include #include -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) # include # include # include -#elif defined(SYNCTHINGTRAY_USE_WEBKIT) +#elif defined(SYNCTHINGWIDGETS_USE_WEBKIT) # include # include # include @@ -28,12 +28,12 @@ using namespace Data; namespace QtGui { -WebPage::WebPage(WebViewDialog *dlg, SYNCTHINGTRAY_WEB_VIEW *view) : - SYNCTHINGTRAY_WEB_PAGE(view), +WebPage::WebPage(WebViewDialog *dlg, SYNCTHINGWIDGETS_WEB_VIEW *view) : + SYNCTHINGWIDGETS_WEB_PAGE(view), m_dlg(dlg), m_view(view) { -#ifdef SYNCTHINGTRAY_USE_WEBENGINE +#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true); connect(this, &WebPage::authenticationRequired, this, static_cast(&WebPage::supplyCredentials)); #else @@ -46,13 +46,13 @@ WebPage::WebPage(WebViewDialog *dlg, SYNCTHINGTRAY_WEB_VIEW *view) : if(!m_view) { // initialization for new window // -> delegate to external browser if no view is assigned -#ifdef SYNCTHINGTRAY_USE_WEBENGINE +#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE connect(this, &WebPage::urlChanged, this, &WebPage::delegateNewWindowToExternalBrowser); #else connect(this->mainFrame(), &QWebFrame::urlChanged, this, &WebPage::delegateNewWindowToExternalBrowser); #endif // -> there need to be a view, though - m_view = new SYNCTHINGTRAY_WEB_VIEW; + m_view = new SYNCTHINGWIDGETS_WEB_VIEW; m_view->setPage(this); } } @@ -77,13 +77,13 @@ bool WebPage::isSamePage(const QUrl &url1, const QUrl &url2) return false; } -SYNCTHINGTRAY_WEB_PAGE *WebPage::createWindow(SYNCTHINGTRAY_WEB_PAGE::WebWindowType type) +SYNCTHINGWIDGETS_WEB_PAGE *WebPage::createWindow(SYNCTHINGWIDGETS_WEB_PAGE::WebWindowType type) { Q_UNUSED(type) return new WebPage; } -#ifdef SYNCTHINGTRAY_USE_WEBENGINE +#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE bool WebPage::certificateError(const QWebEngineCertificateError &certificateError) { switch(certificateError.error()) { @@ -97,15 +97,15 @@ bool WebPage::certificateError(const QWebEngineCertificateError &certificateErro } } -bool WebPage::acceptNavigationRequest(const QUrl &url, SYNCTHINGTRAY_WEB_PAGE::NavigationType type, bool isMainFrame) +bool WebPage::acceptNavigationRequest(const QUrl &url, SYNCTHINGWIDGETS_WEB_PAGE::NavigationType type, bool isMainFrame) { Q_UNUSED(isMainFrame) Q_UNUSED(type) return handleNavigationRequest(this->url(), url); } -#else // SYNCTHINGTRAY_USE_WEBKIT -bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, SYNCTHINGTRAY_WEB_PAGE::NavigationType type) +#else // SYNCTHINGWIDGETS_USE_WEBKIT +bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, SYNCTHINGWIDGETS_WEB_PAGE::NavigationType type) { Q_UNUSED(frame) Q_UNUSED(type) @@ -156,7 +156,7 @@ bool WebPage::handleNavigationRequest(const QUrl ¤tUrl, const QUrl &target return false; } -#ifdef SYNCTHINGTRAY_USE_WEBKIT +#ifdef SYNCTHINGWIDGETS_USE_WEBKIT void WebPage::handleSslErrors(QNetworkReply *reply, const QList &errors) { Q_UNUSED(errors) @@ -168,4 +168,4 @@ void WebPage::handleSslErrors(QNetworkReply *reply, const QList &erro } -#endif // SYNCTHINGTRAY_NO_WEBVIEW +#endif // SYNCTHINGWIDGETS_NO_WEBVIEW diff --git a/tray/gui/webpage.h b/widgets/webview/webpage.h similarity index 73% rename from tray/gui/webpage.h rename to widgets/webview/webpage.h index 6b6c77c..4c09a37 100644 --- a/tray/gui/webpage.h +++ b/widgets/webview/webpage.h @@ -1,10 +1,12 @@ #ifndef WEBPAGE_H #define WEBPAGE_H -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW #include "./webviewdefs.h" #include "./webviewincludes.h" +#include "../global.h" + QT_FORWARD_DECLARE_CLASS(QAuthenticator) QT_FORWARD_DECLARE_CLASS(QNetworkReply) QT_FORWARD_DECLARE_CLASS(QNetworkRequest) @@ -14,17 +16,17 @@ namespace QtGui { class WebViewDialog; -class WebPage : public SYNCTHINGTRAY_WEB_PAGE +class SYNCTHINGWIDGETS_EXPORT WebPage : public SYNCTHINGWIDGETS_WEB_PAGE { Q_OBJECT public: - WebPage(WebViewDialog *dlg = nullptr, SYNCTHINGTRAY_WEB_VIEW *view = nullptr); + WebPage(WebViewDialog *dlg = nullptr, SYNCTHINGWIDGETS_WEB_VIEW *view = nullptr); static bool isSamePage(const QUrl &url1, const QUrl &url2); protected: - SYNCTHINGTRAY_WEB_PAGE *createWindow(WebWindowType type); -#ifdef SYNCTHINGTRAY_USE_WEBENGINE + SYNCTHINGWIDGETS_WEB_PAGE *createWindow(WebWindowType type); +#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE bool certificateError(const QWebEngineCertificateError &certificateError); bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame); #else @@ -36,7 +38,7 @@ private slots: void supplyCredentials(const QUrl &requestUrl, QAuthenticator *authenticator); void supplyCredentials(QNetworkReply *reply, QAuthenticator *authenticator); void supplyCredentials(QAuthenticator *authenticator); -#ifdef SYNCTHINGTRAY_USE_WEBKIT +#ifdef SYNCTHINGWIDGETS_USE_WEBKIT void handleSslErrors(QNetworkReply *, const QList &errors); #endif @@ -44,10 +46,10 @@ private: static bool handleNavigationRequest(const QUrl ¤tUrl, const QUrl &url); WebViewDialog *m_dlg; - SYNCTHINGTRAY_WEB_VIEW *m_view; + SYNCTHINGWIDGETS_WEB_VIEW *m_view; }; } -#endif // SYNCTHINGTRAY_NO_WEBVIEW +#endif // SYNCTHINGWIDGETS_NO_WEBVIEW #endif // WEBPAGE_H diff --git a/widgets/webview/webviewdefs.h b/widgets/webview/webviewdefs.h new file mode 100644 index 0000000..0c2e610 --- /dev/null +++ b/widgets/webview/webviewdefs.h @@ -0,0 +1,30 @@ +// Created via CMake from template webviewdefs.h.in +// WARNING! Any changes to this file will be overwritten by the next CMake run! + +#ifndef SYNCTHINGWIDGETS_WEB_VIEW_DEFINES +#define SYNCTHINGWIDGETS_WEB_VIEW_DEFINES + +#include + +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) +# define SYNCTHINGWIDGETS_WEB_VIEW QWebEngineView +# define SYNCTHINGWIDGETS_WEB_PAGE QWebEnginePage +#elif defined(SYNCTHINGWIDGETS_USE_WEBKIT) +# define SYNCTHINGWIDGETS_WEB_VIEW QWebView +# define SYNCTHINGWIDGETS_WEB_PAGE QWebPage +# define SYNCTHINGWIDGETS_WEB_FRAME QWebFrame +#elif !defined(SYNCTHINGWIDGETS_NO_WEBVIEW) +# error "No definition for web view provider present." +#endif + +#ifdef SYNCTHINGWIDGETS_WEB_VIEW +QT_FORWARD_DECLARE_CLASS(SYNCTHINGWIDGETS_WEB_VIEW) +#endif +#ifdef SYNCTHINGWIDGETS_WEB_PAGE +QT_FORWARD_DECLARE_CLASS(SYNCTHINGWIDGETS_WEB_PAGE) +#endif +#ifdef SYNCTHINGWIDGETS_WEB_FRAME +QT_FORWARD_DECLARE_CLASS(SYNCTHINGWIDGETS_WEB_FRAME) +#endif + +#endif // SYNCTHINGWIDGETS_WEB_VIEW_DEFINES diff --git a/tray/gui/webviewdialog.cpp b/widgets/webview/webviewdialog.cpp similarity index 85% rename from tray/gui/webviewdialog.cpp rename to widgets/webview/webviewdialog.cpp index c33aa83..e039d6d 100644 --- a/tray/gui/webviewdialog.cpp +++ b/widgets/webview/webviewdialog.cpp @@ -1,8 +1,8 @@ -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW #include "./webviewdialog.h" #include "./webpage.h" -#include "../application/settings.h" +#include "../settings/settings.h" #include @@ -16,16 +16,16 @@ namespace QtGui { WebViewDialog::WebViewDialog(QWidget *parent) : QMainWindow(parent), - m_view(new SYNCTHINGTRAY_WEB_VIEW(this)) + m_view(new SYNCTHINGWIDGETS_WEB_VIEW(this)) { setWindowTitle(tr("Syncthing")); setWindowIcon(QIcon(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg"))); setCentralWidget(m_view); m_view->setPage(new WebPage(this, m_view)); - connect(m_view, &SYNCTHINGTRAY_WEB_VIEW::titleChanged, this, &WebViewDialog::setWindowTitle); + connect(m_view, &SYNCTHINGWIDGETS_WEB_VIEW::titleChanged, this, &WebViewDialog::setWindowTitle); -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) m_view->installEventFilter(this); if(m_view->focusProxy()) { m_view->focusProxy()->installEventFilter(this); @@ -54,7 +54,7 @@ void QtGui::WebViewDialog::applySettings(const Data::SyncthingConnectionSettings m_view->setZoomFactor(Settings::values().webView.zoomFactor); } -#if defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBKIT) bool WebViewDialog::isModalVisible() const { if(m_view->page()->mainFrame()) { @@ -66,11 +66,11 @@ bool WebViewDialog::isModalVisible() const void WebViewDialog::closeUnlessModalVisible() { -#if defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBKIT) if(!isModalVisible()) { close(); } -#elif defined(SYNCTHINGTRAY_USE_WEBENGINE) +#elif defined(SYNCTHINGWIDGETS_USE_WEBENGINE) m_view->page()->runJavaScript(QStringLiteral("$('.modal-dialog').is(':visible')"), [this] (const QVariant &modalVisible) { if(!modalVisible.toBool()) { close(); @@ -105,7 +105,7 @@ void WebViewDialog::keyPressEvent(QKeyEvent *event) } } -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) bool WebViewDialog::eventFilter(QObject *watched, QEvent *event) { switch(event->type()) { @@ -126,4 +126,4 @@ bool WebViewDialog::eventFilter(QObject *watched, QEvent *event) } -#endif // SYNCTHINGTRAY_NO_WEBVIEW +#endif // SYNCTHINGWIDGETS_NO_WEBVIEW diff --git a/tray/gui/webviewdialog.h b/widgets/webview/webviewdialog.h similarity index 75% rename from tray/gui/webviewdialog.h rename to widgets/webview/webviewdialog.h index 39840dc..db36ab9 100644 --- a/tray/gui/webviewdialog.h +++ b/widgets/webview/webviewdialog.h @@ -1,10 +1,10 @@ #ifndef WEBVIEW_DIALOG_H #define WEBVIEW_DIALOG_H -#ifndef SYNCTHINGTRAY_NO_WEBVIEW +#ifndef SYNCTHINGWIDGETS_NO_WEBVIEW #include "./webviewdefs.h" -#include "../application/settings.h" +#include "../settings/settings.h" #include @@ -16,7 +16,7 @@ struct ConnectionSettings; namespace QtGui { -class WebViewDialog : public QMainWindow +class SYNCTHINGWIDGETS_EXPORT WebViewDialog : public QMainWindow { Q_OBJECT public: @@ -26,7 +26,7 @@ public: public slots: void applySettings(const Data::SyncthingConnectionSettings &connectionSettings); const Data::SyncthingConnectionSettings &settings() const; -#if defined(SYNCTHINGTRAY_USE_WEBKIT) +#if defined(SYNCTHINGWIDGETS_USE_WEBKIT) bool isModalVisible() const; #endif void closeUnlessModalVisible(); @@ -34,12 +34,12 @@ public slots: protected: void closeEvent(QCloseEvent *event); void keyPressEvent(QKeyEvent *event); -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) bool eventFilter(QObject *watched, QEvent *event); #endif private: - SYNCTHINGTRAY_WEB_VIEW *m_view; + SYNCTHINGWIDGETS_WEB_VIEW *m_view; Data::SyncthingConnectionSettings m_settings; }; @@ -50,5 +50,5 @@ inline const Data::SyncthingConnectionSettings &WebViewDialog::settings() const } -#endif // SYNCTHINGTRAY_NO_WEBVIEW +#endif // SYNCTHINGWIDGETS_NO_WEBVIEW #endif // WEBVIEW_DIALOG_H diff --git a/tray/gui/webviewincludes.h b/widgets/webview/webviewincludes.h similarity index 56% rename from tray/gui/webviewincludes.h rename to widgets/webview/webviewincludes.h index 8f98c0a..626c3f7 100644 --- a/tray/gui/webviewincludes.h +++ b/widgets/webview/webviewincludes.h @@ -1,20 +1,20 @@ // Created via CMake from template webviewincludes.h.in // WARNING! Any changes to this file will be overwritten by the next CMake run! -#ifndef SYNCTHINGTRAY_WEB_VIEW_INCLUDES -#define SYNCTHINGTRAY_WEB_VIEW_INCLUDES +#ifndef SYNCTHINGWIDGETS_WEB_VIEW_INCLUDES +#define SYNCTHINGWIDGETS_WEB_VIEW_INCLUDES #include -#if defined(SYNCTHINGTRAY_USE_WEBENGINE) +#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) # include # include -#elif defined(SYNCTHINGTRAY_USE_WEBKIT) +#elif defined(SYNCTHINGWIDGETS_USE_WEBKIT) # include # include # include -#elif !defined(SYNCTHINGTRAY_NO_WEBVIEW) +#elif !defined(SYNCTHINGWIDGETS_NO_WEBVIEW) # error "No definition for web view provider present." #endif -#endif // SYNCTHINGTRAY_WEB_VIEW_INCLUDES +#endif // SYNCTHINGWIDGETS_WEB_VIEW_INCLUDES