]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
disable context menu conditioanlly; conceal sus $0.00 bal
authorgg <chown_tee@proton.me>
Tue, 13 Jan 2026 05:37:43 +0000 (00:37 -0500)
committergg <chown_tee@proton.me>
Tue, 13 Jan 2026 05:37:43 +0000 (00:37 -0500)
src/MainWindow.cpp
src/WindowManager.cpp

index 848c2cf3e7a03a5bd01700d8cb5c019cede2294e..018a093287dd8fd583865fd111cd3f24532b1a77 100644 (file)
@@ -159,8 +159,13 @@ void MainWindow::initStatusBar() {
     m_statusLabelBalance->setText("Balance: 0 XMR");
     m_statusLabelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse);
     m_statusLabelBalance->setCursor(Qt::PointingHandCursor);
+    m_statusLabelBalance->setCursor(Qt::PointingHandCursor);
+    m_statusLabelBalance->setContextMenuPolicy(Qt::ActionsContextMenu);
     this->statusBar()->addPermanentWidget(m_statusLabelBalance);
-    connect(m_statusLabelBalance, &ClickableLabel::clicked, this, &MainWindow::showBalanceDialog);
+
+    QAction *showBalanceAction = new QAction(tr("Show details"), this);
+    connect(showBalanceAction, &QAction::triggered, this, &MainWindow::showBalanceDialog);
+    m_statusLabelBalance->addAction(showBalanceAction);
 
     m_statusBtnConnectionStatusIndicator = new StatusBarButton(icons()->icon("status_disconnected.svg"), "Connection status", this);
     connect(m_statusBtnConnectionStatusIndicator, &StatusBarButton::clicked, [this](){
@@ -235,6 +240,7 @@ void MainWindow::initStatusBar() {
     m_statusLabelStatus->addAction(scanTxAction);
 
     m_updateNetworkInfoAction = new QAction(tr("Update Network Info"), this);
+    m_updateNetworkInfoAction->setEnabled(!pauseSyncAction->isChecked());
     m_statusLabelStatus->addAction(m_updateNetworkInfoAction);
 
     connect(pauseSyncAction, &QAction::toggled, this, [this](bool checked) {
@@ -243,6 +249,7 @@ void MainWindow::initStatusBar() {
 
         m_actionDisconnectNodeOnPause->setEnabled(checked);
         m_actionDisconnectWebSocketOnPause->setEnabled(checked);
+        m_updateNetworkInfoAction->setEnabled(!checked);
 
         if (m_wallet) {
             if (checked) {
@@ -887,7 +894,11 @@ void MainWindow::onBalanceUpdated(quint64 balance, quint64 spendable) {
     if (conf()->get(Config::balanceShowFiat).toBool() && !hide) {
         QString fiatCurrency = conf()->get(Config::preferredFiatCurrency).toString();
         double balanceFiatAmount = appData()->prices.convert("XMR", fiatCurrency, balance / constants::cdiv);
-        balance_str += QString(" (%1)").arg(Utils::amountToCurrencyString(balanceFiatAmount, fiatCurrency));
+        if (balance > 0 && balanceFiatAmount == 0.0) {
+            balance_str += " (---)";
+        } else {
+            balance_str += QString(" (%1)").arg(Utils::amountToCurrencyString(balanceFiatAmount, fiatCurrency));
+        }
     }
 
     m_statusLabelBalance->setToolTip("Click for details");
index 7587b17af5b2a358f33c746a3c0a8bd5b0fbd7b5..b15cd315c64c7f8ad0a6f852f6abbf1e6e95cb3b 100644 (file)
@@ -737,7 +737,7 @@ void WindowManager::onProxySettingsChanged() {
         getNetworkSocks5()->setProxy(proxy);
     }
 
-    qWarning() << "Proxy: " << proxy.hostName() << " " << proxy.port();
+    qInfo() << "Proxy: " << proxy.hostName() << " " << proxy.port();
 
     // Switch websocket to new proxy and update URL
     websocketNotifier()->websocketClient->stop();