aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-01-24 15:22:57 -0500
committerluigi1111 <luigi1111w@gmail.com>2022-01-24 15:22:57 -0500
commitc2f706a28abbe0c317589e80277d52bd2b25fe5b (patch)
tree009021a9bfea0f0a916594ae7e71b861b0c3f721
parent4df925e8a82c72dd7b3211ca4fa096cfbd826355 (diff)
parent621c11925bb272675543b5ab428cc2ac6c0416ce (diff)
downloadmonzero-gui-c2f706a28abbe0c317589e80277d52bd2b25fe5b.tar.gz
monzero-gui-c2f706a28abbe0c317589e80277d52bd2b25fe5b.tar.xz
monzero-gui-c2f706a28abbe0c317589e80277d52bd2b25fe5b.zip
Merge pull request #3808
621c119 main: add compile time option to disable desktop entry dialog (selsta)
-rw-r--r--CMakeLists.txt5
-rw-r--r--main.qml3
-rw-r--r--src/main/main.cpp6
3 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 320f814b..4452d80e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,7 @@ option(STATIC "Link libraries statically, requires static Qt")
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
+option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
option(DEV_MODE "Checkout latest monero master on build" OFF)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
@@ -112,6 +113,10 @@ if(WITH_SCANNER)
add_definitions(-DWITH_SCANNER)
endif()
+if(WITH_DESKTOP_ENTRY)
+ add_definitions(-DWITH_DESKTOP_ENTRY)
+endif()
+
# Sodium
find_library(SODIUM_LIBRARY sodium)
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
diff --git a/main.qml b/main.qml
index f856539a..87f1e33c 100644
--- a/main.qml
+++ b/main.qml
@@ -1338,7 +1338,8 @@ ApplicationWindow {
appWindow.fiatTimerStart();
}
- if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
+ const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
+ if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
persistentSettings.askDesktopShortcut = false;
if (isTails) {
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 165f9ae1..a6a77a5b 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -503,6 +503,12 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
#endif
engine.rootContext()->setContextProperty("builtWithScanner", builtWithScanner);
+ bool builtWithDesktopEntry = false;
+#ifdef WITH_DESKTOP_ENTRY
+ builtWithDesktopEntry = true;
+#endif
+ engine.rootContext()->setContextProperty("builtWithDesktopEntry", builtWithDesktopEntry);
+
engine.rootContext()->setContextProperty("moneroVersion", MONERO_VERSION_FULL);
// Load main window (context properties needs to be defined obove this line)