[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/certmanager/kwatchgnupg
From: Steffen Hansen <hansen () kde ! org>
Date: 2004-03-13 3:03:12
Message-ID: 20040313030312.743A4999B () office ! kde ! org
[Download RAW message or body]
CVS commit by steffen:
change icon when stuff happens while window is hidden
A kwatchgnupg2.png 1.1
M +1 -1 Makefile.am 1.5
M +7 -0 kwatchgnupgmainwin.cpp 1.3
M +3 -2 kwatchgnupgmainwin.h 1.3
M +10 -1 tray.cpp 1.3
M +7 -0 tray.h 1.2
--- kdepim/certmanager/kwatchgnupg/Makefile.am #1.4:1.5
@@ -20,5 +20,5 @@
-pics_DATA = kwatchgnupg.png
+pics_DATA = kwatchgnupg.png kwatchgnupg2.png
picsdir = $(kde_datadir)/kwatchgnupg/pics
--- kdepim/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp #1.2:1.3
@@ -122,7 +122,14 @@ void KWatchGnuPGMainWindow::slotReceived
// Change tray icon to show something happened
// PENDING(steffen)
+ mSysTray->setAttention(true);
}
}
+void KWatchGnuPGMainWindow::show()
+{
+ mSysTray->setAttention(false);
+ KMainWindow::show();
+}
+
void KWatchGnuPGMainWindow::slotQuit()
{
--- kdepim/certmanager/kwatchgnupg/kwatchgnupgmainwin.h #1.2:1.3
@@ -37,5 +37,5 @@
class KProcess;
-class KSystemTray;
+class KWatchGnuPGTray;
class QTextEdit;
@@ -48,4 +48,5 @@ public slots:
void slotReceivedStdout( KProcess *proc, char *buffer, int buflen);
void slotQuit();
+ virtual void show();
protected:
virtual bool queryClose();
@@ -57,5 +58,5 @@ private:
QTextEdit* mCentralWidget;
- KSystemTray* mSysTray;
+ KWatchGnuPGTray* mSysTray;
};
--- kdepim/certmanager/kwatchgnupg/tray.cpp #1.2:1.3
@@ -46,6 +46,9 @@ KWatchGnuPGTray::KWatchGnuPGTray( KWatch
KGlobal::iconLoader()->addAppDir( "kwatchgnupg" );
- setPixmap( loadIcon("kwatchgnupg") );
+ mNormalPix = loadIcon("kwatchgnupg");
+ mAttentionPix = loadIcon("kwatchgnupg2");
+
+ setPixmap( mNormalPix );
QToolTip::add( this, i18n("KWatchGnuPG Log Viewer") );
}
@@ -55,3 +58,9 @@ KWatchGnuPGTray::~KWatchGnuPGTray()
}
+void KWatchGnuPGTray::setAttention( bool att )
+{
+ if( att ) setPixmap( mAttentionPix );
+ else setPixmap( mNormalPix );
+}
+
#include "tray.moc"
--- kdepim/certmanager/kwatchgnupg/tray.h #1.1:1.2
@@ -35,4 +35,5 @@
#include <ksystemtray.h>
+#include <qpixmap.h>
class KWatchGnuPGMainWindow;
@@ -43,4 +44,10 @@ public:
KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin );
virtual ~KWatchGnuPGTray();
+
+public slots:
+ void setAttention( bool att );
+private:
+ QPixmap mNormalPix;
+ QPixmap mAttentionPix;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic