Notices


Reply
Thread Tools
Posts: 130 | Thanked: 13 times | Joined on Nov 2005
#151
this is a good thing. been waiting for something like this to come along. thank you.

i don't wear a watch. to know the time sometimes i press the on/off button to access the slide screen which shows the time. it would be helpful if it showed the time and the time of they next appointment; pulling the appointment time from the calendar. if i don't turn on the phone i can just slide the thing back in my pocket.

Last edited by jdr93; 2011-01-01 at 23:42. Reason: was i editing?
 
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).
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#153
@ Hide-the-clock request: what would you actually use this for? If it's not something you're turning on-off often, it can easily be done with a clock style, if you'd like.
 
Hootenholler's Avatar
Posts: 133 | Thanked: 140 times | Joined on Feb 2010 @ Bristol, UK
#154
A few questions!

Any idea as to why my date is cut off, as seen below? It has been this way since the first version showing Date & Time was released.



Is it possible for my clock to be in the format "Jan 1st 00:00"? Or if not, "1/1 00:00" either way reading across as one line of text, rather than date above time. How?!
Attached Images
 

Last edited by Hootenholler; 2011-01-01 at 23:41. Reason: Clarity!
 
Posts: 21 | Thanked: 9 times | Joined on Apr 2010
#155
Thanks, was really amazed to find such an application
However the twelve hour mode does not seem to work with binary.
 
Posts: 671 | Thanked: 1,630 times | Joined on Aug 2010
#156
ISO-8601 mod for Advanced Clock Plugin rev 0.11.0

ISO-8601 format again, hardcoded font size

enjoy

ISO_8601_Clock.py
Code:
import cairo
from datetime import datetime
import gtk
import math
import pango

import clock

def get_name():
    return "ISO_8601 Clock"

class ISO_8601_Clock(clock.Clock):
    def __init__(self, drawing_area):
        clock.Clock.__init__(self, drawing_area)

    def draw_clock(self):


# Draw date.in ISO-8601 compliant
        self.context.set_font_size(20)
        self.context.move_to(2, 16)
        text = str(self.time.year) + "." + str(self.time.month).zfill(2) + "." + str(self.time.day).zfill(2)
        self.context.text_path(text)
        self.context.stroke()

# Draw time.
        self.context.set_font_size(20)
        self.context.move_to(2, 35)
        text = str(self.time.hour).zfill(2) + ":" + str(self.time.minute).zfill(2) + ":" + str(self.time.second).zfill(2)
        self.context.text_path(text)
        self.context.stroke()


    def resize(self):
        self.drawing_area.set_size_request(110, 36)
Attached Images
 
Attached Files
File Type: zip ISO_8601_Clock.py.zip (1.0 KB, 471 views)
__________________
Three n900s: One for stable working platform,
One for development testing Chopping Onions
One for saltwater immersion power testing resurrected ! parts scavenging

My Mods for Wonko's Advanced Clock Plugin:
ISO8601 clock mod and Momental_IST clock mod

Printing your Email with the N900
 

The Following 3 Users Say Thank You to theonelaw For This Useful Post:
Posts: 73 | Thanked: 47 times | Joined on Aug 2010
#157
Hi,
Do I miss something? After a complete reflash of my N900, I installed the newest Advance clock Pluggin package from extras-devel today, it show up in setting/personalize area and hide the default clock on the status bar, but it did not show the new advanced clock on the bar.
I tried to change clocks, change font, change color, almost anything, even turned off the phone and turned on again, but still, it did not show up.
Do I need somthing else beside the package?
 

The Following 2 Users Say Thank You to Duy2anh For This Useful Post:
Posts: 671 | Thanked: 1,630 times | Joined on Aug 2010
#158
Originally Posted by Duy2anh View Post
Hi,
Do I miss something? After a complete reflash of my N900, I installed the newest Advance clock Pluggin package from extras-devel today, it show up in setting/personalize area and hide the default clock on the status bar, but it did not show the new advanced clock on the bar.
I tried to change clocks, change font, change color, almost anything, even turned off the phone and turned on again, but still, it did not show up.
Do I need somthing else beside the package?
One step at a time - it is still working through the devel stage.
Did you try the analog clock ?
Important you change color so you can see it

(I know - I went round and round learning I had silly settings)

After analog clock try BCD clock

for the date time and decimal clocks
the fonts need to be right,
you need color or white in the color picker
and the font size needs to be some number like 80 or 100
( a real gotcha if you tend to think in point size)

and you may need to completely restart the thing sometimes
when you make big changes:
use this mantra:
Code:
pkill -f /usr/bin/hildon-status-menu
__________________
Three n900s: One for stable working platform,
One for development testing Chopping Onions
One for saltwater immersion power testing resurrected ! parts scavenging

My Mods for Wonko's Advanced Clock Plugin:
ISO8601 clock mod and Momental_IST clock mod

Printing your Email with the N900
 

The Following 3 Users Say Thank You to theonelaw For This Useful Post:
pusak gaoq's Avatar
Posts: 723 | Thanked: 519 times | Joined on Nov 2010 @ Kuching:Malaysia
#159
Originally Posted by Mentalist Traceur View Post
@ Hide-the-clock request: what would you actually use this for? If it's not something you're turning on-off often, it can easily be done with a clock style, if you'd like.
the reason why i ask the hide the clock request is so we can use other clock widgets on our phone....
there a few clock widgets that we can use on our N900...these widgets can be customize & resize so it can looks better....
it just an idea so its up to the developer if he want to implant the hide the clock request or not later...
 
Posts: 671 | Thanked: 1,630 times | Joined on Aug 2010
#160
Originally Posted by pusak gaoq View Post
the reason why i ask the hide the clock request is so we can use other clock widgets on our phone....
there a few clock widgets that we can use on our N900...these widgets can be customize & resize so it can looks better....
it just an idea so its up to the developer if he want to implant the hide the clock request or not later...
I have several hours experience at hiding the clock,
it is quite easy to do actually.
Just install advanced-clock-plugin
then rename /usr/lib/advanced-clock-plugin/clock.py to noclock
and then reboot - no more clock !
__________________
Three n900s: One for stable working platform,
One for development testing Chopping Onions
One for saltwater immersion power testing resurrected ! parts scavenging

My Mods for Wonko's Advanced Clock Plugin:
ISO8601 clock mod and Momental_IST clock mod

Printing your Email with the N900
 

The Following User Says Thank You to theonelaw For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 11:01.