[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/arts/knotify
From: Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date: 2003-02-27 21:26:48
[Download RAW message or body]
CVS commit by pfeiffer:
allow passing a winId for KPassivePopup
M +33 -22 knotify.cpp 1.71
M +6 -1 knotify.h 1.23
--- kdelibs/arts/knotify/knotify.cpp #1.70:1.71
@@ -264,4 +264,11 @@ void KNotify::notify(const QString &even
int present, int level)
{
+ notify( event, fromApp, text, sound, file, present, level, 0 );
+}
+
+void KNotify::notify(const QString &event, const QString &fromApp,
+ const QString &text, QString sound, QString file,
+ int present, int level, int winId )
+{
// kdDebug() << "event=" << event << " fromApp=" << fromApp << " text=" << text \
<< " sound=" << sound <<
// " file=" << file << " present=" << present << " level=" << level << endl;
@@ -334,5 +341,5 @@ void KNotify::notify(const QString &even
if ( present & KNotifyClient::PassivePopup )
- notifyByPassivePopup( text, fromApp);
+ notifyByPassivePopup( text, fromApp, winId );
else if ( present & KNotifyClient::Messagebox )
@@ -464,11 +471,15 @@ bool KNotify::notifyByMessagebox(const Q
}
-bool KNotify::notifyByPassivePopup( const QString &text, const QString &appName )
+bool KNotify::notifyByPassivePopup( const QString &text,
+ const QString &appName,
+ int senderWinId )
{
+ if ( senderWinId == 0 )
+ {
QCString senderId = kapp->dcopClient()->senderId();
- int senderWinId = 0;
QCString compare = (appName + "-mainwindow").latin1();
int len = compare.length();
// kdDebug() << "notifyByPassivePopup: appName=" << appName << " sender=" << \
senderId << endl; +
QCStringList objs = kapp->dcopClient()->remoteObjects( senderId );
for (QCStringList::ConstIterator it = objs.begin(); it != objs.end(); it++ ) {
@@ -487,5 +498,5 @@ bool KNotify::notifyByPassivePopup( cons
}
}
-
+ }
}
}
--- kdelibs/arts/knotify/knotify.h #1.22:1.23
@@ -43,4 +43,8 @@ k_dcop:
int present, int level);
+ void notify(const QString &event, const QString &fromApp,
+ const QString &text, QString sound, QString file,
+ int present, int level, int winId);
+
void reconfigure();
void setVolume( int volume );
@@ -51,5 +55,6 @@ protected:
bool notifyByLogfile(const QString &text, const QString &file);
bool notifyByStderr(const QString &text);
- bool notifyByPassivePopup(const QString &text, const QString &appName);
+ bool notifyByPassivePopup(const QString &text, const QString &appName,
+ int winId = 0 );
bool notifyByExecute(const QString &command);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic