From 50d9c2ed3c66110399b422ef6bd390b6526a111a Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Thu, 25 Jun 2009 10:47:59 +0300 Subject: [PATCH] Remove unnecessary function call redundant checks in HildonTimeSelector * hildon/hildon-time-selector.c: (update_format_policy): Do not call update_format_dependant_columns() if not necessary. (update_format_dependant_columns): Remove unnecessary check for the number of columns. --- ChangeLog | 7 +++++++ hildon/hildon-time-selector.c | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65131fd..9ef74ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-06-25 Claudio Saavedra + + * hildon/hildon-time-selector.c: (update_format_policy): Do + not call update_format_dependant_columns() if not necessary. + (update_format_dependant_columns): Remove unnecessary check for + the number of columns. + 2009-06-24 Claudio Saavedra * hildon/hildon-note.c (+hildon_note_constructor), diff --git a/hildon/hildon-time-selector.c b/hildon/hildon-time-selector.c index e64d375..bf6ff13 100644 --- a/hildon/hildon-time-selector.c +++ b/hildon/hildon-time-selector.c @@ -548,7 +548,7 @@ update_format_policy (HildonTimeSelector *selector, break; } - if (prev_ampm_format != selector->priv->ampm_format) { + if (prev_ampm_format != selector->priv->ampm_format && num_columns >= 2) { update_format_dependant_columns (selector, hours, minutes); } } @@ -559,13 +559,6 @@ update_format_dependant_columns (HildonTimeSelector *selector, guint hours, guint minutes) { - gint num_columns = -1; - - num_columns = hildon_touch_selector_get_num_columns (HILDON_TOUCH_SELECTOR (selector)); - if (num_columns < 2) {/* we are on the object construction */ - return; - } - /* To avoid an extra and wrong VALUE_CHANGED signal on the model update */ hildon_touch_selector_block_changed (HILDON_TOUCH_SELECTOR(selector)); -- 1.7.9.5