~ubuntu-branches/ubuntu/karmic/kdepim/karmic-backports

« back to all changes in this revision

Viewing changes to debian/patches/kubuntu-message-indicator/0001-Started-to-implement-support-for-indicators.diff

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas, Jonathan Thomas, Jonathan Riddell
  • Date: 2009-09-14 17:50:51 UTC
  • Revision ID: james.westby@ubuntu.com-20090914175051-fouzg40tmwz2a1py
Tags: 4:4.3.1-0ubuntu3
[ Jonathan Thomas ]
* Update message indicator patches for libindicate 0.2 from 
  http://people.canonical.com/~agateau/indicate/index.html

[ Jonathan Riddell ]
* Add kubuntu_03_restore_bcc_on_resend.diff to make KMail include the BCC
  addresses while resending a message (BKO: #176590, LP: #222144)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From c4cdbc281290e05170bbfe659a2133aa83e7bb39 Mon Sep 17 00:00:00 2001
 
1
From 883880bc7bcb7d41c410ee12aa05ec0092df46e5 Mon Sep 17 00:00:00 2001
2
2
From: Aurelien Gateau <aurelien.gateau@canonical.com>
3
 
Date: Wed, 12 Aug 2009 18:30:15 +0200
 
3
Date: Wed, 16 Sep 2009 11:27:35 +0200
4
4
Subject: [PATCH 1/5] Started to implement support for indicators.
5
5
 
6
6
---
7
7
 kmail/CMakeLists.txt |    7 +++++++
8
8
 kmail/kmfolder.cpp   |   41 +++++++++++++++++++++++++++++++++++++++--
9
9
 kmail/kmfolder.h     |   10 +++++++++-
10
 
 kmail/kmkernel.cpp   |   17 +++++++++++++++++
 
10
 kmail/kmkernel.cpp   |   15 +++++++++++++++
11
11
 kmail/kmkernel.h     |    7 +++++++
12
 
 5 files changed, 79 insertions(+), 3 deletions(-)
 
12
 5 files changed, 77 insertions(+), 3 deletions(-)
13
13
 
14
14
diff --git a/kmail/CMakeLists.txt b/kmail/CMakeLists.txt
15
15
index 540770e..7203020 100644
37
37
 
38
38
 if(KMAIL_SQLITE_INDEX)
39
39
diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp
40
 
index 6e395d8..cc8c403 100644
 
40
index 6e395d8..ad3d32f 100644
41
41
--- a/kmail/kmfolder.cpp
42
42
+++ b/kmail/kmfolder.cpp
43
43
@@ -36,6 +36,9 @@
85
85
+      SLOT( updateIndicator() ) );
86
86
+    QImage image( mUnreadIconPath );
87
87
+    if ( !image.isNull() ) {
88
 
+      mIndicator->setProperty( "icon", image );
 
88
+      mIndicator->setIconProperty( image );
89
89
+    }
90
90
+    updateIndicator();
91
91
+  }
105
105
+  }
106
106
+  int count = mStorage->countUnread();
107
107
+  if ( count > 0 ) {
108
 
+    QString text = QString( "%1 (%2)" ).arg( label() ).arg( count );
109
 
+    mIndicator->setProperty( "sender", text );
 
108
+    mIndicator->setNameProperty( label() );
 
109
+    mIndicator->setCountProperty( count );
110
110
+    mIndicator->show();
111
111
+  } else {
112
112
+    mIndicator->hide();
159
159
 
160
160
 /**
161
161
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
162
 
index 616b583..c5ff868 100644
 
162
index 0f7da9a..3d271cd 100644
163
163
--- a/kmail/kmkernel.cpp
164
164
+++ b/kmail/kmkernel.cpp
165
165
@@ -84,6 +84,9 @@ using KWallet::Wallet;
180
180
   mWin = 0;
181
181
   mMailCheckAborted = false;
182
182
   folderAdaptor=0;
183
 
@@ -1441,6 +1445,19 @@ void KMKernel::init()
 
183
@@ -1458,6 +1462,17 @@ void KMKernel::init()
184
184
   // moved up here because KMMessage::stripOffPrefixes is used below
185
185
   KMMessage::readConfig();
186
186
 
187
187
+  the_indicateServer = QIndicate::Server::defaultInstance();
188
 
+  // FIXME: Using .im to show detailed info in applet, instead of indicator
189
 
+  // count
190
 
+  the_indicateServer->setType( "message.im" );
 
188
+  the_indicateServer->setType( "messaging" );
191
189
+  QString appName = KGlobal::mainComponent().componentName();
192
190
+  KService::Ptr service = KService::serviceByDesktopName( appName );
193
191
+  if ( service ) {