El día Wednesday, October 01, 2008 a las 08:30:00AM +0100, Arigead escribió:

> Matthias Apitz wrote:
> > El día Tuesday, September 30, 2008 a las 02:38:51PM +0100, Arigead escribió:
> >
> >   
> >> Hello all,
> >>     Want to play with the wifi icon on the FR either in [2008.09] or 
> >> [FSO] Perhaps [FSO] makes more sense in the long run.
> >>
> >> Anyhow can I from a C Program set the icon? And can I have a call back 
> >> so that Icon being pressed issues a DBUS message?
> >>     
> >
> > If you create a file like this:
> >
> > [EMAIL PROTECTED]:/usr/share/applications# cat Wifi-up.desktop 
> > [Desktop Entry]
> > Encoding=UTF-8
> > Name=Wifi-up
> > Comment=Bring Wifi up with ifup eth0
> > Exec=xterm -e "ifdown eth0 ; iwconfig eth0 txpower auto channel 1 ; killall 
> > wpa_supplicant ; killall udhcp ; ifup eth0 ; sleep 20"
> > Icon=wifi
> > Terminal=false
> > Type=Application
> > Categories=Application;Utilities;
> > SingleInstance=true
> > StartupNotify=true
> >
> > the icon will appear and of course you have an action Exec=...
> >
> >     matthias
> >
> >   
> Thanks for that Matthias but you misunderstand me. At present the wifi 
> icon, as far as I know, is plain white. I'd like to have three different 
> Icons for the wifi one Red, one Orange/Amber and one Green (Traffic 
> Lights). I'd like to create a daemon in C which every so often did a wee 
> wifi scan to see what networks are out there. If no know wifi SSIDs are 
> available then the icon is red.
        ...

I think I understood you already in your first post very well; you can
change the color or the image of a given icon just be rewriting (from C
or shell) the corresponding desktop file and let it point to another
icon with

Icon=wifiRed

or 

Icon=wifiAmber

... ofc the files 'wifiAmber.png' must exist in /usr/share/pixmaps

HIH

        matthias


-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <[EMAIL PROTECTED]> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
A computer is like an air conditioner, it stops working when you open Windows
Una computadora es como aire acondicionado, deja de funcionar si abres Windows

_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to