[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Print error report (RFC)
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2001-03-30 18:07:17
[Download RAW message or body]

> I would say, use KNotifyClient to generate the message. So the user can
> configure whether he wants a messagebox, a sound an entry in a logfile or any
> of that in any combinaation.

I'm not used to KNotifyClient, but I tried and it doesn't work. I can't figure out
why my event is not fired. Could anybody help, please.

I inserted in my code the following:

if (!KNotifyClient::event(QString::fromLatin1("printerror"),i18n("...%1").arg(errorMessage())))
   kdDebug() << "could not send notify event" << endl;

and I installed an eventsrc file in "$KDEDIR/share/apps/kdeprint/", which contains:

[!Global!]
IconName=fileprint
Comment=Printing
Comment[fr]=Impression

[printerror]
Name=Print Error
Name[fr]=Erreur d'impression
Comment=A print error occured
Comment[fr]=Une erreur d'impression est survenue
default_presentation=2

I can see my event in kcmnotify. But nothing happens when I try to fire the event.
I then replaced my event by a standard event, like that:

if (!KNotifyClient::event(KNotifyClient::fataError,i18n("...%1").arg(errorMessage())))
   kdDebug() << "could not send notify event" << endl;

Then the event is correctly fired, and I get a dialog box. Of course, I could simply use this
standard event, but maybe it's better to have a separate print error event.

Am I doing something wrong ?
Thanks for any help.

Michael.


--
------------------------------------------------------------------
Michael Goffioul                IMEC-DESICS-MIRA
e-mail: goffioul@imec.be        (Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510          Kapeldreef, 75
Fax:    +32/16/28-1515          3001 HEVERLEE, BELGIUM
------------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic