SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Readme updated for kpanel-0.18.10 / kwm-0.10 Readme updated for kpanel-0.17 / kwm-0.10

Matthias



kpanel 0.10 has some brand new gimmicks build in:

Swallowing other X Window Applications as well as switching icons during runtime from outside.


What about an "xosview" with "xload" as icon on the panel? Try this
as "xosview.kdelnk":

[KDE Desktop Entry]
icon=whatever.xpm
SwallowExec=xload -bg grey -nolabel
SwallowTitle=xload
Exec=xosview
Comment=Informations about your system status

Or a calendar-application (here xcalendar) with "xclock" running as icon on the panel?
Try this as "Calendar.kdelnk":

[KDE Desktop Entry]
icon=whatever.xpm
SwallowExec=xclock -bg grey
SwallowTitle=xclock
Exec=xcalendar
Comment=Calendar

BTW: both kdelnk-files are available in the "sample_kdelnk_files"-folder of the kpanel-0.10 distribution.

Note that kpanel finds the window-to-be-swallowed by the window title (item SwallowTitle). This must be exactly the title of the window!

But for example a mailclient like kmail probably don't want to create its own animated programm just for the mail-indicator. Wouldn't it be nice, if a button could have more than one icons? Even that is possible with kpanel-0.10! Look at the following as "Mail.kdelnk" file :

[KDE Desktop Entry]
Exec=kmail
Comment=Mail client
icon=mail1.xpm
icon2=mail2.xpm
PanelIdentity=kmail
SwallowExec=kmailobserver

Then kmail (and the kmailobserver) can switch the panelicon during runtime with

system("kwmcom, kpanel:icon1:kmail"); and

system("kwmcom kpanel:icon2:kmail");

"kwmcom" is a very small program that communicates with kwm. Since kwm doesn't understand commands beinning with "kpanel:", it will send the stuff to its modules.

You may define at maximum 4 icons (icon, icon2, icon3, icon4 ). So the feature is definitly not meant for animation!! If you need animation, just write an outstanding program and let kpanel swallow it.

Also the PanelIdentity is restricted to 5 character maximum, following character are ignored (this is due to the limited X-Atoms communication and may be replaced with ktooltalk some day).

If you miss performance because of the calling of kwmcom, you can also send the string via KWM::sendKWMCommand (defined in kwm.h from libkdecore) directly.

Hope you'll enjoy the new features,

Matthias
(ettrich@kde.org)


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.