diff options
Diffstat (limited to 'arts/knotify')
| -rw-r--r-- | arts/knotify/CMakeL10n.txt | 6 | ||||
| -rw-r--r-- | arts/knotify/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | arts/knotify/README | 14 | ||||
| -rw-r--r-- | arts/knotify/knotify.cpp | 30 | ||||
| -rw-r--r-- | arts/knotify/knotify.desktop | 112 | ||||
| -rw-r--r-- | arts/knotify/knotify.h | 2 |
6 files changed, 40 insertions, 130 deletions
diff --git a/arts/knotify/CMakeL10n.txt b/arts/knotify/CMakeL10n.txt index 422cd20e0..23022d03f 100644 --- a/arts/knotify/CMakeL10n.txt +++ b/arts/knotify/CMakeL10n.txt @@ -1,3 +1,9 @@ ##### create translation templates ############## tde_l10n_create_template( "knotify" ) + +tde_l10n_create_template( + CATALOG "desktop_files/knotify.desktop/" + SOURCES knotify.desktop + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) diff --git a/arts/knotify/CMakeLists.txt b/arts/knotify/CMakeLists.txt index c290e9188..77b8f9a0a 100644 --- a/arts/knotify/CMakeLists.txt +++ b/arts/knotify/CMakeLists.txt @@ -29,7 +29,10 @@ link_directories( ##### other data ################################ -install( FILES knotify.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +tde_create_translated_desktop( + SOURCE knotify.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) ##### knotify ################################### @@ -49,6 +52,5 @@ endif( ARTS_FOUND ) tde_add_kpart( ${target} AUTOMOC SOURCES ${${target}_SRCS} LINK ${LIBS} - DEPENDENCIES dcopidl DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/arts/knotify/README b/arts/knotify/README index 3257cdc33..676dcc25e 100644 --- a/arts/knotify/README +++ b/arts/knotify/README @@ -31,3 +31,17 @@ example, while the screen is locked, it is very likely that the user is not present. Thus, he will not be able to hear a "You have mail" sound (or to see a talk request). Re-routing this to a log window sounds like a very good idea. + +Notes: +------ + +KNotify can be accessed directly using one of the available methods. + - void notify(TQString event, TQString fromApp, TQString text, TQString sound, + TQString file, int present, int level) + - void notify(TQString event, TQString fromApp, TQString text, TQString sound, + TQString file, int present, int level, int winId) + - void notify(TQString event, TQString fromApp, TQString text, TQString sound, + TQString file, int present, int level, int winId, int eventId) + +For example: + dcop knotify Notify notify event "Msg from MyApp" "Hello World!" "" "" 16 0 diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 9f50d5870..85b8f36ba 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -62,9 +62,9 @@ #include <kplayobjectfactory.h> #include <kaudiomanagerplay.h> #endif -#include <kprocess.h> -#include <kstandarddirs.h> -#include <kuniqueapplication.h> +#include <tdeprocess.h> +#include <tdestandarddirs.h> +#include <tdeuniqueapplication.h> #include <twin.h> #include "knotify.h" @@ -102,7 +102,7 @@ class KNotifyPrivate #endif extern "C"{ - KDE_EXPORT int kdemain(int argc, char **argv) { + TDE_EXPORT int kdemain(int argc, char **argv) { TDEAboutData aboutdata("knotify", I18N_NOOP("KNotify"), "3.0", I18N_NOOP("TDE Notification Server"), TDEAboutData::License_GPL, "(C) 1997-2003, KDE Developers"); @@ -112,15 +112,15 @@ extern "C"{ aboutdata.addAuthor("Charles Samuels",I18N_NOOP("Previous Maintainer"),"charles@kde.org"); TDECmdLineArgs::init( argc, argv, &aboutdata ); - KUniqueApplication::addCmdLineOptions(); + TDEUniqueApplication::addCmdLineOptions(); // initialize application - if ( !KUniqueApplication::start() ) { + if ( !TDEUniqueApplication::start() ) { kdDebug() << "Running knotify found" << endl; return 0; } - KUniqueApplication app; + TDEUniqueApplication app; app.disableSessionManagement(); // KNotify is started on KDE startup and on demand (using @@ -247,7 +247,7 @@ KNotify::KNotify( bool useArts ) d->playObjects.setAutoDelete(true); d->audioManager = 0; if( useArts ) { - connect( soundServer, TQT_SIGNAL( restartedServer() ), this, TQT_SLOT( restartedArtsd() ) ); + connect( soundServer, TQ_SIGNAL( restartedServer() ), this, TQ_SLOT( restartedArtsd() ) ); restartedArtsd(); //started allready need to initialize d->audioManager } #endif @@ -298,7 +298,7 @@ void KNotify::loadConfig() { void KNotify::reconfigure() { - kapp->config()->reparseConfiguration(); + tdeApp->config()->reparseConfiguration(); loadConfig(); // clear loaded config files @@ -530,7 +530,7 @@ bool KNotify::notifyBySound( const TQString &sound, const TQString &appname, int if ( !d->playTimer ) { d->playTimer = new TQTimer( this ); - connect( d->playTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( playTimeout() ) ); + connect( d->playTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( playTimeout() ) ); } if ( !d->playTimer->isActive() ) { d->playTimer->start( 1000 ); @@ -543,7 +543,7 @@ bool KNotify::notifyBySound( const TQString &sound, const TQString &appname, int TDEProcess *proc = d->externalPlayerProc; if (!proc) { proc = d->externalPlayerProc = new TDEProcess; - connect( proc, TQT_SIGNAL( processExited( TDEProcess * )), TQT_SLOT( slotPlayerProcessExited( TDEProcess * ))); + connect( proc, TQ_SIGNAL( processExited( TDEProcess * )), TQ_SLOT( slotPlayerProcessExited( TDEProcess * ))); } if (proc->isRunning()) { soundFinished( eventId, PlayerBusy ); @@ -756,12 +756,12 @@ void KNotify::soundFinished( int eventId, PlayingFinishedStatus reason ) WId KNotify::checkWinId( const TQString &appName, WId senderWinId ) { if ( senderWinId == 0 ) { - TQCString senderId = kapp->dcopClient()->senderId(); + TQCString senderId = tdeApp->dcopClient()->senderId(); TQCString compare = (appName + "-mainwindow").latin1(); int len = compare.length(); // kdDebug() << "notifyByPassivePopup: appName=" << appName << " sender=" << senderId << endl; - QCStringList objs = kapp->dcopClient()->remoteObjects( senderId ); + QCStringList objs = tdeApp->dcopClient()->remoteObjects( senderId ); for (QCStringList::ConstIterator it = objs.begin(); it != objs.end(); ++it ) { TQCString obj( *it ); if ( obj.left(len) == compare) { @@ -769,7 +769,7 @@ WId KNotify::checkWinId( const TQString &appName, WId senderWinId ) TQCString replyType; TQByteArray data, replyData; - if ( kapp->dcopClient()->call(senderId, obj, "getWinID()", data, replyType, replyData) ) { + if ( tdeApp->dcopClient()->call(senderId, obj, "getWinID()", data, replyType, replyData) ) { TQDataStream answer(replyData, IO_ReadOnly); if (replyType == "int") { answer >> senderWinId; @@ -800,5 +800,3 @@ void KNotify::sessionReady() } d->inStartup = false; } - -// vim: sw=4 sts=4 ts=8 et diff --git a/arts/knotify/knotify.desktop b/arts/knotify/knotify.desktop index 7718c98f5..972ef4569 100644 --- a/arts/knotify/knotify.desktop +++ b/arts/knotify/knotify.desktop @@ -1,118 +1,8 @@ [Desktop Entry] Type=Service Name=KNotify -Name[af]=Knotify -Name[ar]=برنامج الإبلاغ -Name[bn]=কে-নোটিফাই -Name[csb]=Òdkôzanié -Name[cy]=KHysbyu -Name[eo]=Katentigilo -Name[fo]=KÁminning -Name[hi]=के-नोटिफाई -Name[ka]=სისტემური შეტყობინება -Name[ko]=K알림이 -Name[mn]=Сонордуулга -Name[ne]=केनोटिफाइ -Name[nso]=KLemosa -Name[pa]=ਕੇਟਿੱਪਣੀ -Name[pl]=Powiadamianie -Name[pt_BR]=Notificações -Name[ru]=Системные сообщения -Name[ss]=KNotify -Name[sv]=Knotify -Name[ta]=கேகுறிப்பெடு -Name[te]=కెనోటిఫై -Name[tg]=Хабарҳои системавӣ -Name[th]=ระบบแจ้งเตือน - K -Name[ven]=U divhadza ha K -Name[zu]=I-KNotify -Exec=knotify Comment=TDE Notification Daemon -Comment[af]=Kde Inkennisstelling Bediener -Comment[ar]=مراقب تنبيهات كيدي -Comment[az]=TDE Bildiriş Demonu -Comment[be]=Сервіс нагадванняў TDE -Comment[bg]=Сървър за съобщения -Comment[bn]=কে.ডি.ই নোটিশ সরবরাহকারী ডিমন -Comment[br]=Diaoul Kemennadenn TDE -Comment[bs]=TDE Sistemska obavještenja -Comment[ca]=Dimoni de notificacions per al TDE -Comment[cs]=Démon pro systémová hlášení prostředí TDE -Comment[csb]=Demon òdkôzëwaniô TDE -Comment[cy]=Daemon Hysbysu TDE -Comment[da]=TDE Bekendtgørelsesdæmon -Comment[de]=TDE-Benachrichtigungsprogramm -Comment[el]=Δαίμονας ειδοποίησης του TDE -Comment[eo]=TDE-Sistematentigo-demono -Comment[es]=Demonio de notificación de TDE -Comment[et]=TDE süsteemsete märguannete deemon -Comment[eu]=TDEko jakinarazpenaren daemona -Comment[fa]=شبح اخطار TDE -Comment[fi]=TDE:n huomautuspalvelin -Comment[fo]=Áminningarandi TDE's -Comment[fr]=Démon de notifications de TDE -Comment[fy]=TDE's systeemberjochtenprogramma -Comment[ga]=Deamhan Fógartha TDE -Comment[gl]=Demo de notificacións de TDE -Comment[he]=תהליך הרקע הודעות של TDE -Comment[hi]=केडीई सूचना ङेमन -Comment[hr]=TDE demon obavještavanja -Comment[hsb]=TDE-demon za zdźělenki -Comment[hu]=TDE figyelmeztető szolgáltatás -Comment[id]=Daemon pemberitahuan TDE -Comment[is]=TDE tilkynningapúkinn -Comment[it]=Demone avvisi di TDE -Comment[ja]=TDE 通知デーモン -Comment[ka]=TDE შეტყობინებების შიკრიკი -Comment[kk]=TDE құлақтандыру қызметі -Comment[ko]=TDE용 알림 서버 -Comment[lb]=TDE-Norichtendämon -Comment[lt]=TDE pranešimų tarnyba -Comment[lv]=TDE Apziņošanas Dēmons -Comment[mi]=Kaikorero TDE -Comment[mk]=TDE даемон за известувања -Comment[mn]=TDE-Сонордуулга программ -Comment[ms]=Daemon Pemberitahuan TDE -Comment[mt]=Daemon tan-notifika TDE -Comment[nb]=TDE Varslings-nisse -Comment[nds]=TDE-Dämoon för Bescheden -Comment[ne]=TDE सूचना डेइमन -Comment[nl]=TDE's systeemnotificatieprogramma -Comment[nn]=TDE-varselnisse -Comment[nso]=Daemon ya Tsebiso ya TDE -Comment[oc]=Dimoni de notificacion TDE -Comment[pa]=TDE ਟਿੱਪਣੀ ਪੇਸ਼ਕਾਰ -Comment[pl]=Demon powiadamiania TDE -Comment[pt]=Servidor de mensagens do TDE -Comment[pt_BR]=Serviço de notificação do TDE -Comment[ro]=Demon de notificare TDE -Comment[ru]=Системные сообщения TDE -Comment[rw]=Dayimoni y'Imenyesha TDE -Comment[se]=TDE dieđihanbálvá -Comment[sk]=TDE Oznamovací démon -Comment[sl]=Sistemska obvestila TDE -Comment[sq]=TDE Demoni i Njoftimit -Comment[sr]=TDE Демон за обавештавање -Comment[sr@Latn]=TDE Demon za obaveštavanje -Comment[ss]=I-daemon yekwatisa ku TDE -Comment[sv]=TDE:s underrättelsedemon -Comment[ta]=கேடிஇ அறிவிப்பு டேமன் -Comment[te]=కెడిఈ ప్రకటనల సూత్రధారి -Comment[tg]=Хабарҳои системавии TDE -Comment[th]=เดมอนการแจ้งเตือนของ TDE -Comment[tr]=TDE Bilgilendirme Programı -Comment[tt]=TDE'nıñ Kisätü Xezmäte -Comment[uk]=Демон сповіщення про нову пошту -Comment[uz]=TDE xabarnomalar xizmati -Comment[uz@cyrillic]=TDE хабарномалар хизмати -Comment[ven]=Daemon yau divhadza ya TDE -Comment[vi]=Trình nền thông báo của TDE -Comment[wa]=Démon di notifiaedje di TDE -Comment[xh]=Daemon Ulwaziso lwe TDE -Comment[zh_CN]=TDE 通告守护进程 -Comment[zh_HK]=TDE 通知伺服程式 -Comment[zh_TW]=TDE 通知服務程式 -Comment[zu]=Isaziso se-Daemon ye-TDE +Exec=knotify Icon=knotify X-TDE-ServiceTypes=KNotify X-DCOP-ServiceType=Unique diff --git a/arts/knotify/knotify.h b/arts/knotify/knotify.h index 8348f3d40..b74fca3b2 100644 --- a/arts/knotify/knotify.h +++ b/arts/knotify/knotify.h @@ -30,7 +30,7 @@ class TDEConfig; class KNotify : public TQObject, public DCOPObject { - Q_OBJECT + TQ_OBJECT K_DCOP public: |
