[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:06:27 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=c5f85f1
The following commit has been merged in the master branch:
commit c5f85f1684ac225b09d87911415a1092e18872fd
Author: Tarun Kumar Mall <c2tarun at gmail.com>
Date: Wed May 18 06:00:21 2011 +0530
A dialog box will pop if no account is found and will give the option of creating an account.
---
main-widget.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/main-widget.cpp b/main-widget.cpp
index 20e8003..52aa8e8 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -40,6 +40,7 @@
#include <TelepathyQt4/ContactManager>
#include <KDebug>
+#include <KDialog>
#include <KIO/Job>
#include <KUser>
#include <KMenu>
@@ -286,6 +287,21 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
m_accountButtonsLayout->insertStretch(-1);
QList<Tp::AccountPtr> accounts = m_accountManager->allAccounts();
+
+ if(accounts.count() == 0) {
+ KDialog *dialog = new KDialog(this);
+ dialog->setCaption(i18n("No Accounts Found"));
+ dialog->setButtons(KDialog::Ok | KDialog::Cancel);
+ dialog->setMainWidget(new QLabel(i18n("No Accounts Found")));
+ dialog->setButtonText(KDialog::Ok, i18n("Configure Accounts"));
+ dialog->setAttribute(Qt::WA_DeleteOnClose);
+ dialog->setInitialSize(dialog->sizeHint());
+ connect(dialog, SIGNAL(okClicked()), this, SLOT(showSettingsKCM()));
+ connect(dialog, SIGNAL(okClicked()), dialog, SLOT(close()));
+ connect(dialog, SIGNAL(cancelClicked()), dialog, SLOT(close()));
+ dialog->show();
+ }
+
foreach (const Tp::AccountPtr account, accounts) {
onNewAccountAdded(account);
}
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list