Thread
:
[Announce] Advanced Clock Plugin
View Single Post
Mentalist Traceur
2011-01-01 , 22:10
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#
152
Wonko: Thank you. That got it to work. I am thinking it'd be easier to just see the code now that I got it working, instead of me explaining it.
skykooler, you now have a method without using sleeps (since the gap happens in between clock refreshes... which means I need to see if it works reasonably if it refreshes without showing seconds - since I always show seconds). Not sure if you can adapt it into your clocks, but seems easy enough. I just stuffed all of my code inside the draw_clock part.
Also, last night, I couldn't update from 9.whatever to the version that combined the packages for settings and normal. Basically, it seemed dpkg had the newly installing advanced-clock-plugin conflict with the yet uninstalled advanced-clock-settings-UI thing. Reinstall fixed it, as was expected.
Now, for all those interested, this is the current non-static version of the clock I showed you guys a static screenshot of earlier:
TestClock.txt
It ONLY duplicates the cpumem applet function for now, so this is only for those who feel like looking at the code, or like using half-finished clock styles. Unlike cpumem/load applets, which use 4 bars (5 if you count the gray bottom one), this fits in 5 (6 counting the gray bottom one). Thus, while cpumem uses wierd percentages (you can look at the source code to see what they are) of memory and cpu for checking off which bars to display, this cuts it simply at 20|40|60|80|100. Meaning, one gray bar indicates 0-20% use, one white bar indicates 20-40%, etc. And the top bar only turns on when you hit the max 100% (cpumem/load applets light up the top bar at 90% for cpu, and something else for memory).
The blue value is where the wifi signal applet clone will eventually go (white number 0-10 for signal quality), but for the tim being I was using it to debug the values being used to draw the bars, so in the version attached, it displays the cpu variable being used to display the cpu bar.
Other than that, the copyright line also includes my name as well as Wonko's, but I don't intend to leave it worded like that - I just stuck it in there for formality's sake when I firct created my TestClock.py file.
Right now, all I'm putting this out for is one, in case it helps skykooler (or others, but he's explicitlyl expresed concern over the efficiency of his cpu stat fetching), and two, to get feedback on it so far (mainly bugs people find, if they test it)... It doesn't properly update when the time is set to not show seconds (because it updates with the clock redraws; it doesn't support any new feature since around version 3.something of the Advanced Clock Applet (I've been so caught up making it do what it's supposed to do I haven't updated the code to support all the currently possible settings, and Wonko's been rolling out new features at a phenomenal rate).
Ummm, yeah. I'll keep adding stuff as I figure it out.
Meanwhile, just fyi to everyone, with the optification, clocks are now in /opt/maemo/usr/lib/advanced-clock-plugin/clocks/ (though the old directory symlinks there anyway).
Quote & Reply
|
The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
skykooler
,
Wonko
Mentalist Traceur
View Public Profile
Send a private message to Mentalist Traceur
Find all posts by Mentalist Traceur