Fix application name on Wayland in flatpak

fixes #903
pull/928/head
Nicolas Werner 3 years ago
parent 19e2527b4b
commit dfb8f9a160
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      CMakeLists.txt
  2. 1
      io.github.NhekoReborn.Nheko.yaml
  3. 9
      src/main.cpp

@ -10,6 +10,7 @@ if(UNIX AND NOT APPLE)
else()
option(MAN "Build man page" OFF)
endif()
option(FLATPAK "Set this only if Nheko is built as a flatpak" OFF)
set(
CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchain.cmake"
@ -637,6 +638,9 @@ elseif(WIN32)
endif()
else()
target_link_libraries (nheko PRIVATE Qt5::DBus)
if (FLATPAK)
target_compile_definitions(nheko PRIVATE NHEKO_FLATPAK)
endif()
endif()
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)

@ -200,6 +200,7 @@ modules:
- -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx
- -DCOMPILE_QML=ON
- -DMAN=OFF
- -DFLATPAK=ON
buildsystem: cmake-ninja
name: nheko
sources:

@ -231,10 +231,11 @@ main(int argc, char *argv[])
#if !defined(Q_OS_MAC)
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("nheko"), QIcon{":/logos/nheko.png"}));
#endif
if (userdata.isEmpty() || userdata == QLatin1String("default"))
app.setDesktopFileName(QStringLiteral("nheko"));
else
app.setDesktopFileName("nheko[" + userdata + "]");
#ifdef NHEKO_FLATPAK
app.setDesktopFileName(QStringLiteral("io.github.NhekoReborn.Nheko"));
#else
app.setDesktopFileName(QStringLiteral("nheko"));
#endif
http::init();

Loading…
Cancel
Save