Page MenuHome GnuPG

No OneTemporary

diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 7c7ebdb..0e60aba 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,386 +1,386 @@
# SPDX-FileCopyrightText: 2023 g10 code GmbH
# SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
# SPDX-License-Identifier: BSD-2-Clause
add_definitions(-DDATAROUTDIR="${KDE_INSTALL_FULL_DATAROOTDIR}")
add_definitions(-DTRANSLATION_DOMAIN=\"gpgol-js-native\")
add_subdirectory(rootcagenerator)
add_library(gpgol-client-static STATIC)
target_sources(gpgol-client-static PRIVATE
emailviewer.cpp
emailviewer.h
websocketclient.cpp
websocketclient.h
messagedispatcher.cpp
messagedispatcher.h
firsttimedialog.cpp
firsttimedialog.h
# Identity
identity/addressvalidationjob.cpp
identity/addressvalidationjob.h
identity/identitymanager.cpp
identity/identitymanager.h
identity/identitydialog.cpp
identity/identitydialog.h
identity/identity.cpp
identity/identity.h
identity/signature.h
identity/signature.cpp
identity/signatureconfigurator.cpp
identity/signatureconfigurator.h
identity/signaturerichtexteditor.cpp
identity/signaturerichtexteditor_p.h
# Draft
draft/draft.cpp
draft/draft.h
draft/draftmanager.cpp
draft/draftmanager.h
# EWS integration
ews/ewsattachment.cpp
ews/ewsattachment.h
ews/ewsattendee.cpp
ews/ewsattendee.h
ews/ewsclient_debug.cpp
ews/ewsclient_debug.h
ews/ewsid.cpp
ews/ewsid.h
ews/ewsitem.cpp
ews/ewsitem.h
ews/ewsitemshape.cpp
ews/ewsitemshape.h
ews/ewsitembase.cpp
ews/ewsitembase.h
ews/ewsitembase_p.h
ews/ewsmailbox.cpp
ews/ewsmailbox.h
ews/ewsmessagedispatcher.cpp
ews/ewsmessagedispatcher.h
ews/ewsoccurrence.cpp
ews/ewsoccurrence.h
ews/ewspropertyfield.cpp
ews/ewspropertyfield.h
ews/ewsrecurrence.cpp
ews/ewsrecurrence.h
ews/ewsserverversion.cpp
ews/ewsserverversion.h
ews/ewstypes.cpp
ews/ewstypes.h
ews/ewsxml.cpp
ews/ewsxml.h
ews/ewscreateitemrequest.cpp
ews/ewscreateitemrequest.h
ews/ewsgetfolderrequest.cpp
ews/ewsgetfolderrequest.h
ews/ewsupdateitemrequest.cpp
ews/ewsupdateitemrequest.h
ews/ewsrequest.cpp
ews/ewsrequest.h
ews/ewsjob.cpp
ews/ewsjob.h
ews/ewsclient.cpp
ews/ewsclient.h
ews/ewsfinditemrequest.cpp
ews/ewsfinditemrequest.h
ews/ewsgetitemrequest.cpp
ews/ewsgetitemrequest.h
ews/ewsgetfolderrequest.cpp
ews/ewsgetfolderrequest.h
ews/ewsfolder.cpp
ews/ewsfolder.h
ews/ewscreatefolderrequest.cpp
ews/ewscreatefolderrequest.h
ews/ewseffectiverights.h
ews/ewseffectiverights.cpp
ews/ewsfoldershape.cpp
ews/ewsfoldershape.h
ews/ewscopyitemrequest.cpp
ews/ewscopyitemrequest.h
ews/ewsgetfoldercontentrequest.cpp
ews/ewsgetfoldercontentrequest.h
reencrypt/reencryptjob.cpp
reencrypt/reencryptjob.h
reencrypt/choosekeydialog.cpp
reencrypt/choosekeydialog.h
reencrypt/certificatelineedit.cpp
reencrypt/certificatelineedit.h
# Editor
editor/addresseelineedit.cpp
editor/addresseelineedit.h
editor/addresseelineeditmanager.cpp
editor/addresseelineeditmanager.h
editor/bodytexteditor.cpp
editor/bodytexteditor.h
editor/composerviewbase.cpp
editor/composerviewbase.h
editor/composerwindow.cpp
editor/composerwindow.h
editor/composerwindowfactory.cpp
editor/composerwindowfactory.h
editor/cryptostateindicatorwidget.cpp
editor/cryptostateindicatorwidget.h
editor/kmcomposerglobalaction.cpp
editor/kmcomposerglobalaction.h
editor/nearexpirywarning.cpp
editor/nearexpirywarning.h
editor/mailtemplates.cpp
editor/mailtemplates.h
editor/recipient.cpp
editor/recipient.h
editor/recipientline.cpp
editor/recipientline.h
editor/recipientseditor.cpp
editor/recipientseditor.h
editor/util.h
editor/util.cpp
editor/kmailcompletion.cpp
editor/kmailcompletion.h
editor/composersignatures.cpp
editor/composersignatures.h
editor/nodehelper.cpp
editor/nodehelper.h
editor/signaturecontroller.cpp
editor/signaturecontroller.h
editor/spellcheckerconfigdialog.cpp
editor/spellcheckerconfigdialog.h
# Editor job
editor/job/abstractencryptjob.h
editor/job/autocryptheadersjob.h
editor/job/contentjobbase.h
editor/job/contentjobbase_p.h
editor/job/composerjob.cpp
editor/job/composerjob.h
editor/job/encryptjob.h
editor/job/inserttextfilejob.h
editor/job/itipjob.h
editor/job/jobbase.h
editor/job/jobbase_p.h
editor/job/maintextjob.h
editor/job/multipartjob.h
editor/job/protectedheadersjob.h
editor/job/signencryptjob.h
editor/job/signjob.h
editor/job/singlepartjob.h
editor/job/skeletonmessagejob.h
editor/job/transparentjob.h
editor/job/autocryptheadersjob.cpp
editor/job/contentjobbase.cpp
editor/job/encryptjob.cpp
editor/job/inserttextfilejob.cpp
editor/job/itipjob.cpp
editor/job/jobbase.cpp
editor/job/maintextjob.cpp
editor/job/multipartjob.cpp
editor/job/protectedheadersjob.cpp
editor/job/saveasfilejob.cpp
editor/job/saveasfilejob.h
editor/job/signencryptjob.cpp
editor/job/signjob.cpp
editor/job/singlepartjob.cpp
editor/job/skeletonmessagejob.cpp
editor/job/transparentjob.cpp
## Editor Part
editor/part/globalpart.h
editor/part/infopart.h
editor/part/itippart.h
editor/part/messagepart.h
editor/part/textpart.h
editor/part/globalpart.cpp
editor/part/infopart.cpp
editor/part/itippart.cpp
editor/part/messagepart.cpp
editor/part/textpart.cpp
## Attachment
editor/attachment/attachmentjob.cpp
editor/attachment/attachmentjob.h
editor/attachment/attachmentclipboardjob.cpp
editor/attachment/attachmentclipboardjob.h
editor/attachment/attachmentcompressjob.cpp
editor/attachment/attachmentcompressjob.h
editor/attachment/attachmentcontroller.cpp
editor/attachment/attachmentcontroller.h
editor/attachment/attachmentcontrollerbase.cpp
editor/attachment/attachmentcontrollerbase.h
editor/attachment/attachmentfromfolderjob.cpp
editor/attachment/attachmentfromfolderjob.h
editor/attachment/attachmentfrommimecontentjob.cpp
editor/attachment/attachmentfrommimecontentjob.h
editor/attachment/attachmentfromurlbasejob.cpp
editor/attachment/attachmentfromurlbasejob.h
editor/attachment/attachmentfromurljob.cpp
editor/attachment/attachmentfromurljob.h
editor/attachment/attachmentfromurlutils.cpp
editor/attachment/attachmentfromurlutils.h
editor/attachment/attachmentfrompublickeyjob.cpp
editor/attachment/attachmentfrompublickeyjob.h
editor/attachment/attachmentloadjob.cpp
editor/attachment/attachmentloadjob.h
editor/attachment/attachmentmodel.cpp
editor/attachment/attachmentmodel.h
editor/attachment/attachmentpart.cpp
editor/attachment/attachmentpart.h
editor/attachment/attachmentpropertiesdialog.cpp
editor/attachment/attachmentpropertiesdialog.h
editor/attachment/attachmentupdatejob.cpp
editor/attachment/attachmentupdatejob.h
editor/attachment/attachmentview.cpp
editor/attachment/attachmentview.h
# Multiplyingline
multiplyingline/multiplyingline.cpp
multiplyingline/multiplyingline.h
multiplyingline/multiplyinglineeditor.cpp
multiplyingline/multiplyinglineeditor.h
multiplyingline/multiplyinglineview_p.cpp
multiplyingline/multiplyinglineview_p.h
# Utils
utils/kuniqueservice.h
utils/kuniqueservice.cpp
utils/systemtrayicon.h
utils/systemtrayicon.cpp
)
if (WIN32)
add_definitions(-DHAVE_QDBUS=false)
target_sources(gpgol-client-static PRIVATE utils/kuniqueservice_win.cpp)
else()
add_definitions(-DHAVE_QDBUS=true)
target_sources(gpgol-client-static PRIVATE utils/kuniqueservice_dbus.cpp)
endif()
ki18n_wrap_ui(gpgol-client-static
editor/attachment/ui/attachmentpropertiesdialog.ui
editor/attachment/ui/attachmentpropertiesdialog_readonly.ui
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER gpgol_client_debug.h
IDENTIFIER GPGOL_CLIENT_LOG
CATEGORY_NAME org.gpgol.client
DESCRIPTION "General client log"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER websocket_debug.h
IDENTIFIER WEBSOCKET_LOG
CATEGORY_NAME org.gpgol.client.websocket
DESCRIPTION "Websocket connection in the client"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER ewsresource_debug.h
IDENTIFIER EWSRES_LOG
CATEGORY_NAME org.gpgol.ews
DESCRIPTION "Ews mail client"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER ewscli_debug.h
IDENTIFIER EWSCLI_LOG
CATEGORY_NAME org.gpgol.ews.client
DESCRIPTION "ews client (gpgol-client)"
EXPORT GPGOL
)
ecm_qt_declare_logging_category(gpgol-client-static_SRCS
HEADER editor_debug.h
IDENTIFIER EDITOR_LOG
CATEGORY_NAME org.gpgol.editor
DESCRIPTION "mail composer"
EXPORT GPGOL
)
set(WARN_TOOMANY_RECIPIENTS_DEFAULT true)
set(ALLOW_SEMICOLON_AS_ADDRESS_SEPARATOR_DEFAULT true)
configure_file(editor/settings/messagecomposer.kcfg.in ${CMAKE_CURRENT_BINARY_DIR}/messagecomposer.kcfg)
kconfig_add_kcfg_files(gpgol-client-static editor/settings/messagecomposersettings.kcfgc config.kcfgc)
install(FILES composerui.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/gpgol-client)
target_sources(gpgol-client-static PUBLIC ${gpgol-client-static_SRCS})
ki18n_wrap_ui(gpgol-client-static firsttimedialog.ui)
-ki18n_wrap_ui(gpgol-client-static welcomepage.ui)
-ki18n_wrap_ui(gpgol-client-static configpage.ui)
-ki18n_wrap_ui(gpgol-client-static configurationpage.ui)
-ki18n_wrap_ui(gpgol-client-static installationpage.ui)
+ki18n_wrap_ui(gpgol-client-static confpagewelcome.ui)
+ki18n_wrap_ui(gpgol-client-static confpageinstalladdin.ui)
+ki18n_wrap_ui(gpgol-client-static confpageproxyoptions.ui)
+ki18n_wrap_ui(gpgol-client-static confpagetlscertificate.ui)
target_link_libraries(gpgol-client-static PUBLIC
common
rootcagenerator
LibGpgError::LibGpgError
Qt6::HttpServer
Qt6::Widgets
Qt6::PrintSupport
Qt6::WebSockets
KF6::I18n
KF6::JobWidgets
KF6::CalendarCore
KF6::ConfigCore
KF6::ConfigGui
KF6::Contacts
KF6::Completion
KF6::CoreAddons
KF6::ColorScheme
KF6::Codecs
KF6::GuiAddons
KF6::SonnetUi
KF6::SonnetCore
KF6::WidgetsAddons
KF6::XmlGui
KF6::Archive
KF6::KIOWidgets
KPim6::MimeTreeParserCore
KPim6::MimeTreeParserWidgets
KPim6::Libkleo
${_gpgol_dbusaddons_libs}
)
if(Gpgmepp_VERSION VERSION_GREATER_EQUAL "2.0.0")
target_compile_definitions(gpgol-client-static PUBLIC GPGME2)
endif()
set(GPGOLWEB_ICON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/icons")
file(GLOB ICONS_PNGS "${GPGOLWEB_ICON_DIR}/*.png")
file(GLOB ICONS_SVGS "${GPGOLWEB_ICON_DIR}/*.svg")
ecm_add_app_icon(_gpgol-client_SRCS ICONS ${ICONS_PNGS} ${ICONS_SVGS})
ecm_install_icons(ICONS ${ICONS_PNGS} ${ICONS_SVGS} DESTINATION ${KDE_INSTALL_ICONDIR})
if (ICONS_SVGS)
list(GET ICONS_SVGS 0 app_icon_svg)
configure_file(icons/icons.qrc.in icons.qrc @ONLY)
set(_gpgol-client_SRCS ${_gpgol-client_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/icons.qrc)
endif()
add_executable(gpgol-client main.cpp ${_gpgol-client_SRCS})
qt_add_resources(gpgol-client "manifest"
PREFIX "/gpgol-client"
FILES manifest.xml.in
)
target_link_libraries(gpgol-client PRIVATE gpgol-client-static)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
install(TARGETS gpgol-client ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES com.gnupg.gpgolweb.desktop DESTINATION ${KDE_INSTALL_APPDIR})
diff --git a/client/configpage.ui b/client/confpageinstalladdin.ui
similarity index 98%
rename from client/configpage.ui
rename to client/confpageinstalladdin.ui
index f85b049..7f6f5c2 100644
--- a/client/configpage.ui
+++ b/client/confpageinstalladdin.ui
@@ -1,194 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>ConfigPage</class>
- <widget class="QWidget" name="ConfigPage">
+ <class>ConfPageInstallAddin</class>
+ <widget class="QWidget" name="ConfPageInstallAddin">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>629</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Upload this manifest file to your Outlook account to make the add-in become available:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLineEdit" name="manifestPath">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="manifestPathOpenFolder">
<property name="toolTip">
<string>Open Folder</string>
</property>
<property name="icon">
<iconset theme="document-open-folder-symbolic"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="manifestPathCopy">
<property name="toolTip">
<string>Copy</string>
</property>
<property name="icon">
<iconset theme="edit-copy-symbolic"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Register the Outlook extension by installing it in &quot;My Add-Ins&quot; -&gt; &quot;Custom Add-Ins&quot; -&gt; &quot;Add from file...&quot;.</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignmentFlag::AlignHCenter">
<widget class="QPushButton" name="openOutlookButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Open Outlook Extension Manager</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>If extension isn't connected, please verify your browser can communicate with the GpgOL/Web service by opening this test page:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item alignment="Qt::AlignmentFlag::AlignHCenter">
<widget class="QPushButton" name="testPageButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Open test page</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignmentFlag::AlignLeft">
<widget class="QCheckBox" name="showOnStartup">
<property name="text">
<string>Show this configuration window on startup</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
<item>
<widget class="QPushButton" name="backButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="minimizeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Minimize to tray</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>manifestPath</tabstop>
<tabstop>manifestPathOpenFolder</tabstop>
<tabstop>manifestPathCopy</tabstop>
<tabstop>openOutlookButton</tabstop>
<tabstop>testPageButton</tabstop>
<tabstop>showOnStartup</tabstop>
<tabstop>minimizeButton</tabstop>
<tabstop>backButton</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
diff --git a/client/configurationpage.ui b/client/confpageproxyoptions.ui
similarity index 98%
rename from client/configurationpage.ui
rename to client/confpageproxyoptions.ui
index 84d50df..4c9d577 100644
--- a/client/configurationpage.ui
+++ b/client/confpageproxyoptions.ui
@@ -1,208 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>ConfigurationPage</class>
- <widget class="QWidget" name="ConfigurationPage">
+ <class>ConfPageProxyOptions</class>
+ <widget class="QWidget" name="ConfPageProxyOptions">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>481</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Choose your configuration for the proxy component:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Note: Changes to this setting only take effect after uploading the adjusted manifest file to Outlook on the next page!</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="localOption">
<property name="text">
<string>Run a local proxy on this machine</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="remoteOption">
<property name="text">
<string>Use proxy from a remote server (recommended for large deployments)</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="remoteServerLayout">
<item>
<widget class="QLabel" name="remoteLabel">
<property name="text">
<string>Remote proxy server</string>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>-1</number>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="remoteServer">
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>internal.company.com</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Optional features:</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="reencryptOption">
<property name="text">
<string>Reencrypt email folders with new keys</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="backButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="continueButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<bold>false</bold>
<hintingpreference>PreferDefaultHinting</hintingpreference>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>Continue</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>localOption</tabstop>
<tabstop>remoteOption</tabstop>
<tabstop>remoteServer</tabstop>
<tabstop>reencryptOption</tabstop>
<tabstop>continueButton</tabstop>
<tabstop>backButton</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
diff --git a/client/installationpage.ui b/client/confpagetlscertificate.ui
similarity index 96%
rename from client/installationpage.ui
rename to client/confpagetlscertificate.ui
index 7dd8b42..19be31d 100644
--- a/client/installationpage.ui
+++ b/client/confpagetlscertificate.ui
@@ -1,109 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>InstallationPage</class>
- <widget class="QWidget" name="InstallationPage">
+ <class>ConfPageTLSCertificate</class>
+ <widget class="QWidget" name="ConfPageTLSCertificate">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit"/>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="backButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="installButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Install certificate</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="continueButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Continue</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>plainTextEdit</tabstop>
<tabstop>continueButton</tabstop>
<tabstop>installButton</tabstop>
<tabstop>backButton</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
diff --git a/client/welcomepage.ui b/client/confpagewelcome.ui
similarity index 96%
rename from client/welcomepage.ui
rename to client/confpagewelcome.ui
index 061d1c1..1dfa9bb 100644
--- a/client/welcomepage.ui
+++ b/client/confpagewelcome.ui
@@ -1,103 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>WelcomePage</class>
- <widget class="QWidget" name="WelcomePage">
+ <class>ConfPageWelcome</class>
+ <widget class="QWidget" name="ConfPageWelcome">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="logo">
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignmentFlag::AlignHCenter">
<widget class="KTitleWidget" name="titleWelcome">
<property name="text">
<string>GpgOL/Web</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>The GnuPG Add-in for Outlook</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignmentFlag::AlignRight">
<widget class="QPushButton" name="configureButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KTitleWidget</class>
<extends>QWidget</extends>
<header>ktitlewidget.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
diff --git a/client/firsttimedialog.cpp b/client/firsttimedialog.cpp
index fc60595..ce6613c 100644
--- a/client/firsttimedialog.cpp
+++ b/client/firsttimedialog.cpp
@@ -1,313 +1,327 @@
// SPDX-FileCopyrightText: 2024 g10 code Gmbh
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "firsttimedialog.h"
#include "config.h"
#include "gpgolweb_version.h"
#include "rootcagenerator/controller.h"
-#include "ui_configpage.h"
-#include "ui_configurationpage.h"
+#include "ui_confpageinstalladdin.h"
+#include "ui_confpageproxyoptions.h"
+#include "ui_confpagetlscertificate.h"
+#include "ui_confpagewelcome.h"
#include "ui_firsttimedialog.h"
-#include "ui_installationpage.h"
-#include "ui_welcomepage.h"
#include "websocketclient.h"
#include <QCheckBox>
#include <QClipboard>
#include <QCloseEvent>
#include <QDesktopServices>
#include <QFile>
#include <QMargins>
#include <QSaveFile>
#include <QStandardPaths>
#include <QStatusBar>
#include <QStyle>
#include <QTemporaryDir>
#include <QToolBar>
#include <Libkleo/Compliance>
#include <KColorScheme>
#include <KIO/OpenFileManagerWindowJob>
#include <KTitleWidget>
using namespace Qt::StringLiterals;
FirstTimeDialog::FirstTimeDialog(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::FirstTimeDialog)
- , welcomePage(new Ui::WelcomePage)
- , configPage(new Ui::ConfigPage)
- , configurationPage(new Ui::ConfigurationPage)
- , installationPage(new Ui::InstallationPage)
+ , confPageWelcome(new Ui::ConfPageWelcome)
+ , confPageInstallAddin(new Ui::ConfPageInstallAddin)
+ , confPageProxyOptions(new Ui::ConfPageProxyOptions)
+ , confPageTLSCertificate(new Ui::ConfPageTLSCertificate)
, m_systemTrayIcon(QIcon::fromTheme(u"com.gnupg.gpgolweb"_s))
{
ui->setupUi(this);
- welcomePage->setupUi(ui->welcomePage);
- ui->welcomePage->setProperty("title", i18nc("@title", "Welcome to GpgOL/Web"));
- configurationPage->setupUi(ui->configurationPage);
- ui->configurationPage->setProperty("title", i18nc("@title", "Configure Proxy and Optional Features"));
- configPage->setupUi(ui->configPage);
- ui->configPage->setProperty("title", i18nc("@title", "Install Outlook Add-In"));
- installationPage->setupUi(ui->installationPage);
- ui->installationPage->setProperty("title", i18nc("@title", "Setting Up TLS Certificate for Local Proxy"));
-
- configurationPage->reencryptOption->setChecked(Config::self()->reencrypt());
- connect(configurationPage->reencryptOption, &QCheckBox::stateChanged, this, [](int state) {
+ confPageWelcome->setupUi(ui->confPageWelcome);
+ ui->confPageWelcome->setProperty("title", i18nc("@title", "Welcome to GpgOL/Web"));
+ confPageProxyOptions->setupUi(ui->confPageProxyOptions);
+ ui->confPageProxyOptions->setProperty("title", i18nc("@title", "Configure Proxy and Optional Features"));
+ confPageInstallAddin->setupUi(ui->confPageInstallAddin);
+ ui->confPageInstallAddin->setProperty("title", i18nc("@title", "Install Outlook Add-In"));
+ confPageTLSCertificate->setupUi(ui->confPageTLSCertificate);
+ ui->confPageTLSCertificate->setProperty("title", i18nc("@title", "Setting Up TLS Certificate for Local Proxy"));
+
+ if (ui->stack->indexOf(ui->confPageWelcome) != ConfPageWelcome) {
+ qFatal("Welcome page misplaced");
+ }
+ if (ui->stack->indexOf(ui->confPageTLSCertificate) != ConfPageTLSCertificate) {
+ qFatal("Tls certification page misplaced");
+ }
+ if (ui->stack->indexOf(ui->confPageProxyOptions) != ConfPageProxyOptions) {
+ qFatal("Proxy options page misplaced");
+ }
+ if (ui->stack->indexOf(ui->confPageInstallAddin) != ManifestPage) {
+ qFatal("Manifest install page misplaced");
+ }
+
+ confPageProxyOptions->reencryptOption->setChecked(Config::self()->reencrypt());
+ connect(confPageProxyOptions->reencryptOption, &QCheckBox::stateChanged, this, [](int state) {
Config::self()->setReencrypt(state == Qt::Checked);
Config::self()->save();
});
- auto margins = configurationPage->remoteServerLayout->contentsMargins();
+ auto margins = confPageProxyOptions->remoteServerLayout->contentsMargins();
margins.setLeft(margins.left() + style()->pixelMetric(QStyle::PM_RadioButtonLabelSpacing) + style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth));
- configurationPage->remoteServerLayout->setContentsMargins(margins);
+ confPageProxyOptions->remoteServerLayout->setContentsMargins(margins);
m_systemTrayIcon.setMainWindow(this);
m_systemTrayIcon.show();
m_backAction = new QAction(this);
connect(m_backAction, &QAction::triggered, this, [this]() {
if (Controller::certificateAlreadyGenerated() || !Config::self()->isLocalServer()) {
- ui->stack->setCurrentIndex(ui->stack->currentIndex() > 1 ? ConfigurationPage : WelcomePage);
+ ui->stack->setCurrentIndex(ui->stack->currentIndex() > 1 ? ConfPageProxyOptions : ConfPageWelcome);
} else {
- ui->stack->setCurrentIndex(ui->stack->currentIndex() == ConfigurationPage ? WelcomePage : ConfigurationPage);
+ ui->stack->setCurrentIndex(ui->stack->currentIndex() == ConfPageProxyOptions ? ConfPageWelcome : ConfPageProxyOptions);
}
});
- connect(installationPage->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
- connect(configPage->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
- connect(configurationPage->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
+ connect(confPageTLSCertificate->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
+ connect(confPageInstallAddin->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
+ connect(confPageProxyOptions->backButton, &QAbstractButton::clicked, m_backAction, &QAction::trigger);
auto toolbar = new QToolBar(this);
toolbar->setMovable(false);
auto titleWidget = new KTitleWidget(this);
toolbar->addWidget(titleWidget);
addToolBar(Qt::TopToolBarArea, toolbar);
titleWidget->setText(ui->stack->currentWidget()->property("title").toString());
connect(ui->stack, &QStackedWidget::currentChanged, this, [titleWidget, this]() {
titleWidget->setText(ui->stack->currentWidget()->property("title").toString());
});
QPixmap logo = QIcon::fromTheme(u"com.gnupg.gpgolweb"_s).pixmap(64, 64);
- welcomePage->logo->setPixmap(logo);
- welcomePage->titleWelcome->setText(i18nc("@info", "GpgOL/Web %1", QString::fromLocal8Bit(GPGOLWEB_VERSION_STRING)));
+ confPageWelcome->logo->setPixmap(logo);
+ confPageWelcome->titleWelcome->setText(i18nc("@info", "GpgOL/Web %1", QString::fromLocal8Bit(GPGOLWEB_VERSION_STRING)));
auto statusBar = new QStatusBar(this);
- configPage->showOnStartup->setChecked(Config::self()->showLauncher());
- connect(configPage->showOnStartup, &QCheckBox::toggled, this, [](bool checked) {
+ confPageInstallAddin->showOnStartup->setChecked(Config::self()->showLauncher());
+ connect(confPageInstallAddin->showOnStartup, &QCheckBox::toggled, this, [](bool checked) {
Config::self()->setShowLauncher(checked);
Config::self()->save();
});
m_status = new QLabel;
statusBar->addPermanentWidget(m_status);
auto version = new QLabel(i18nc("@info", "Version: %1", QString::fromLocal8Bit(GPGOLWEB_VERSION_STRING)));
statusBar->addPermanentWidget(version);
if (Kleo::DeVSCompliance::isActive()) {
auto statusLbl = std::make_unique<QLabel>(Kleo::DeVSCompliance::name());
{
auto statusPalette = qApp->palette();
KColorScheme::adjustForeground(statusPalette,
Kleo::DeVSCompliance::isCompliant() ? KColorScheme::NormalText : KColorScheme::NegativeText,
statusLbl->foregroundRole(),
KColorScheme::View);
statusLbl->setAutoFillBackground(true);
KColorScheme::adjustBackground(statusPalette,
Kleo::DeVSCompliance::isCompliant() ? KColorScheme::PositiveBackground : KColorScheme::NegativeBackground,
QPalette::Window,
KColorScheme::View);
statusLbl->setPalette(statusPalette);
}
statusBar->addPermanentWidget(statusLbl.release());
}
setStatusBar(statusBar);
- connect(configurationPage->continueButton, &QPushButton::clicked, this, &FirstTimeDialog::slotSetup);
- connect(welcomePage->configureButton, &QPushButton::clicked, this, [this]() {
- ui->stack->setCurrentIndex(ConfigurationPage);
+ connect(confPageProxyOptions->continueButton, &QPushButton::clicked, this, &FirstTimeDialog::slotSetup);
+ connect(confPageWelcome->configureButton, &QPushButton::clicked, this, [this]() {
+ ui->stack->setCurrentIndex(ConfPageProxyOptions);
});
- connect(installationPage->continueButton, &QPushButton::clicked, this, &FirstTimeDialog::slotSetup);
- installationPage->continueButton->setEnabled(false);
- installationPage->installButton->setVisible(false);
- installationPage->label->setVisible(false);
- connect(installationPage->installButton, &QPushButton::clicked, this, [this]() {
+ connect(confPageTLSCertificate->continueButton, &QPushButton::clicked, this, &FirstTimeDialog::slotSetup);
+ confPageTLSCertificate->continueButton->setEnabled(false);
+ confPageTLSCertificate->installButton->setVisible(false);
+ confPageTLSCertificate->label->setVisible(false);
+ connect(confPageTLSCertificate->installButton, &QPushButton::clicked, this, [this]() {
if (m_controller) {
m_controller->install();
}
});
- configPage->manifestPath->setText(QLatin1StringView(DATAROUTDIR) + u"/gpgol/manifest.xml"_s);
+ confPageInstallAddin->manifestPath->setText(QLatin1StringView(DATAROUTDIR) + u"/gpgol/manifest.xml"_s);
- connect(configPage->openOutlookButton, &QPushButton::clicked, this, []() {
+ connect(confPageInstallAddin->openOutlookButton, &QPushButton::clicked, this, []() {
QDesktopServices::openUrl(QUrl(u"https://outlook.office.com/mail/jsmvvmdeeplink/?path=/options/manageapps&bO=4"_s));
});
- connect(configPage->testPageButton, &QPushButton::clicked, this, [this]() {
+ connect(confPageInstallAddin->testPageButton, &QPushButton::clicked, this, [this]() {
QDesktopServices::openUrl(QUrl(u"https://"_s + serverDomain() + u"/test"_s));
});
- connect(configPage->minimizeButton, &QPushButton::clicked, this, &QWidget::hide);
+ connect(confPageInstallAddin->minimizeButton, &QPushButton::clicked, this, &QWidget::hide);
- connect(configPage->manifestPathCopy, &QPushButton::clicked, this, [this]() {
- QGuiApplication::clipboard()->setText(configPage->manifestPath->text());
+ connect(confPageInstallAddin->manifestPathCopy, &QPushButton::clicked, this, [this]() {
+ QGuiApplication::clipboard()->setText(confPageInstallAddin->manifestPath->text());
});
- connect(configPage->manifestPathOpenFolder, &QPushButton::clicked, this, [this]() {
+ connect(confPageInstallAddin->manifestPathOpenFolder, &QPushButton::clicked, this, [this]() {
auto job = new KIO::OpenFileManagerWindowJob();
- job->setHighlightUrls({QUrl::fromUserInput(configPage->manifestPath->text())});
+ job->setHighlightUrls({QUrl::fromUserInput(confPageInstallAddin->manifestPath->text())});
if (!qEnvironmentVariableIsEmpty("XDG_ACTIVATION_TOKEN")) {
job->setStartupId(qgetenv("XDG_ACTIVATION_TOKEN"));
}
job->start();
});
- configurationPage->remoteLabel->setEnabled(!Config::self()->isLocalServer());
- configurationPage->remoteServer->setEnabled(!Config::self()->isLocalServer());
- configurationPage->remoteServer->setText(Config::self()->remoteAddress().toString());
- configurationPage->remoteOption->setChecked(!Config::self()->isLocalServer());
+ confPageProxyOptions->remoteLabel->setEnabled(!Config::self()->isLocalServer());
+ confPageProxyOptions->remoteServer->setEnabled(!Config::self()->isLocalServer());
+ confPageProxyOptions->remoteServer->setText(Config::self()->remoteAddress().toString());
+ confPageProxyOptions->remoteOption->setChecked(!Config::self()->isLocalServer());
- connect(configurationPage->remoteOption, &QRadioButton::toggled, this, [this](bool checked) {
+ connect(confPageProxyOptions->remoteOption, &QRadioButton::toggled, this, [this](bool checked) {
Config::self()->setIsLocalServer(!checked);
Config::self()->save();
- configurationPage->remoteLabel->setEnabled(!Config::self()->isLocalServer());
- configurationPage->remoteServer->setEnabled(!Config::self()->isLocalServer());
+ confPageProxyOptions->remoteLabel->setEnabled(!Config::self()->isLocalServer());
+ confPageProxyOptions->remoteServer->setEnabled(!Config::self()->isLocalServer());
});
- connect(configurationPage->remoteServer, &QLineEdit::textChanged, this, [this]() {
- Config::self()->setRemoteAddress(QUrl::fromUserInput(configurationPage->remoteServer->text()));
+ connect(confPageProxyOptions->remoteServer, &QLineEdit::textChanged, this, [this]() {
+ Config::self()->setRemoteAddress(QUrl::fromUserInput(confPageProxyOptions->remoteServer->text()));
Config::self()->save();
});
if (Controller::certificateAlreadyGenerated() || !Config::self()->isLocalServer()) {
- ui->stack->setCurrentIndex(WelcomePage);
+ ui->stack->setCurrentIndex(ConfPageWelcome);
if (Controller::certificateAlreadyGenerated() && Config::self()->isLocalServer()) {
startLocalServer();
}
startWebsocketClient();
} else {
- ui->stack->setCurrentIndex(ConfigurationPage);
+ ui->stack->setCurrentIndex(ConfPageProxyOptions);
}
connect(&m_serverProcess, &QProcess::readyReadStandardError, this, [this]() {
qWarning().noquote() << m_serverProcess.readAllStandardError();
});
connect(&m_serverProcess, &QProcess::readyReadStandardOutput, this, [this]() {
qWarning().noquote() << m_serverProcess.readAllStandardOutput();
});
}
FirstTimeDialog::~FirstTimeDialog() = default;
void FirstTimeDialog::slotStateChanged(const QString &stateDisplay)
{
m_status->setText(stateDisplay);
}
void FirstTimeDialog::closeEvent(QCloseEvent *e)
{
e->ignore();
hide();
}
void FirstTimeDialog::slotSetup()
{
- if (configurationPage->localOption->isChecked()) {
+ if (confPageProxyOptions->localOption->isChecked()) {
if (!Controller::certificateAlreadyGenerated()) {
delete m_controller;
m_controller = new Controller(this);
installationPage->plainTextEdit->clear();
connect(m_controller, &Controller::generationDone, this, [this]() {
- installationPage->installButton->setVisible(true);
- installationPage->installButton->setEnabled(true);
- installationPage->label->setText(i18nc("@info", "About to install certificate with fingerprint: %1 ").arg(m_controller->rootFingerprint()));
- installationPage->label->setVisible(true);
- installationPage->continueButton->setVisible(false);
+ confPageTLSCertificate->installButton->setVisible(true);
+ confPageTLSCertificate->installButton->setEnabled(true);
+ confPageTLSCertificate->label->setText(
+ i18nc("@info", "About to install certificate with fingerprint: %1 ").arg(m_controller->rootFingerprint()));
+ confPageTLSCertificate->label->setVisible(true);
+ confPageTLSCertificate->continueButton->setVisible(false);
});
- ui->stack->setCurrentIndex(InstallationPage);
+ ui->stack->setCurrentIndex(ConfPageTLSCertificate);
connect(m_controller, &Controller::result, this, [this](KJob *) {
if (m_controller->error()) {
- installationPage->plainTextEdit->appendPlainText(m_controller->errorText());
+ confPageTLSCertificate->plainTextEdit->appendPlainText(m_controller->errorText());
return;
}
- installationPage->installButton->setVisible(false);
- installationPage->continueButton->setVisible(true);
- installationPage->label->setText(i18nc("@info", "Installed certificate with fingerprint: %1", m_controller->rootFingerprint()));
+ confPageTLSCertificate->installButton->setVisible(false);
+ confPageTLSCertificate->continueButton->setVisible(true);
+ confPageTLSCertificate->label->setText(i18nc("@info", "Installed certificate with fingerprint: %1", m_controller->rootFingerprint()));
- installationPage->continueButton->setEnabled(true);
+ confPageTLSCertificate->continueButton->setEnabled(true);
});
connect(m_controller, &Controller::debutOutput, this, &FirstTimeDialog::slotTlsDebutOutput);
m_controller->start();
} else {
startLocalServer();
startWebsocketClient();
generateManifest();
}
} else {
generateManifest();
}
}
void FirstTimeDialog::startLocalServer()
{
if (m_serverProcess.state() != QProcess::NotRunning) {
return;
}
m_serverProcess.start(u"gpgol-server"_s);
}
void FirstTimeDialog::startWebsocketClient()
{
const auto clientId = QUuid::createUuid().toString(QUuid::WithoutBraces);
auto &websocketClient = WebsocketClient::self(QUrl(u"wss://"_s + serverDomain() + u"/websocket"_s), clientId);
connect(&websocketClient, &WebsocketClient::stateChanged, this, &FirstTimeDialog::slotStateChanged);
connect(&websocketClient, &WebsocketClient::stateChanged, &m_systemTrayIcon, &SystemTrayIcon::slotStateChanged);
m_systemTrayIcon.slotStateChanged(websocketClient.stateDisplay());
slotStateChanged(websocketClient.stateDisplay());
}
void FirstTimeDialog::slotTlsDebutOutput(const QString &output)
{
- installationPage->plainTextEdit->appendPlainText(output);
+ confPageTLSCertificate->plainTextEdit->appendPlainText(output);
}
void FirstTimeDialog::generateManifest()
{
QFile file(u":/gpgol-client/manifest.xml.in"_s);
if (!file.open(QIODeviceBase::ReadOnly)) {
Q_ASSERT(false);
return;
}
ui->stack->setCurrentIndex(ManifestPage);
QByteArray manifest = file.readAll();
manifest.replace("%HOST%", serverDomain().toUtf8());
manifest.replace("%VERSION%", GPGOLWEB_VERSION_STRING);
const auto saveFilePath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + u"/gpgol-web-manifest.xml"_s;
QSaveFile saveFile(saveFilePath);
if (!saveFile.open(QIODeviceBase::WriteOnly)) {
Q_ASSERT(false);
return;
}
saveFile.write(manifest);
saveFile.commit();
- configPage->manifestPath->setText(QDir::toNativeSeparators(saveFilePath));
+ confPageInstallAddin->manifestPath->setText(QDir::toNativeSeparators(saveFilePath));
}
QString FirstTimeDialog::serverDomain() const
{
- return configurationPage->localOption->isChecked() ? u"localhost:5656"_s : configurationPage->remoteServer->text();
+ return confPageProxyOptions->localOption->isChecked() ? u"localhost:5656"_s : confPageProxyOptions->remoteServer->text();
}
diff --git a/client/firsttimedialog.h b/client/firsttimedialog.h
index b460d69..3131e3d 100644
--- a/client/firsttimedialog.h
+++ b/client/firsttimedialog.h
@@ -1,64 +1,64 @@
// SPDX-FileCopyrightText: 2024 g10 code Gmbh
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "utils/systemtrayicon.h"
#include <QMainWindow>
#include <QPointer>
#include <QProcess>
#include <memory>
class QLabel;
class Controller;
namespace Ui
{
class FirstTimeDialog;
-class WelcomePage;
-class ConfigPage;
-class ConfigurationPage;
-class InstallationPage;
+class ConfPageWelcome;
+class ConfPageInstallAddin;
+class ConfPageProxyOptions;
+class ConfPageTLSCertificate;
}
class FirstTimeDialog : public QMainWindow
{
Q_OBJECT
public:
explicit FirstTimeDialog(QWidget *parent = nullptr);
~FirstTimeDialog();
QString serverDomain() const;
public Q_SLOTS:
void slotStateChanged(const QString &stateDisplay);
void slotTlsDebutOutput(const QString &output);
protected:
void closeEvent(QCloseEvent *e) override;
void generateManifest();
private:
void slotSetup();
void startLocalServer();
void startWebsocketClient();
enum Page {
- WelcomePage = 0,
- ConfigurationPage = 1,
+ ConfPageWelcome = 0,
+ ConfPageProxyOptions = 1,
ManifestPage = 2,
- InstallationPage = 3,
+ ConfPageTLSCertificate = 3,
};
std::unique_ptr<Ui::FirstTimeDialog> ui;
- std::unique_ptr<Ui::WelcomePage> welcomePage;
- std::unique_ptr<Ui::ConfigPage> configPage;
- std::unique_ptr<Ui::ConfigurationPage> configurationPage;
- std::unique_ptr<Ui::InstallationPage> installationPage;
+ std::unique_ptr<Ui::ConfPageWelcome> confPageWelcome;
+ std::unique_ptr<Ui::ConfPageInstallAddin> confPageInstallAddin;
+ std::unique_ptr<Ui::ConfPageProxyOptions> confPageProxyOptions;
+ std::unique_ptr<Ui::ConfPageTLSCertificate> confPageTLSCertificate;
QAction *m_backAction;
QLabel *m_status;
QPointer<Controller> m_controller;
SystemTrayIcon m_systemTrayIcon;
QProcess m_serverProcess;
};
diff --git a/client/firsttimedialog.ui b/client/firsttimedialog.ui
index e1fda29..a5cbaae 100644
--- a/client/firsttimedialog.ui
+++ b/client/firsttimedialog.ui
@@ -1,33 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<!--
SPDX-FileCopyrightText: 2024 g10 Code GmbH
SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
SPDX-License-Identifier: GPL-2.0-or-later
-->
<class>FirstTimeDialog</class>
<widget class="QMainWindow" name="FirstTimeDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>629</width>
<height>390</height>
</rect>
</property>
<widget class="QStackedWidget" name="stack">
<property name="currentIndex">
<number>3</number>
</property>
- <widget class="QWidget" name="welcomePage">
+ <widget class="QWidget" name="confPageWelcome">
</widget>
- <widget class="QWidget" name="configurationPage">
+ <widget class="QWidget" name="confPageProxyOptions">
</widget>
- <widget class="QWidget" name="configPage">
+ <widget class="QWidget" name="confPageInstallAddin">
+ </widget>
+ <widget class="QWidget" name="confPageTLSCertificate">
</widget>
- <widget class="QWidget" name="installationPage"/>
</widget>
</widget>
<resources/>
<connections/>
</ui>

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 18, 4:34 PM (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
40/87/7006e322801192e9e4e2e5099033

Event Timeline