You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

!nkubus

Beginner

  • "!nkubus" started this thread

Posts: 17

Location: Montreal

Occupation: Internet Solution Manager @ Bell

  • Send private message

1

Thursday, June 9th 2005, 1:41pm

Systray Notification HELP

I want to know if there is a way to notify the user in the systray without having to have an application sitting there.

I have tried dcop knotify and kdialog --passivepopup but I'm not able to move the notification from the top left corner.

so I want to know if there is a dcop call i can do to have let's say a Yellow popup with a title and an icon showing whan i insert a usb key
(all the mounting and the detection part is already working on my computer there thanks to ivman)

I just want to move the passive popup to the systray and change it's color because gray on gray does not attract my eyes and the top left corner in my opinion is not attractive for that kind of notifications.

if there is no possibility, I may try to find a good OSD (on screen display) like in amarok but my knowledge of c++ and kde programming is very poor at the moment.


Thank you very much for your help.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Thursday, June 9th 2005, 5:38pm

RE: Systray Notification HELP

Quoted

Originally posted by !nkubus
I want to know if there is a way to notify the user in the systray without having to have an application sitting there.

I have tried dcop knotify and kdialog --passivepopup but I'm not able to move the notification from the top left corner.

:)
I know it usually is in the bottom right corner, but it could be in top left depending on the user's kicker settings.
Actually a user might not have a system tray applet at all.

Quoted

so I want to know if there is a dcop call i can do to have let's say a Yellow popup with a title and an icon showing whan i insert a usb key
(all the mounting and the detection part is already working on my computer there thanks to ivman)

Hmm, the KDE volume manager currently under development might be doing that.

Quoted


I just want to move the passive popup to the systray and change it's color because gray on gray does not attract my eyes and the top left corner in my opinion is not attractive for that kind of notifications.

I am not sure that the color is configurable.
If this isn't supposed to be a standard application notification but something different you could have a look at the docs of the KPassivePopup class.

Quoted


if there is no possibility, I may try to find a good OSD (on screen display) like in amarok but my knowledge of c++ and kde programming is very poor at the moment.

The kmilo plugin for kded has DCOP methods for OSD messages.

Cheers,
_


Thank you very much for your help.[/quote]
Qt/KDE Developer
Debian User

!nkubus

Beginner

  • "!nkubus" started this thread

Posts: 17

Location: Montreal

Occupation: Internet Solution Manager @ Bell

  • Send private message

3

Thursday, June 9th 2005, 6:19pm

Thank you very much :) for your help

You pointed me to the right direction

I might try to hack into kdialog and make my own version of if that will create a small app in the systray and associate it with an is winID so the popup will show on the systray everywhere :)


because here is the line i'm looking at it Kdialog.cpp:

Source code

1
2
3
4
5
6
KPassivePopup *popup = KPassivePopup::message( title,
						       QString::fromLocal8Bit( args->getOption("passivepopup") ),
						       0, // icon
						       (QWidget*)0UL, // parent
						       0, // name
						       duration );



so as you can see in kdialog the setting for a WinID (//parent)
is set to (QWidget*)0UL wich is an unsigned long. So to do what I want I need a WinID sitting in the systray so my notification could comme from a small app i create in the systray and after disapear.

p.s sorry for my lame english ;)

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

4

Thursday, June 9th 2005, 9:10pm

You can give the window ID when using knotify's dcop interface

Cheers,
_
Qt/KDE Developer
Debian User