GNOME Bugzilla – Bug 681931
Alarms - minutes should always have two digits
Last modified: 2012-08-16 16:53:34 UTC
The minutes in the new alarm dialog can only have one digit. This is also how they are displayed in the alarms view. The minutes should always have two digits. eg. 5.01 PM or 18:03.
Any reason to not use gtkSpinButton in New Alarm dialog ? Why create a custom control (AlarmDialogSpin) which reproduce it ? By the way it would be easier and cleaner to fix this bug by using a gtkSpinButton.
Because they wanted the time to cycle, could we do that using GtkSpinButton ?
Of course. Just set the max and min value for the gtkspinbutton (with a step of one), that's just one line of code. Then just set the wrap flag : gtk_spin_button.set_wrap () to make it cycle. Max 3-4 line of code to achieve that. I will provide a patch to demonstrate it.
Created attachment 221368 [details] [review] Replace AlarmDialogSpin with standard GtkSpinButton. Here is the cleanup, removed a lot of code. I'm working on fixing the two digit bug now.
Created attachment 221371 [details] [review] Add leading zero to minutes when necessary Fixed in this patch, apply on top of the previous.
Created attachment 221419 [details] How it looks when converting AlarmDialogSpin to GtkSpinButton Here is the screenshot after the change !
(In reply to comment #6) > Created an attachment (id=221419) [details] > How it looks when converting AlarmDialogSpin to GtkSpinButton > > Here is the screenshot after the change ! Looks good, except that the buttons are misaligned at the bottom (maybe a separate bug).
Yep it is a separate bug, the same behaviour occurs with AlarmDialogSpintoo ;)
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.