Bug 88806

Summary: systray icon similar to kmail would be very helpful
Product: knode Reporter: Erik Charlebois <erikcharlebois>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: darkbasic, montel, pete, swined, zerthurd
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch against 4.8.1

Description Erik Charlebois 2004-09-04 01:09:01 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources

The latest kmail and akregator have systray icons that have an overly with the number of unread items.

It would be really useful if knode also adopted this feature because then you wouldn't have to open any windows to know if there are things waiting for you.
Comment 1 StevenR 2005-04-25 13:21:06 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Piotr Budny 2005-11-06 22:54:54 UTC
You can apply that patches, to get system tray with static icon (you can minimalize knode without closing)

[22:52 vip@dzibutti:...BUILD/kdepim-3.4.3/knode]% diff -uN knode.cpp /tmp/knode.cpp
--- knode.cpp   2005-10-05 15:35:42.000000000 +0200
+++ /tmp/knode.cpp      2005-11-06 22:50:11.375871750 +0100
@@ -42,6 +42,15 @@
 KNMainWindow::KNMainWindow( QWidget* pWidget )
   : KMainWindow(pWidget,"mainWindow")
 {
+  //create static tray icon
+  QPixmap icon;
+  tray = new KSystemTray(this, "knode");
+  KIconLoader *loader = KGlobal::iconLoader();
+  icon = loader->loadIcon("knode", KIcon::MainToolbar);
+  tray->setPixmap(icon);
+  tray->show();
+  tray->setCaption(QString("knode"));
+
   //setupStatusBar();
   createStandardStatusBarAction();
   setStandardToolBarMenuEnabled(true);


and

[22:52 vip@dzibutti:...BUILD/kdepim-3.4.3/knode]% diff -uN knode.h /tmp/knode.h
--- knode.h     2005-10-05 15:35:42.000000000 +0200
+++ /tmp/knode.h        2005-11-06 22:50:11.375871750 +0100
@@ -23,6 +23,7 @@

 #include <kmainwindow.h>
 #include <kdialogbase.h>
+#include <ksystemtray.h>
 #include "resource.h"

 #include <qglobal.h>
@@ -63,6 +64,8 @@
   StatusbarProgressWidget *mLittleProgress;
   ProgressDialog *mProgressDialog;
   KRSqueezedTextLabel *mStatusMsgLabel;
+  KSystemTray *tray;
+
 private slots:
   void slotShowStatusMsg( const QString& );
 };
Comment 3 anupam.srivastava 2006-02-21 11:21:29 UTC
When will this patch make through the latest knode?
Comment 4 A. Mosteo 2008-03-04 15:11:48 UTC
No progress on this issue? Perhaps for KDE 4 ?
Comment 5 Maxim Treskin 2009-10-20 08:02:51 UTC
Hey, people! It is really annoying bug. Can you fix it in KDE-4.4?
Comment 6 Alex Alexandrov 2011-04-14 10:48:21 UTC
just fixed this for the latest kde4 trunk:

diff --git a/knode/knode.cpp b/knode/knode.cpp
index 55fddf7..b7e6e55 100644
--- a/knode/knode.cpp
+++ b/knode/knode.cpp
@@ -39,6 +39,11 @@
 KNMainWindow::KNMainWindow( QWidget* parent )
   : KXmlGuiWindow( parent )
 {
+  //create static tray icon
+  QPixmap icon;
+  tray = new KSystemTrayIcon("knode", this);
+  tray->show();
+
   //setupStatusBar();
   createStandardStatusBarAction();
   setStandardToolBarMenuEnabled(true);
diff --git a/knode/knode.h b/knode/knode.h
index 22f9408..5a398ab 100644
--- a/knode/knode.h
+++ b/knode/knode.h
@@ -17,6 +17,7 @@
 
 #include <kxmlguiwindow.h>
 #include <kdialog.h>
+#include <ksystemtrayicon.h>
 #include "resource.h"
 
 #include <qglobal.h>
@@ -57,6 +58,7 @@ private:
   StatusbarProgressWidget *mLittleProgress;
   ProgressDialog *mProgressDialog;
   KSqueezedTextLabel *mStatusMsgLabel;
+  KSystemTrayIcon *tray;
 private slots:
   void slotShowStatusMsg( const QString& );
 };
Comment 7 Alex Alexandrov 2011-04-14 10:56:11 UTC
oops, missed one line there...

diff --git a/knode/knode.cpp b/knode/knode.cpp
index 55fddf7..7d34795 100644
--- a/knode/knode.cpp
+++ b/knode/knode.cpp
@@ -39,6 +39,10 @@
 KNMainWindow::KNMainWindow( QWidget* parent )
   : KXmlGuiWindow( parent )
 {
+  //create static tray icon
+  tray = new KSystemTrayIcon("knode", this);
+  tray->show();
+
   //setupStatusBar();
   createStandardStatusBarAction();
   setStandardToolBarMenuEnabled(true);
diff --git a/knode/knode.h b/knode/knode.h
index 22f9408..5a398ab 100644
--- a/knode/knode.h
+++ b/knode/knode.h
@@ -17,6 +17,7 @@
 
 #include <kxmlguiwindow.h>
 #include <kdialog.h>
+#include <ksystemtrayicon.h>
 #include "resource.h"
 
 #include <qglobal.h>
@@ -57,6 +58,7 @@ private:
   StatusbarProgressWidget *mLittleProgress;
   ProgressDialog *mProgressDialog;
   KSqueezedTextLabel *mStatusMsgLabel;
+  KSystemTrayIcon *tray;
 private slots:
   void slotShowStatusMsg( const QString& );
 };
Comment 8 darkbasic 2012-03-29 23:50:43 UTC
Created attachment 70006 [details]
Patch against 4.8.1

Up.
Please upload patches as attachments.
Comment 9 Laurent Montel 2012-03-30 07:59:56 UTC
This patch just add a systray not show number of unread item :)
So ok an systray but not usefull.
Please create a patch which is usefull :)
Sorry for the moment there is not active developper for knode.
Comment 10 darkbasic 2012-03-30 10:03:42 UTC
I didn't create any patch, it's just the patch previously posted inline (which is a pain to copy paste because it doesn't recognize newline characters) bumped to 4.8.1 :)
Comment 11 Andrew Crouthamel 2018-09-04 18:42:01 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug.