@@ -81,9 +81,7 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
8181 ui->exportButton ->setIcon (platformStyle->SingleColorIcon (" :/icons/export" ));
8282 }
8383
84- switch (mode)
85- {
86- case ForSelection:
84+ if (mode == ForSelection) {
8785 switch (tab)
8886 {
8987 case SendingTab: setWindowTitle (tr (" Choose the address to send coins to" )); break ;
@@ -94,14 +92,6 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
9492 ui->tableView ->setFocus ();
9593 ui->closeButton ->setText (tr (" C&hoose" ));
9694 ui->exportButton ->hide ();
97- break ;
98- case ForEditing:
99- switch (tab)
100- {
101- case SendingTab: setWindowTitle (tr (" Sending addresses" )); break ;
102- case ReceivingTab: setWindowTitle (tr (" Receiving addresses" )); break ;
103- }
104- break ;
10595 }
10696 switch (tab)
10797 {
@@ -164,6 +154,7 @@ void AddressBookPage::setModel(AddressTableModel *_model)
164154 connect (_model, &AddressTableModel::rowsInserted, this , &AddressBookPage::selectNewAddress);
165155
166156 selectionChanged ();
157+ this ->updateWindowsTitleWithWalletName ();
167158}
168159
169160void AddressBookPage::on_copyAddress_clicked ()
@@ -328,3 +319,16 @@ void AddressBookPage::selectNewAddress(const QModelIndex &parent, int begin, int
328319 newAddressToSelect.clear ();
329320 }
330321}
322+
323+ void AddressBookPage::updateWindowsTitleWithWalletName ()
324+ {
325+ const QString walletName = this ->model ->GetWalletDisplayName ();
326+
327+ if (mode == ForEditing) {
328+ switch (tab)
329+ {
330+ case SendingTab: setWindowTitle (tr (" Sending addresses - %s" ).arg (walletName)); break ;
331+ case ReceivingTab: setWindowTitle (tr (" Receiving addresses - %s" ).arg (walletName)); break ;
332+ }
333+ }
334+ }
0 commit comments