[KNotification] method sendEvent() is not called.
-
Mmm, I don't know, since I tried using the same name for application name in KAboutData and in the name of the notification file.
Sorry, but I don't understand your question. Maybe you want to know where configuration files for your KDE application are stored and how to access to configuration data?
-
Yes, exactly :-)
I use Mandriva Linux 2010 and i know that configuration files are in the /usr/local/share/apps/appname/appname.notifyrc
and
/usr/share/apps/appname/appname.notifyrc
Could it be that they are stored in another location? -
If you compile KDE from source, you should be able to specify the "prefix" where to install it, most commons are /usr/local, /usr/, or somewhere in your home directory if you don't want to have it system-wide (especially with KDE unstable branch).
In /usr/local, which is your prefix, there are main configuration files. They contain the basic options and configuration for each application. When you first start a KDE application, configuration files are copied from your prefix into your home directory, so that you can customize them without touching the original files in /usr/local (also because you normal user don't have enough permissions). You home directory should be $HOME/.kde or $HOME/.kde4. The next time you start the same application, configuration are read both from your own config file in .kde or .kde4, and merged with other option in the "global" configuration file (in /usr/local).To access data in a configuration file (I'm talking about config file of your application, which you implemented) you have to use KConfig, KConfigGroup and other classes in your application. Also, you don't need to specify where to put your configuration file, KDE will create it in your home directory (again, .kde or .kde4), simply create a KConfig or KConfigGroup object, and read or write entry into your config file.
-
I did "logout" and when logged again, I discovered that notification not show.
How can it be? -
Where did you put your notifyrc file? Does it match the name of your application?
-
Thanks, it works, I understood.
I want ask you, I have a small question: May I put default action in notify, if it had to disappeared and nobody choosing action? -
Do you mean if the notification timeout expires and it disappears without having time to choose an action? You find it in "recent notification", next to the system tray. Or you can use Persistent flag, and close it manually when your code has been executed.
-
Yes-yes, you are right. But I was wondering whether the disappearance of notification perform the action by default, if you have not chosen any action.
-
Nope, I think the disappearance doesn't perform any action by default, you have to manually activate it.
-
Thanks, Tupla ^___^
-
You're welcome!