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.
If I click the Red Wifi Icon I get a list of all the unknown networks and I can select one of them to connect to it if I know the security details. Once connected this info is stored for future. If I'm at my friends house and I am with in range of a known network then the icon is changed to Amber/Orange. This colour could also be used if I'm within range of a free wifi hotspot in a cafe or something. When it's orange the wifi is still not enabled but by looking I can easily see that there is a network available if I want to connect. perhaps I want to save my battery life at the moment. If I click on the amber/orange wifi icon I want to connect to the available network. Once I've connected the icon should go green to indicate that I'm connected and wasting battery. Perhaps clicking on the green icon could give info on the connected network and the option to disconnect. At present i'm just playing with the idea. Things like WIFI Radar and MOFI will currently connect in either a fully automatic way or in a more manual way. I mean by that that wifi radar as far as I know connects a laptop on powerup when it sees a known network. I'm on a mobile device with no battery life. I'd like to be informed via the icon that I can if I want connect but at present i'm not. The C Daemon I'm thinking about might well use MOFI or other python for the User Interface when the icon is selected but the daemon updates the icon. Perhaps if I knew what part of the code is currently controlling the wifi icon I could look at it. Perhaps a traffic light of wifi icons will not be pleasing to the eye but I'd like to find out. _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community