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)

NightShift79 2011-01-15 08:47

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by Mentalist Traceur (Post 920604)
...

- Edit -

Yes, displaying a new clock on each desktop is doable. You just need to read the current desktop value in gconf, and go from there. The problem is I don't myself know where that value is (I couldn't figure it out from the Active Desktop Icon source code), and I'm not sure if Wonko or anyone else currently feels like doing it.

I'm not sure, but isn't that
"gconf key /apps/osso/hildon-desktop/views/current"

Wonko 2011-01-15 12:41

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by NightShift79 (Post 920603)
Btw, what do you say about showing individual clocks on the different desktops. Is it doable?

Implemented that feature in 0.13.0 which should be available in extras-devel shortly.
Unfortunately, this version breaks compatibility with older clock styles.

So, all clock styles need to be changed accordingly.
The change affects the constructor which now uses three (including self) parameters.
If you use the constructor for initialization etc. you need to forward the third parameter to the super constructor to make your clock work again.
If you do nothing else in your constructor except calling the super constructor you could as well delete the constructor.

Edit:
@NightShift79
Yes it is.
To be accurate it is: "/apps/osso/hildon-desktop/views/current".
It's the plural "views".
But well this is pretty much nitpicking. ;)

WhiteWolf 2011-01-15 13:46

Re: [Announce] Advanced Clock Plugin
 
Can you give me directions to use the custom format field?
An example might suffice me.

Thanks.

Wonko 2011-01-15 14:40

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by WhiteWolf (Post 920858)
Can you give me directions to use the custom format field?
An example might suffice me.

Thanks.

Well, this strongly depends on the clock style.
I think the only clock style that currently uses that field follows the python datetime strftime() formatting as described in: http://docs.python.org/library/datet...ptime-behavior
E.g., something like "%H:%M" should display the clock as "Hour:Minute".
This clock style was posted here some time ago.

iscio 2011-01-15 16:27

Re: [Announce] Advanced Clock Plugin
 
sorry, could you explain what is the meaning of "pad zero"? and I installed klingon font but when I use it I see only square
thank you

Mentalist Traceur 2011-01-15 17:06

Re: [Announce] Advanced Clock Plugin
 
2 Attachment(s)
Quote:

Originally Posted by Wonko (Post 920826)
So, all clock styles need to be changed accordingly.
The change affects the constructor which now uses three (including self) parameters.
If you use the constructor for initialization etc. you need to forward the third parameter to the super constructor to make your clock work again.
If you do nothing else in your constructor except calling the super constructor you could as well delete the constructor.

Ummm... (Great work btw: I thought this would take a long time to get implemented, but here you are, making the Advanced Clock Plugin even better.)

So am I changing
def __init__([something in here])
or
clock.Clock.__init__([something in here])
or both?

If I understand correctly, I can just delete the __init__ area for something like the Binary4DotClock, since nothing happens in the init area. However, I do need the __init__ area for the clock style I'm currently working on, since that's where I initially create some variables which I need existing before the draw clock area takes over and runs with them indefinitely.

- Edit -
Enceladus, here you go, fixed Binary4Dot:
Attachment 17041
Also, here's the fixed DateTimeLinearClock, for the guy who wanted that originally, since that broke with this update too:
Attachment 17042

Wonko 2011-01-15 18:45

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by Mentalist Traceur (Post 920952)
So am I changing
def __init__([something in here])
or
clock.Clock.__init__([something in here])
or both?

You need to change both:
Code:

def __init__(self, area, id)
    clock.Clock.__init__(self, area, id)


Wonko 2011-01-15 18:48

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by iscio (Post 920936)
sorry, could you explain what is the meaning of "pad zero"? and I installed klingon font but when I use it I see only square
thank you

Pad zeros simply means that the hours are "filled" with zeros if the value is below 10.
E.g.: 8 is displayed as 08 with "pad zeros" enabled.

Which package did you use to install the Klingon fonts?
What clock style do you use?
If it's not the DecimalClock, could you give that one a try.
What Klingon font did you select?

Mentalist Traceur 2011-01-15 22:10

Re: [Announce] Advanced Clock Plugin
 
Quote:

Originally Posted by Wonko (Post 921001)
You need to change both:
Code:

def __init__(self, area, id)
    clock.Clock.__init__(self, area, id)


Much appreciated. I prob'ly have fumbled around trying to figure it out for a while.

NightShift79 2011-01-15 23:14

Re: [Announce] Advanced Clock Plugin
 
thanks Wonko, for the new features!
But I'm lost on how to fix the clocks...
could you include the fixed clocks in a next update?


All times are GMT. The time now is 21:14.

vBulletin® Version 3.8.8