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.
|
////// We need a better popup here.
|
||||||
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid,avatar);
|
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid,avatar);
|
||||||
QMessageBox::critical(
|
|
||||||
|
QMessageBox::information(
|
||||||
parent,
|
parent,
|
||||||
QObject::tr("Add Successfully"),
|
QObject::tr("Added Contact"),
|
||||||
QObject::tr("juhu").arg(newLabel),
|
QObject::tr("successfully added your new contact").arg(newLabel),
|
||||||
QMessageBox::Ok
|
QMessageBox::Ok
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -535,12 +535,14 @@ void::MainWindow::addContact() {
|
|||||||
return;
|
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);
|
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar);
|
||||||
QMessageBox::critical(
|
QMessageBox::information(
|
||||||
this,
|
this,
|
||||||
QObject::tr("Add Successfully"),
|
QObject::tr("Added Contact"),
|
||||||
QObject::tr("juhu").arg(newLabel),
|
QObject::tr("successfully added your new contact").arg(newLabel),
|
||||||
QMessageBox::Ok
|
QMessageBox::Ok
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1555,3 +1555,14 @@ MainWindow::~MainWindow()
|
|||||||
delete wsserver;
|
delete wsserver;
|
||||||
delete wormhole;
|
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:
|
private slots:
|
||||||
|
|
||||||
|
|
||||||
|
void on_givemeZaddr_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|||||||
@@ -1598,6 +1598,32 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</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>lcdNumber</zorder>
|
||||||
<zorder>listContactWidget</zorder>
|
<zorder>listContactWidget</zorder>
|
||||||
<zorder>label_39</zorder>
|
<zorder>label_39</zorder>
|
||||||
@@ -1609,6 +1635,7 @@
|
|||||||
<zorder>safeContactRequest</zorder>
|
<zorder>safeContactRequest</zorder>
|
||||||
<zorder>pushContact</zorder>
|
<zorder>pushContact</zorder>
|
||||||
<zorder>sendContact</zorder>
|
<zorder>sendContact</zorder>
|
||||||
|
<zorder>givemeZaddr</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user