[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:09 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=4d34323

The following commit has been merged in the master branch:
commit 4d34323b660089dee88cb9368399a0c12ab6674a
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Mon Jan 2 12:13:10 2012 +0100

    Update display name in Gabble - Facebook
---
 plugins/gabble/main-options-widget-facebook.cpp | 13 +++++++++++++
 plugins/gabble/main-options-widget-facebook.h   |  1 +
 2 files changed, 14 insertions(+)

diff --git a/plugins/gabble/main-options-widget-facebook.cpp b/plugins/gabble/main-options-widget-facebook.cpp
index 7e800be..5ef4e6b 100644
--- a/plugins/gabble/main-options-widget-facebook.cpp
+++ b/plugins/gabble/main-options-widget-facebook.cpp
@@ -39,6 +39,9 @@ MainOptionsWidgetFacebook::MainOptionsWidgetFacebook(ParameterEditModel *model,
         QString account = index.data().toString();
         //strip off any "@chat.facebook.com" from the parameter when displaying it in the text edit.
         account = account.left(account.indexOf(QLatin1Char('@')));
+        connect(m_ui->accountLineEdit,
+                SIGNAL(textChanged(QString)),
+                SLOT(updateDefaultDisplayName()));
         m_ui->accountLineEdit->setText(account);
     }
 
@@ -78,5 +81,15 @@ bool MainOptionsWidgetFacebook::validateParameterValues()
     return true;
 }
 
+void MainOptionsWidgetFacebook::updateDefaultDisplayName()
+{
+    QString displayName = m_ui->accountLineEdit->text();
+    if (!displayName.isEmpty()) {
+        displayName.append(QLatin1Char('@'));
+        QString serverAddress = parameterModel()->indexForParameter(parameterModel()->parameter(QLatin1String("server"))).data().toString();
+        displayName.append(serverAddress);
+    }
+    setDefaultDisplayName(displayName);
+}
 
 #include "main-options-widget-facebook.moc"
diff --git a/plugins/gabble/main-options-widget-facebook.h b/plugins/gabble/main-options-widget-facebook.h
index abeacc5..a49dc77 100644
--- a/plugins/gabble/main-options-widget-facebook.h
+++ b/plugins/gabble/main-options-widget-facebook.h
@@ -37,6 +37,7 @@ public:
 
     virtual void submit();
     virtual bool validateParameterValues();
+    virtual void updateDefaultDisplayName();
 private:
     Ui::MainOptionsWidgetFacebook *m_ui;
 };

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list