[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:03:14 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=969603a
The following commit has been merged in the master branch:
commit 969603aa7f85137f3d690e8c45d69f1b7f7cbae1
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Sat Dec 31 01:02:18 2011 +0100
Update display name in Idle
---
plugins/idle/main-options-widget.cpp | 19 +++++++++++++++++--
plugins/idle/main-options-widget.h | 1 +
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/plugins/idle/main-options-widget.cpp b/plugins/idle/main-options-widget.cpp
index f8aeb4b..4438e41 100644
--- a/plugins/idle/main-options-widget.cpp
+++ b/plugins/idle/main-options-widget.cpp
@@ -29,8 +29,8 @@ MainOptionsWidget::MainOptionsWidget(
m_ui = new Ui::MainOptionsWidget;
m_ui->setupUi(this);
- handleParameter(QLatin1String("account"), QVariant::String, m_ui->accountLineEdit, m_ui->accountLabel);
- handleParameter(QLatin1String("server"), QVariant::String, m_ui->serverLineEdit, m_ui->serverLabel);
+ handleParameter(QLatin1String("account"), QVariant::String, m_ui->accountLineEdit, m_ui->accountLabel, true);
+ handleParameter(QLatin1String("server"), QVariant::String, m_ui->serverLineEdit, m_ui->serverLabel, true);
handleParameter(QLatin1String("fullname"), QVariant::String, m_ui->fullnameLineEdit, m_ui->fullnameLabel);
QTimer::singleShot(0, m_ui->accountLineEdit, SLOT(setFocus()));
}
@@ -40,4 +40,19 @@ MainOptionsWidget::~MainOptionsWidget()
delete m_ui;
}
+void MainOptionsWidget::updateDefaultDisplayName()
+{
+ const QString &account = m_ui->accountLineEdit->text();
+ const QString &server = m_ui->serverLineEdit->text();
+ QString displayName;
+
+ if (!account.isEmpty()) {
+ displayName = account;
+ if (!server.isEmpty()) {
+ displayName.append(QString::fromLatin1(" on %1").arg(server));
+ }
+ }
+ setDefaultDisplayName(displayName);
+}
+
#include "main-options-widget.moc"
diff --git a/plugins/idle/main-options-widget.h b/plugins/idle/main-options-widget.h
index bf50f30..ace85e0 100644
--- a/plugins/idle/main-options-widget.h
+++ b/plugins/idle/main-options-widget.h
@@ -34,6 +34,7 @@ public:
QWidget *parent = 0);
virtual ~MainOptionsWidget();
+ virtual void updateDefaultDisplayName();
private:
Q_DISABLE_COPY(MainOptionsWidget);
Ui::MainOptionsWidget *m_ui;
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list