forked from lthn/blockchain
added support of disableing notifications for JS code
This commit is contained in:
parent
3b29f57104
commit
3babaa4f07
2 changed files with 17 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
std::pair<int64_t, int64_t> 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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue