Browse Source

Merge pull request #1022 from Diapolo/fix#1020

fix for #1020
0.8
Pieter Wuille 13 years ago
parent
commit
d3f220b2c2
  1. 13
      src/qt/addressbookpage.cpp

13
src/qt/addressbookpage.cpp

@ -43,15 +43,19 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
ui->tableView->setFocus(); ui->tableView->setFocus();
break; break;
case ForEditing: case ForEditing:
ui->buttonBox->hide(); ui->buttonBox->setVisible(false);
break; break;
} }
switch(tab) switch(tab)
{ {
case SendingTab: case SendingTab:
ui->labelExplanation->hide(); ui->labelExplanation->setVisible(false);
ui->deleteButton->setVisible(true);
ui->signMessage->setVisible(false);
break; break;
case ReceivingTab: case ReceivingTab:
ui->deleteButton->setVisible(false);
ui->signMessage->setVisible(true);
break; break;
} }
ui->tableView->setTabKeyNavigation(false); ui->tableView->setTabKeyNavigation(false);
@ -133,6 +137,7 @@ void AddressBookPage::on_copyToClipboard_clicked()
{ {
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address); GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address);
} }
void AddressBookPage::onCopyLabelAction() void AddressBookPage::onCopyLabelAction()
{ {
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Label); GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Label);
@ -224,14 +229,18 @@ void AddressBookPage::selectionChanged()
case SendingTab: case SendingTab:
// In sending tab, allow deletion of selection // In sending tab, allow deletion of selection
ui->deleteButton->setEnabled(true); ui->deleteButton->setEnabled(true);
ui->deleteButton->setVisible(true);
deleteAction->setEnabled(true); deleteAction->setEnabled(true);
ui->signMessage->setEnabled(false); ui->signMessage->setEnabled(false);
ui->signMessage->setVisible(false);
break; break;
case ReceivingTab: case ReceivingTab:
// Deleting receiving addresses, however, is not allowed // Deleting receiving addresses, however, is not allowed
ui->deleteButton->setEnabled(false); ui->deleteButton->setEnabled(false);
ui->deleteButton->setVisible(false);
deleteAction->setEnabled(false); deleteAction->setEnabled(false);
ui->signMessage->setEnabled(true); ui->signMessage->setEnabled(true);
ui->signMessage->setVisible(true);
break; break;
} }
ui->copyToClipboard->setEnabled(true); ui->copyToClipboard->setEnabled(true);

Loading…
Cancel
Save