Skip to content
Snippets Groups Projects
Verified Commit dfb8f9a1 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix application name on Wayland in flatpak

fixes #903
parent 19e2527b
No related branches found
No related tags found
No related merge requests found
Pipeline #2609 passed
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment