add a first Button for a new HushChat Address on chattab
This commit is contained in:
@@ -212,10 +212,11 @@ void AddressBook::open(MainWindow* parent, QLineEdit* target)
|
||||
|
||||
////// We need a better popup here.
|
||||
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid,avatar);
|
||||
QMessageBox::critical(
|
||||
|
||||
QMessageBox::information(
|
||||
parent,
|
||||
QObject::tr("Add Successfully"),
|
||||
QObject::tr("juhu").arg(newLabel),
|
||||
QObject::tr("Added Contact"),
|
||||
QObject::tr("successfully added your new contact").arg(newLabel),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -535,12 +535,14 @@ void::MainWindow::addContact() {
|
||||
return;
|
||||
}
|
||||
|
||||
////// We need a better popup here.
|
||||
///////Todo: Test if label allready exist!
|
||||
|
||||
////// Success, so show it
|
||||
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar);
|
||||
QMessageBox::critical(
|
||||
QMessageBox::information(
|
||||
this,
|
||||
QObject::tr("Add Successfully"),
|
||||
QObject::tr("juhu").arg(newLabel),
|
||||
QObject::tr("Added Contact"),
|
||||
QObject::tr("successfully added your new contact").arg(newLabel),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -1554,4 +1554,15 @@ MainWindow::~MainWindow()
|
||||
|
||||
delete wsserver;
|
||||
delete wormhole;
|
||||
}
|
||||
}
|
||||
void MainWindow::on_givemeZaddr_clicked()
|
||||
{
|
||||
|
||||
bool sapling = true;
|
||||
rpc->createNewZaddr(sapling, [=] (json reply) {
|
||||
QString hushchataddr = QString::fromStdString(reply.get<json::array_t>()[0]);
|
||||
QMessageBox::information(this, "Your new Hushchataddress",hushchataddr);
|
||||
// ui->listReceiveAddresses->insertItem(0, hushchataddr);
|
||||
// ui->listReceiveAddresses->setCurrentIndex(0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,6 +95,8 @@ public slots:
|
||||
private slots:
|
||||
|
||||
|
||||
void on_givemeZaddr_clicked();
|
||||
|
||||
private:
|
||||
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
@@ -1598,6 +1598,32 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="givemeZaddr">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>10</y>
|
||||
<width>211</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New HushChat Address</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../application.qrc">
|
||||
<normaloff>:/icons/res/message-icon.svg</normaloff>:/icons/res/message-icon.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>33</width>
|
||||
<height>29</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>lcdNumber</zorder>
|
||||
<zorder>listContactWidget</zorder>
|
||||
<zorder>label_39</zorder>
|
||||
@@ -1609,6 +1635,7 @@
|
||||
<zorder>safeContactRequest</zorder>
|
||||
<zorder>pushContact</zorder>
|
||||
<zorder>sendContact</zorder>
|
||||
<zorder>givemeZaddr</zorder>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user