Skip to content

Update GcalMultiChoice label when format callback changes

Nick Gasson requested to merge nickg/gnome-calendar:issue100 into master

Currently the label text is only updated when set_value is called and the new value is different to the current value. So if a format callback is configured after the GcalMultiChoice is created, this won't be applied until the value is changed to something other than the default.

The problem in issue #100 (closed) is that the default value for "month" is 0=>January. gcal_date_chooser_init sets the format callback and then calls gcal_multi_choice_set_value with value==0 which won't update the label.

Fix by having gcal_multi_choice_set_format_callback update the label text with the result of applying the format callback to the current value.

Fixes #100 (closed)

Edited by Nick Gasson

Merge request reports