From 70063b2e882787ce7a87b8669a102947c4755408 Mon Sep 17 00:00:00 2001
From: "denis.sumin" <denis.smolov@demlabs.net>
Date: Fri, 2 Aug 2024 10:06:23 +0300
Subject: [PATCH] fix win open dirs

---
 CellframeNodeTray/NodeTrayCommandController.cpp | 2 +-
 CellframeNodeTray/main.qml                      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CellframeNodeTray/NodeTrayCommandController.cpp b/CellframeNodeTray/NodeTrayCommandController.cpp
index fefbcce..270fc70 100644
--- a/CellframeNodeTray/NodeTrayCommandController.cpp
+++ b/CellframeNodeTray/NodeTrayCommandController.cpp
@@ -253,7 +253,7 @@ QString NodeTrayCommandController::getConfigPath()
     std::wstring path;
     GetStringRegKey(hKey, L"Common Documents", path, L"");
     std::string stdpath(path.begin(),path.end());
-    return QString::fromWCharArray(path.c_str());
+    return QString(QString::fromWCharArray(path.c_str()) + "/cellframe-node");
 #endif
 }
 
diff --git a/CellframeNodeTray/main.qml b/CellframeNodeTray/main.qml
index 46d7af7..3e02d5e 100644
--- a/CellframeNodeTray/main.qml
+++ b/CellframeNodeTray/main.qml
@@ -57,17 +57,17 @@ ApplicationWindow {
                 }
             }
             MenuItem {
-                visible: CURRENT_OS === "win" ? true : CURRENT_OS === "macos" ? false : autostartItemMenu.status
+                visible: CURRENT_OS === "macos" ? false : autostartItemMenu.status
                 text: qsTr("Stop cellframe-node")
                 onTriggered: trayCommandController.serviceCommand(3)
             }
             MenuItem {
-                visible: CURRENT_OS === "win" ? true : CURRENT_OS === "macos" ? false : autostartItemMenu.status
+                visible: CURRENT_OS === "macos" ? false : autostartItemMenu.status
                 text: qsTr("Start cellframe-node")
                 onTriggered: trayCommandController.serviceCommand(4)
             }
             MenuItem {
-                visible: CURRENT_OS === "win" ? true : CURRENT_OS === "macos" ? false : autostartItemMenu.status
+                visible: CURRENT_OS === "macos" ? false : autostartItemMenu.status
                 text: qsTr("Restart cellframe-node")
                 onTriggered: trayCommandController.serviceCommand(5)
             }
-- 
GitLab