Page MenuHome GnuPG

Kleopatra: Customization Window Title and custom Logo from VERSION file
Closed, ResolvedPublic

Description

Kleopatra could allow more customization by taking a custom logo and a custom window title from config. This is useful for GnuPG VS-Desktop customization.

Event Timeline

aheinecke triaged this task as Normal priority.May 20 2022, 9:12 AM
aheinecke created this task.

To add an icon:

diff --git a/src/kleopatra.rc b/src/kleopatra.rc
index 2284dfb8..936789e5 100644
--- a/src/kleopatra.rc
+++ b/src/kleopatra.rc
@@ -1,5 +1,5 @@
 <!DOCTYPE gui >
-<gui name="kleopatra" version="509" >
+<gui name="kleopatra" version="512" >
     <MenuBar>
         <Menu name="file">
             <text>&amp;File</text>
@@ -112,6 +112,11 @@
         <Action name="view_certificate_overview"/>
         <Action name="pad_view"/>
         <Action name="manage_smartcard"/>
+        <Separator/>
+    </ToolBar>
+    <ToolBar iconSize="64" fullWidth="false" name="subtoolbar" iconText="TextBesideIcon">
+        <Separator/>
+        <Action name="help_about_custom"/>
     </ToolBar>
 
     <Menu name="listview_popup">
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 343ff328..cd7e05a9 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -499,6 +499,10 @@ void MainWindow::Private::setupActions()
             "gpg4win-compact", q, [this](bool) { forceUpdateCheck(); }, QString()
         },
 #endif
+        {
+            "help_about_custom", i18n("GnuPG\nVS-Desktop"), QString(),
+            "firewall-applet-shields_up", q, SLOT(aboutApplication()), QString(), false, true
+        },
         // View menu
         {
             "view_certificate_overview", i18nc("@action show certificate overview", "Certificates"),

Using SLOT doesn't work anymore. The "slot" needs to be a std::function<void(bool)> (e.g. a lambda) now. Moreover, the trailing false, true is not required anymore (because of suitable enum value defaults for those action_data members).

aheinecke moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 22 2022, 11:52 AM
aheinecke changed the task status from Open to Testing.Aug 25 2022, 1:08 PM
aheinecke claimed this task.
aheinecke added a subscriber: mmontkowski.

Tested and this works.

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 3 2023, 5:06 PM