rpms/kdeplasma-addons/F-10 kdeplasma-addons-4.3.0-lancelot-kde#196809.patch, NONE, 1.1 kdeplasma-addons.spec, 1.18, 1.19
Ben Boeckel
mathstuf at fedoraproject.org
Sat Aug 8 02:36:08 UTC 2009
- Previous message (by thread): rpms/why/devel import.log,1.2,1.3 why.spec,1.4,1.5
- Next message (by thread): rpms/ocaml-ocamlgraph/devel ocamlgraph-1.1-no-view-graph-doc.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 import.log, 1.1, 1.2 ocaml-ocamlgraph.spec, 1.8, 1.9 sources, 1.3, 1.4 ocamlgraph-1.0-no-view-graph-doc.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mathstuf
Update of /cvs/pkgs/rpms/kdeplasma-addons/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5300
Modified Files:
kdeplasma-addons.spec
Added Files:
kdeplasma-addons-4.3.0-lancelot-kde#196809.patch
Log Message:
Backport fix for lancelot kde#196809
kdeplasma-addons-4.3.0-lancelot-kde#196809.patch:
ContactsKopete.cpp | 104 +++++++++++++++++++++++++++++++++++++----------------
ContactsKopete.h | 8 ++--
2 files changed, 78 insertions(+), 34 deletions(-)
--- NEW FILE kdeplasma-addons-4.3.0-lancelot-kde#196809.patch ---
Index: applets/lancelot/app/src/models/ContactsKopete.h
===================================================================
--- applets/lancelot/app/src/models/ContactsKopete.h (revision 1008266)
+++ applets/lancelot/app/src/models/ContactsKopete.h (revision 1008267)
@@ -31,19 +31,21 @@
ContactsKopete();
~ContactsKopete();
- void timerEvent(QTimerEvent * event);
-
protected:
void activate(int index);
void load();
+ void load(bool forceReload);
void updateContactData(const QString & contactId);
+ void timerEvent(QTimerEvent * event);
protected Q_SLOTS:
void contactChanged(const QString & contactId);
private:
org::kde::Kopete * m_interface;
- QBasicTimer m_timer;
+ QBasicTimer m_delayTimer;
+ QBasicTimer m_checkRunningTimer;
+ QStringList m_contactsToUpdate;
QString m_kopeteAvatarsDir;
bool m_kopeteRunning : 1;
bool m_noOnlineContacts : 1;
Index: applets/lancelot/app/src/models/ContactsKopete.cpp
===================================================================
--- applets/lancelot/app/src/models/ContactsKopete.cpp (revision 1008266)
+++ applets/lancelot/app/src/models/ContactsKopete.cpp (revision 1008267)
@@ -25,11 +25,12 @@
// #define UPDATE_INTERVAL 15000
#define CHECK_RUNNING_INTERVAL 5000
+#define DELAY_INTERVAL 500
namespace Models {
ContactsKopete::ContactsKopete()
- : m_interface(NULL), m_kopeteRunning(true)
+ : m_interface(NULL), m_kopeteRunning(false)
{
setSelfTitle(i18n("Contacts"));
setSelfIcon(KIcon("kopete"));
@@ -40,14 +41,27 @@
m_kopeteAvatarsDir = KStandardDirs::locate(
"data", "kopete/avatars/Contacts/");
- m_timer.start(CHECK_RUNNING_INTERVAL, this);
+ m_checkRunningTimer.start(CHECK_RUNNING_INTERVAL, this);
load();
}
void ContactsKopete::timerEvent(QTimerEvent * event)
{
- if (event->timerId() == m_timer.timerId()) {
+ if (event->timerId() == m_checkRunningTimer.timerId()) {
load();
+ } else if (event->timerId() == m_delayTimer.timerId()) {
+ qDebug() << "ContactsKopete::contactChanged [delayed]:"
+ << m_contactsToUpdate.size();
+ m_delayTimer.stop();
+ // checking whether we have a large update
+ if (m_contactsToUpdate.size() > 5) {
+ load(true);
+ } else {
+ foreach(QString contact, m_contactsToUpdate) {
+ updateContactData(contact);
+ }
+ }
+ m_contactsToUpdate.clear();
}
}
@@ -70,42 +84,65 @@
void ContactsKopete::load()
{
+ load(false);
+}
+
+void ContactsKopete::load(bool forceReload)
+{
setEmitInhibited(true);
- clear();
+ bool statusChanged = false;
+ // clear();
if (!m_interface->isValid()) {
- m_kopeteRunning = false;
- m_timer.start(CHECK_RUNNING_INTERVAL, this);
+ if (m_kopeteRunning) {
+ qDebug() << "ContactsKopete::disconnecting D-Bus";
+ disconnect(m_interface, SIGNAL(contactChanged(const QString &)),
+ this, SLOT(contactChanged(const QString &)));
+ statusChanged = true;
+ }
- if (addService("kopete")) {
- Item * item = const_cast < Item * > (& itemAt(0));
- item->title = i18n("Messaging client");
- item->description = i18n("Messaging client is not running");
- } else {
- add(i18n("Unable to find Kopete"), "",
- KIcon("application-x-executable"), QVariant("http://kopete.kde.org"));
+ if (forceReload || statusChanged) {
+ clear();
+ m_kopeteRunning = false;
+ m_checkRunningTimer.start(CHECK_RUNNING_INTERVAL, this);
+
+ if (addService("kopete")) {
+ Item * item = const_cast < Item * > (& itemAt(0));
+ item->title = i18n("Messaging client");
+ item->description = i18n("Messaging client is not running");
+ } else {
+ add(i18n("Unable to find Kopete"), "",
+ KIcon("application-x-executable"), QVariant("http://kopete.kde.org"));
+ }
}
} else {
- connect(m_interface, SIGNAL(contactChanged(const QString &)),
- this, SLOT(contactChanged(const QString &)));
+ if (!m_kopeteRunning) {
+ qDebug() << "ContactsKopete::connecting D-Bus";
+ connect(m_interface, SIGNAL(contactChanged(const QString &)),
+ this, SLOT(contactChanged(const QString &)));
+ statusChanged = true;
+ }
- m_kopeteRunning = true;
- m_noOnlineContacts = false;
- // m_timer.start(UPDATE_INTERVAL, this);
+ if (forceReload || statusChanged) {
+ qDebug() << "ContactsKopete::load: full";
+ clear();
+ m_kopeteRunning = true;
+ m_noOnlineContacts = false;
- QDBusReply < QStringList > contacts = m_interface->contactsByFilter("online");
- if (!contacts.isValid()) {
- m_kopeteRunning = false;
- return;
- }
+ QDBusReply < QStringList > contacts = m_interface->contactsByFilter("online");
+ if (!contacts.isValid()) {
+ m_kopeteRunning = false;
+ return;
+ }
- foreach (const QString& contact, contacts.value()) {
- updateContactData(contact);
- }
+ foreach (const QString& contact, contacts.value()) {
+ updateContactData(contact);
+ }
- if (size() == 0) {
- add(i18n("No online contacts"), "", KIcon("user-offline"), QVariant());
- m_noOnlineContacts = true;
+ if (size() == 0) {
+ add(i18n("No online contacts"), "", KIcon("user-offline"), QVariant());
+ m_noOnlineContacts = true;
+ }
}
}
setEmitInhibited(false);
@@ -177,8 +214,13 @@
void ContactsKopete::contactChanged(const QString & contactId)
{
- qDebug() << "ContactsKopete::contactChanged:" << contactId;
- updateContactData(contactId);
+ // qDebug() << "ContactsKopete::contactChanged:" << contactId;
+ // updateContactData(contactId);
+ // delaying the update
+ if (!m_contactsToUpdate.contains(contactId)) {
+ m_contactsToUpdate << contactId;
+ }
+ m_delayTimer.start(DELAY_INTERVAL, this);
}
} // namespace Models
Index: kdeplasma-addons.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdeplasma-addons/F-10/kdeplasma-addons.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- kdeplasma-addons.spec 5 Aug 2009 13:04:05 -0000 1.18
+++ kdeplasma-addons.spec 8 Aug 2009 02:36:08 -0000 1.19
@@ -1,6 +1,6 @@
Name: kdeplasma-addons
Version: 4.3.0
-Release: 5%{?dist}
+Release: 8%{?dist}
Summary: Additional plasmoids for KDE
Group: User Interface/Desktops
@@ -15,6 +15,9 @@ BuildRoot: %{_tmppath}/%{name}-%{ve
Patch51: kdeplasma-addons-4.2.2-krunner_contacts_not_enabledbydefault.patch
## upstream patches
+# Backported from 4.3 branch
+# Commit 1008267
+Patch101: kdeplasma-addons-4.3.0-lancelot-kde#196809.patch
BuildRequires: boost-devel
BuildRequires: eigen2-devel
@@ -71,6 +74,7 @@ Requires: kdelibs4%{?_isa} >= %{version}
%setup -q -n kdeplasma-addons-%{version}
%patch51 -p1 -b .krunner_contacts_not_enabledbydefault
+%patch101 -p0
%build
@@ -156,6 +160,16 @@ rm -rf %{buildroot}
%changelog
+* Fri Aug 07 2009 Ben Boeckel <MathStuf at gmail.com> - 4.3.0-8
+- Waited for newRepo task
+
+* Fri Aug 07 2009 Ben Boeckel <MathStuf at gmail.com> - 4.3.0-7
+- Rebuild for mising rawhide oxygen-icon-theme
+- Fix patch comments
+
+* Fri Aug 07 2009 Ben Boeckel <MathStuf at gmail.com> - 4.3.0-6
+- Add patch to fix kde#196809
+
* Tue Aug 04 2009 Than Ngo <than at redhat.com> - 4.3.0-5
- respin
- Previous message (by thread): rpms/why/devel import.log,1.2,1.3 why.spec,1.4,1.5
- Next message (by thread): rpms/ocaml-ocamlgraph/devel ocamlgraph-1.1-no-view-graph-doc.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 import.log, 1.1, 1.2 ocaml-ocamlgraph.spec, 1.8, 1.9 sources, 1.3, 1.4 ocamlgraph-1.0-no-view-graph-doc.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list