Opened 11 years ago

Closed 11 years ago

#2170 closed enhancement (fixed)

[PATCH] revert button in time preflet + bugfix

Reported by: stpere Owned by: stippi
Priority: normal Milestone: R1
Component: Preferences/Time & Date Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

  1. I've added a revert button in Time preflet.

Pressing Revert returns to the date time that was active at the time the preflet started + the uptime of the preflet. The uptime is incremented every time there is a clock tick, I'm pretty sure it's a bad way to do it. Suggestions are welcome -- like if there was a uptime() method or something, that would be perfect ;-)

Changing timezones shouldn't affect the revert functionality.


  1. I have also fixed a bug where clicking multiple times on an already selected radio button (local time or gmt) would not toggle it graphically but would still toggle logically (the time changed..) I've fixed that bad behaviour.

Attachments (1)

timepref.diff (5.9 KB ) - added by stpere 11 years ago.
Adds a revert button in Time preflets and fix the toggle bug on GMT/localtime radio buttons

Download all attachments as: .zip

Change History (4)

by stpere, 11 years ago

Attachment: timepref.diff added

Adds a revert button in Time preflets and fix the toggle bug on GMT/localtime radio buttons

comment:1 by axeld, 11 years ago

The uptime should really be computed differently. The easiest way would be to use system_time() which counts the micro seconds since the computer was started - it's not affected by time changes.

comment:2 by stippi, 11 years ago

Owner: changed from axeld to stippi
Status: newassigned

What Axel said... I am on it! :-)

comment:3 by stippi, 11 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev25210. Philippe, you could look into the button placement if you want. It could be placed below the tab view instead, and also revert time zone changes.

Note: See TracTickets for help on using tickets.