Adding direct add contact back
diff --git a/src/browsecontactdialog.cpp b/src/browsecontactdialog.cpp
index 0ec1e37..e556e0c 100644
--- a/src/browsecontactdialog.cpp
+++ b/src/browsecontactdialog.cpp
@@ -54,8 +54,8 @@
connect(ui->AddButton, SIGNAL(clicked()),
this, SLOT(onAddClicked()));
- connect(ui->CancelButton, SIGNAL(clicked()),
- this, SLOT(onCancelClicked()));
+ connect(ui->DirectAddButton, SIGNAL(clicked()),
+ this, SLOT(onDirectAddClicked()));
}
BrowseContactDialog::~BrowseContactDialog()
@@ -306,8 +306,11 @@
}
void
-BrowseContactDialog::onCancelClicked()
-{ this->close(); }
+BrowseContactDialog::onDirectAddClicked()
+{
+ emit directAddClicked();
+ this->close();
+}
void
BrowseContactDialog::closeEvent(QCloseEvent *e)
diff --git a/src/browsecontactdialog.h b/src/browsecontactdialog.h
index 8b8029f..9369d05 100644
--- a/src/browsecontactdialog.h
+++ b/src/browsecontactdialog.h
@@ -79,7 +79,7 @@
onAddClicked();
void
- onCancelClicked();
+ onDirectAddClicked();
public slots:
void
@@ -89,6 +89,9 @@
void
newContactAdded();
+ void
+ directAddClicked();
+
private:
Ui::BrowseContactDialog *ui;
diff --git a/src/browsecontactdialog.ui b/src/browsecontactdialog.ui
index 28958b9..0e9af36 100644
--- a/src/browsecontactdialog.ui
+++ b/src/browsecontactdialog.ui
@@ -13,7 +13,7 @@
<property name="windowTitle">
<string>BrowseContacts</string>
</property>
- <widget class="QWidget" name="">
+ <widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>12</x>
@@ -50,9 +50,9 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1">
<item>
- <widget class="QPushButton" name="CancelButton">
+ <widget class="QPushButton" name="DirectAddButton">
<property name="text">
- <string>Cancel</string>
+ <string>Direct Add</string>
</property>
<property name="autoDefault">
<bool>false</bool>
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index adcb32d..4ee8d71 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -119,11 +119,12 @@
connect(m_profileEditor, SIGNAL(noKeyOrCert(const QString&)),
this, SLOT(showWarning(const QString&)));
- // connect(ui->AddContactButton, SIGNAL(clicked()),
- // this, SLOT(openAddContactPanel()));
connect(ui->AddContactButton, SIGNAL(clicked()),
this, SLOT(openBrowseContactDialog()));
+ connect(m_browseContactDialog, SIGNAL(directAddClicked()),
+ this, SLOT(openAddContactPanel()));
+
connect(this, SIGNAL(refreshCertDirectory()),
m_browseContactDialog, SLOT(refreshList()));
@@ -133,6 +134,8 @@
connect(ui->settingButton, SIGNAL(clicked()),
this, SLOT(openSettingDialog()));
+ connect(m_addContactPanel, SIGNAL(newContactAdded()),
+ this, SLOT(refreshContactList()));
connect(m_browseContactDialog, SIGNAL(newContactAdded()),
this, SLOT(refreshContactList()));
connect(m_setAliasDialog, SIGNAL(aliasChanged()),