diff --git a/src/gui/qt-daemon/application/mainwindow.cpp b/src/gui/qt-daemon/application/mainwindow.cpp index d8ffd569..349c8133 100644 --- a/src/gui/qt-daemon/application/mainwindow.cpp +++ b/src/gui/qt-daemon/application/mainwindow.cpp @@ -643,6 +643,7 @@ bool MainWindow::show_inital() restore_pos(true); else { + m_config = AUTO_VAL_INIT(m_config); this->show(); QSize sz; sz.setHeight(770); @@ -651,6 +652,7 @@ bool MainWindow::show_inital() store_window_pos(); m_config.is_maximazed = false; m_config.is_showed = true; + m_config.disable_notifications = false; } return true; CATCH_ENTRY2(false); @@ -811,7 +813,15 @@ bool MainWindow::nativeEventFilter(const QByteArray &eventType, void *message, l CATCH_ENTRY2(false); } - +bool MainWindow::get_is_disabled_notifications() +{ + return m_config.disable_notifications; +} +bool MainWindow::set_is_disabled_notifications(const bool& param) +{ + m_config.disable_notifications = param; + return m_config.disable_notifications; +} bool MainWindow::update_wallets_info(const view::wallets_summary_info& wsi) { @@ -869,7 +879,8 @@ bool MainWindow::money_transfer(const view::transfer_event_info& tei) else if (tei.ti.unlock_time) msg += m_localization[localization_id_locked]; - show_notification(title, msg); + if(!m_config.disable_notifications) + show_notification(title, msg); return true; CATCH_ENTRY2(false); diff --git a/src/gui/qt-daemon/application/mainwindow.h b/src/gui/qt-daemon/application/mainwindow.h index ba9216fc..578892ac 100644 --- a/src/gui/qt-daemon/application/mainwindow.h +++ b/src/gui/qt-daemon/application/mainwindow.h @@ -64,6 +64,7 @@ public: std::pair m_window_size; bool is_maximazed; bool is_showed; + bool disable_notifications; }; protected slots: @@ -150,6 +151,9 @@ public: QString get_default_fee(); QString get_options(); void bool_toggle_icon(const QString& param); + + bool get_is_disabled_notifications(); + bool set_is_disabled_notifications(const bool& param); QString get_log_file(); QString check_available_sources(const QString& param); QString open_url_in_browser(const QString& param);