mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-03 10:00:04 -05:00
Corrected issues with desktop and tray icons in snap build
This commit is contained in:
parent
e53754d202
commit
91d746c5c0
@ -52,6 +52,9 @@ set(KEEPASSXC_VERSION_MINOR "2")
|
||||
set(KEEPASSXC_VERSION_PATCH "1")
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
||||
|
||||
# Special flag for snap builds
|
||||
set(KEEPASSXC_SNAP_BUILD OFF CACHE BOOL "Set whether this is a build for snap or not")
|
||||
|
||||
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANG 1)
|
||||
endif()
|
||||
|
@ -12,7 +12,7 @@ apps:
|
||||
keepassxc:
|
||||
command: desktop-launch keepassxc
|
||||
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
|
||||
desktop: share/applications/keepassxc.desktop
|
||||
desktop: usr/share/applications/keepassxc.desktop
|
||||
cli:
|
||||
command: keepassxc-cli
|
||||
plugs: [gsettings, home, removable-media, raw-usb]
|
||||
@ -23,6 +23,8 @@ parts:
|
||||
plugin: cmake
|
||||
configflags:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DKEEPASSXC_SNAP_BUILD=ON
|
||||
- -DWITH_TESTS=OFF
|
||||
- -DWITH_XC_AUTOTYPE=ON
|
||||
- -DWITH_XC_HTTP=ON
|
||||
@ -39,6 +41,8 @@ parts:
|
||||
- libxtst-dev
|
||||
- libyubikey-dev
|
||||
- libykpers-1-dev
|
||||
install: |
|
||||
sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/keepassxc.desktop
|
||||
after: [desktop-qt5]
|
||||
|
||||
# Redefine desktop-qt5 stage packages to work with Ubuntu 17.04
|
||||
@ -55,10 +59,12 @@ parts:
|
||||
- locales-all
|
||||
|
||||
# Overcome limitation in snapd to support URL loading (CTRL+U)
|
||||
# client needs to install "snapd-xdg-open" on their system
|
||||
snapd-xdg-open:
|
||||
source: https://github.com/ubuntu-core/snapd-xdg-open.git
|
||||
plugin: dump
|
||||
organize:
|
||||
data/xdg-open: bin/xdg-open
|
||||
source-depth: 1
|
||||
plugin: nil
|
||||
install: |
|
||||
install -D -t $SNAPCRAFT_PART_INSTALL/usr/bin/ data/xdg-open
|
||||
stage-packages:
|
||||
- dbus
|
||||
|
@ -16,6 +16,8 @@
|
||||
#cmakedefine WITH_XC_AUTOTYPE
|
||||
#cmakedefine WITH_XC_YUBIKEY
|
||||
|
||||
#cmakedefine KEEPASSXC_SNAP_BUILD
|
||||
|
||||
#cmakedefine HAVE_PR_SET_DUMPABLE 1
|
||||
#cmakedefine HAVE_RLIMIT_CORE 1
|
||||
#cmakedefine HAVE_PT_DENY_ATTACH 1
|
||||
|
@ -91,17 +91,29 @@ QString FilePath::pluginPath(const QString& name)
|
||||
|
||||
QIcon FilePath::applicationIcon()
|
||||
{
|
||||
#ifdef KEEPASSXC_SNAP_BUILD
|
||||
return icon("apps", "keepassxc", false);
|
||||
#else
|
||||
return icon("apps", "keepassxc");
|
||||
#endif
|
||||
}
|
||||
|
||||
QIcon FilePath::trayIconLocked()
|
||||
{
|
||||
#ifdef KEEPASSXC_SNAP_BUILD
|
||||
return icon("apps", "keepassxc-locked", false);
|
||||
#else
|
||||
return icon("apps", "keepassxc-locked");
|
||||
#endif
|
||||
}
|
||||
|
||||
QIcon FilePath::trayIconUnlocked()
|
||||
{
|
||||
#ifdef KEEPASSXC_SNAP_BUILD
|
||||
return icon("apps", "keepassxc-unlocked", false);
|
||||
#else
|
||||
return icon("apps", "keepassxc-unlocked");
|
||||
#endif
|
||||
}
|
||||
|
||||
QIcon FilePath::icon(const QString& category, const QString& name, bool fromTheme)
|
||||
|
Loading…
x
Reference in New Issue
Block a user