View Single Post
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#363
Wonko: Which issue do you mean? The clock applet button disappearing from the menu? No, this update hasn't fixed it. (To be clear, this is the stock button that's in the hildon status menu. That clock applet. The normal advanced clock plugin in the status area still works.) I know I can replace the .desktop files, I can figure that out. Am i really the only one for whom that applet vanished?NVM, I started typing this like 45 minutes before posting, and had massive distractions in between, so in the meantime people had time to answer.

To be clear this is what I meant:
Name:  Screenshot-20110201-174618.jpg
Views: 409
Size:  22.4 KB
Note the absence of the normal button that you can click to get to the Clock menu. Like I said, I can easily switch the .desktop files around, I'm just wondering if this has happened to anyone else. Also, I'm on the Community SSU by the way. (Clock works just fine though.)

Now, I may have a basic patch for you, to make it possible for a clock style to specify that it is to be redrawn every second even when only minutes are shown (necessary for mine, because I have all the cpu/mem/internet-traffic bars updating every second, but I'm sure other people might come up with clock styles like mine..).

I changed line 165 in /usr/lib/hildon-desktop/advanced-clock-plugin.py from:
Code:
        if self.clock.get_show_seconds() or (self.old_time == None) or (self.old_time.minute != self.time.minute):
to:
Code:
        if self.clock.force_redraw == 1 or self.clock.get_show_seconds() or (self.old_time == None) or (self.old_time.minute != self.time.minute):
And added this under line 37 of /opt/maemo/usr/lib/advanced-clock-plugin/clock.py (moving everything down by one obviously):
Code:
        self.force_redraw = 0
Victory. From here all you need to do is add self.force_redraw = 1 in the init area of your clock style, to make it redraw every second. Not extensively tested, but works with all thenormal styles I tried it with (I haven't messed with klingon fonts or the picture-using ones).

- Edit -

You can ignore the first part, I see the issue has been identified already.

Last edited by Mentalist Traceur; 2011-02-02 at 00:21. Reason: People posted while I typed.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post: