[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeplasma-addons/libs/lancelot-datamodels
From:       Ivan Čukić <ivan.cukic () kde ! org>
Date:       2010-11-10 21:48:14
Message-ID: 20101110214814.3F2F1AC89E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1195344 by ivan:

adding some i18n strings just in case



 M  +4 -0      ContactsKopete.cpp  
 M  +16 -5     MessagesKmail.cpp  
 M  +1 -0      MessagesKmail.h  


--- trunk/KDE/kdeplasma-addons/libs/lancelot-datamodels/ContactsKopete.cpp \
#1195343:1195344 @@ -176,7 +176,11 @@
             if (size() == 0) {
                 add(i18n("No online contacts"), "", KIcon("user-offline"), \
QVariant());  d->noOnlineContacts = true;
+                setSelfTitle(i18n("Contacts"));
+            } else {
+                setSelfTitle(i18nc("Contacts (number of online contacts)", "Contacts \
(%1)", QString::number(size())));  }
+
         }
     }
 
--- trunk/KDE/kdeplasma-addons/libs/lancelot-datamodels/MessagesKmail.cpp \
#1195343:1195344 @@ -34,6 +34,12 @@
 
 #ifndef LANCELOT_DATAMODELS_HAS_PIMLIBS
 
+// just in case messages:
+I18N_NOOP("Unread messages");
+I18N_NOOP("Unable to find Kontact");
+I18N_NOOP("Start Akonadi server");
+I18N_NOOP("Akonadi server not running");
+
 #warning "Pimlibs are not present"
 
     #define DummyModelClassName MessagesKmail
@@ -145,13 +151,13 @@
     d->monitor->fetchCollection(true);
 
     connect(d->monitor, SIGNAL(collectionAdded(const Akonadi::Collection &, const \
                Akonadi::Collection &)),
-            this, SLOT(update()));
+            this, SLOT(updateLater()));
     connect(d->monitor, SIGNAL(collectionRemoved(const Akonadi::Collection &)),
-            this, SLOT(update()));
+            this, SLOT(updateLater()));
     connect(d->monitor, SIGNAL(collectionChanged(const Akonadi::Collection &)),
-            this, SLOT(update()));
+            this, SLOT(updateLater()));
     connect(d->monitor, SIGNAL(collectionStatisticsChanged(Akonadi::Collection::Id, \
                const Akonadi::CollectionStatistics &)),
-            this, SLOT(update()));
+            this, SLOT(updateLater()));
 
     load();
 }
@@ -162,9 +168,14 @@
     delete d;
 }
 
+void MessagesKmail::updateLater()
+{
+    QTimer::singleShot(200, this, SLOT(update()));
+}
+
 void MessagesKmail::update()
 {
-    QTimer::singleShot(200, this, SLOT(load()));
+    load();
 }
 
 void MessagesKmail::activate(int index)
--- trunk/KDE/kdeplasma-addons/libs/lancelot-datamodels/MessagesKmail.h \
#1195343:1195344 @@ -55,6 +55,7 @@
     L_Override QString selfShortTitle() const;
 
 protected Q_SLOTS:
+    void updateLater();
     void update();
 
 private:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic