maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Advanced Clock Plugin (https://talk.maemo.org/showthread.php?t=67408)

Mentalist Traceur 2010-12-30 16:12

Re: [Announce] Advanced Clock Plugin
 
So, skykooler, I found your source code in the .deb file, and it's rather ridiculous just how much cleaner than mine it looks. I don't know if it's more efficient or not, but the fact that I can't even properly understand what the for loops do shows you how abysmal my coding knowledge is. I know what shell and Python stuff I learned out of necessity, but not really the foundational stuff any good coder should know by heart.

geneven 2010-12-30 17:48

Re: [Announce] Advanced Clock Plugin
 
This is great.

I hate digital clocks that tell me it is 08 a.m. rather than 8 a.m.

Is there a way to get rid of digital clock times starting with zero?

skykooler 2010-12-30 18:47

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by Mentalist Traceur (Post 907683)
So, skykooler, I found your source code in the .deb file, and it's rather ridiculous just how much cleaner than mine it looks. I don't know if it's more efficient or not, but the fact that I can't even properly understand what the for loops do shows you how abysmal my coding knowledge is. I know what shell and Python stuff I learned out of necessity, but not really the foundational stuff any good coder should know by heart.

Basically I am measuring how much CPU time is taken in .1 second of real time. The potential problem here it that my script takes .1 second at least to execute, even though it is sleeping most of that time, which could lead to a battery drain if the clock were the only app running (does it shut off when the screen is locked?)

Quote:

This is great.

I hate digital clocks that tell me it is 08 a.m. rather than 8 a.m.

Is there a way to get rid of digital clock times starting with zero?
Edit one of the source files in /usr/lib/advanced-clock-plugin/clocks. Find where it says str(h).zfill(2) and change that to just str(h). Repeat with the minutes and seconds if desired.

Wonko 2010-12-30 23:25

Re: [Announce] Advanced Clock Plugin
 
Well,
based on the requests in here, I added some more improvements:
- you get your color setting "by value" back (i.e. you can enter numeric color codes, not in hex but in decimal notation, but I think this should suffice) ;),
- added an option to disable the leading zero padding for numeric values,
- and fixed a bug in the settings dialog which caused the color not being reloaded correctly.

The "Pad Numbers with Zeros" setting currently affects everything: hours, minutes, and seconds.
This is probably too much.
If you like a more specific behavior let me know.

Edit: I also added a version of the binary clock which indicated the next alarm time.

m2k 2010-12-31 00:51

Re: [Announce] Advanced Clock Plugin
 
I greatly appreciate your hard work on this plugin! I share the same suggestion of removing the leading zero for the decimal clock mode. Hopefully, you can apply an option to remove it just for the 'hours'. Thank you guys very much!!

theonelaw 2010-12-31 01:13

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by m2k (Post 907994)
I greatly appreciate your hard work on this plugin! I share the same suggestion of removing the leading zero for the decimal clock mode. Hopefully, you can apply an option to remove it just for the 'hours'. Thank you guys very much!!

I agree and second the notion of indeed a great work,

but

the notion of displaying numbers without leading zeroes is a cosmetic
that should be an _option_ rather than a default.

Please don't make that a default.

(I have made an awful lot of money over the decades sorting
mangled date-time-stamped data from bizarre formats
and the thought of discarding leading zeroes in numeric fields
screeches through my nerves like running fingernails across a chalkboard.
Just because other peoples shortsightedness has provided me
with a generously comfortable income does not mean I condone it.)

skykooler 2010-12-31 01:52

Re: [Announce] Advanced Clock Plugin
 
Does anyone have other suggestions for new clocks?
(I am thinking of making a few more but temporarily ran out of ideas).

Duy2anh 2010-12-31 01:52

Re: [Announce] Advanced Clock Plugin
 
Hi,
Thank you for the great effort.
I tried the plugin, very nice indeed. If it works well, it will be a perfect replacement for the builtin clock.
However, on my N900, the plugin ran well only for several hours, then refused to update the time. When I touch on the status area and go to the clock tab, the builtin clock still shows correct time, but time displayed by the advance clock plugin was stopped a couple of hours before although it still ran.
The phone got hot, which meant something was hogging the CPU, and indeed, things became so slow.
I removed the clock pluggin, reboot, and things went back to normal again.
I used Titan kernel ULV 250 750 at the time. Was that the cause?

skykooler 2010-12-31 02:02

Re: [Announce] Advanced Clock Plugin
 
Wow, apparently over a thousand people have downloaded my binary clock plugin!

skykooler 2010-12-31 02:03

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by Duy2anh (Post 908014)
Hi,
Thank you for the great effort.
I tried the plugin, very nice indeed. If it works well, it will be a perfect replacement for the builtin clock.
However, on my N900, the plugin ran well only for several hours, then refused to update the time. When I touch on the status area and go to the clock tab, the builtin clock still shows correct time, but time displayed by the advance clock plugin was stopped a couple of hours before although it still ran.
The phone got hot, which meant something was hogging the CPU, and indeed, things became so slow.
I removed the clock pluggin, reboot, and things went back to normal again.
I used Titan kernel ULV 250 750 at the time. Was that the cause?

Maybe. Using the default kernel I haven't had any problems.


All times are GMT. The time now is 16:29.

vBulletin® Version 3.8.8