Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#2819 closed defect (fixed)

Clock activity does not initially center full time text

Reported by: greenfeld Owned by: garycmartin
Priority: Low Milestone: Unspecified
Component: Clock Version: 0.92.x
Severity: Unspecified Keywords: 11.3.0, olpc-test
Cc: manuq Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

When the "Display time in full letters" button is enabled, the text that appears is not centered the first time it is displayed.

After a new minute passes then the text gets updated and centered.

Seen in OLPC 11.2.0 os17.

Change History (9)

comment:1 Changed 13 years ago by greenfeld

  • Summary changed from Clock activity does not to Clock activity does not initially center full time text

comment:2 Changed 13 years ago by godiard

  • Priority changed from Unspecified by Maintainer to Low

comment:3 follow-up: Changed 13 years ago by manuq

Confirmed with my XO. It seems that the text is not centered again when the string changes from the default "What time is it?" to the actual text with the time in letters in the _time_letters gtk label.

I tried calling _time_letters.queue_draw() and self.redraw_canvas() but wasn't succeed :(

The bug is not happening in my development machine running Sugar from sugar-jhbuild .

comment:4 Changed 13 years ago by manuq

  • Cc manuq added

comment:5 in reply to: ↑ 3 Changed 13 years ago by garycmartin

Replying to manuq:

Confirmed with my XO. It seems that the text is not centered again when the string changes from the default "What time is it?" to the actual text with the time in letters in the _time_letters gtk label.

I tried calling _time_letters.queue_draw() and self.redraw_canvas() but wasn't succeed :(

The bug is not happening in my development machine running Sugar from sugar-jhbuild .

Yea, it's something related to the new Fedora, didn't happen in previous olpc official releases. I tried to work on it but it looks like a gtk idle race thing as the original Clock developer decided to do the text rendering in a background thread (have been considering refactoring this out). When first enabled the text gets incorrectly centred based on the 'what time is it?' string before the real time text is generated. It's centered correctly on the next redraw (each min, or if you show the date text).

comment:6 Changed 13 years ago by godiard

  • Keywords 11.3.0 added; 11.2.0 removed

comment:7 Changed 12 years ago by manuq

This image shows the problem:

http://dev.laptop.org/~manuq/clock_text_bug.png

I think a refactor that removes the two threads will work.

comment:8 Changed 12 years ago by garycmartin

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in git by removing idle updates, should be in release Clock-7.

comment:9 Changed 12 years ago by manuq

  • Keywords olpc-test added

Very good Gary, the bug is gone. Tested in XO 1.75 and XO 1.5.

Note: See TracTickets for help on using tickets.