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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=b792bbb

The following commit has been merged in the master branch:
commit b792bbbc1f7e99dac18efc78ce58bb678d01a8f2
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Tue Sep 27 20:18:19 2011 +0200

    Remove the special KLineEdit for setting presence message
---
 global-presence-chooser.cpp | 14 +++++---------
 global-presence-chooser.h   |  2 --
 main-widget.cpp             | 23 -----------------------
 main-widget.h               |  1 -
 main-widget.ui              | 10 ----------
 5 files changed, 5 insertions(+), 45 deletions(-)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 4801c62..e2c880b 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -14,7 +14,7 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
     m_globalPresence(new GlobalPresence(this))
 {
     setInsertPolicy(NoInsert);
-    setTrapReturnKey(true);
+    //setTrapReturnKey(true);
     addItem(KIcon("user-online"), i18n("Available"), qVariantFromValue(Tp::Presence::available()));
     addItem(KIcon("user-away"), i18n("Away"), qVariantFromValue(Tp::Presence::away()));
     addItem(KIcon("user-away"), i18n("Be Right Back"), qVariantFromValue(Tp::Presence::brb()));
@@ -60,14 +60,6 @@ void GlobalPresenceChooser::onPresenceChanged(const Tp::Presence &presence)
     //FIXME if we can't find the correct value, create an entry.
 }
 
-// void GlobalPresenceChooser::enterEvent(QEvent* event)
-// {
-// }
-//
-// void GlobalPresenceChooser::leaveEvent(QEvent* event)
-// {
-// }
-
 void GlobalPresenceChooser::onPresenceMessageChanged(const QString &message)
 {
     Tp::Presence presence = m_globalPresence->currentPresence();
@@ -91,7 +83,11 @@ void GlobalPresenceChooser::onPresenceMessageChanged(const QString &message)
     if (!presenceExists) {
         qDebug() << "Adding new presence";
         insertItem(currentPresenceIndex, itemIcon(currentIndex()), message, qVariantFromValue(presence));
+        setCurrentIndex(currentPresenceIndex);
+        m_globalPresence->setPresence(presence);
     }
+
+    setEditable(false);
 }
 
 void GlobalPresenceChooser::mousePressEvent(QMouseEvent *event)
diff --git a/global-presence-chooser.h b/global-presence-chooser.h
index 52c46f5..248e73b 100644
--- a/global-presence-chooser.h
+++ b/global-presence-chooser.h
@@ -17,8 +17,6 @@ public:
     void setAccountManager(const Tp::AccountManagerPtr &accountManager);
 
 protected:
-//     void enterEvent(QEvent *event);
-//     void leaveEvent(QEvent *event);
     void mousePressEvent(QMouseEvent *event);
     void focusOutEvent(QFocusEvent *event);
 
diff --git a/main-widget.cpp b/main-widget.cpp
index 3a74345..c10e075 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -262,9 +262,6 @@ MainWidget::MainWidget(QWidget *parent)
     connect(m_searchContactAction, SIGNAL(triggered(bool)),
             this, SLOT(toggleSearchWidget(bool)));
 
-    connect(m_presenceMessageEdit, SIGNAL(returnPressed(QString)),
-            this, SLOT(setCustomPresenceMessage(QString)));
-
     connect(m_avatarButton, SIGNAL(operationFinished(Tp::PendingOperation*)),
             this, SLOT(onGenericOperationFinished(Tp::PendingOperation*)));
 
@@ -1202,26 +1199,6 @@ void MainWidget::onUnblockContactTriggered()
             SLOT(onGenericOperationFinished(Tp::PendingOperation*)));
 }
 
-
-void MainWidget::setCustomPresenceMessage(const QString& message)
-{
-    //loop through all enabled account setting to the same presence but with a new presence message.
-    foreach(const Tp::AccountPtr account, m_accountManager->allAccounts()) {
-        if (! account->isEnabled()) {
-            continue;
-        }
-
-        Tp::SimplePresence presence;
-        presence.type = account->currentPresence().type();
-        presence.status = account->currentPresence().status();
-        presence.statusMessage = message;
-
-        account->setRequestedPresence(presence);
-    }
-
-    m_presenceMessageEdit->clearFocus();
-}
-
 void MainWidget::showSettingsKCM()
 {
     KSettings::Dialog *dialog = new KSettings::Dialog(this);
diff --git a/main-widget.h b/main-widget.h
index b04cbd0..4b2b43f 100644
--- a/main-widget.h
+++ b/main-widget.h
@@ -77,7 +77,6 @@ public Q_SLOTS:
     void onAddContactRequestFoundContacts(Tp::PendingOperation *operation);
     void onNewAccountAdded(const Tp::AccountPtr &account);
     void toggleSearchWidget(bool show);
-    void setCustomPresenceMessage(const QString &message);
     void showSettingsKCM();
     void showMessageToUser(const QString &text, const SystemMessageType type);
     void showInfo(ContactModelItem *contactItem);
diff --git a/main-widget.ui b/main-widget.ui
index 42725fe..d4b4be4 100644
--- a/main-widget.ui
+++ b/main-widget.ui
@@ -29,16 +29,6 @@
       <property name="verticalSpacing">
        <number>0</number>
       </property>
-      <item row="1" column="1">
-       <widget class="KLineEdit" name="m_presenceMessageEdit">
-        <property name="placeholderText">
-         <string>Set your status message here...</string>
-        </property>
-        <property name="showClearButton" stdset="0">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
       <item row="0" column="1">
        <widget class="QLabel" name="m_userAccountNameLabel">
         <property name="text">

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list