LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File set-time-format-unconditionally.patch of Package gnome-calendar (Project home:slosd)

From dd4142f255b59aef0d3374f801ddc4dccd4bc89e Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ernestas.kulik@gmail.com>
Date: Wed, 27 Jul 2016 22:12:57 +0300
Subject: edit-dialog: set time format unconditionally

If GcalEditDialog.format_24h is initialized to zero, the call to
gcal_edit_dialog_set_time_format() from GcalWindow will not make
period_combo boxes visible on systems, where 12-hour clocks are used.
This commit fixes that by removing the if statement from the function.

https://bugzilla.gnome.org/show_bug.cgi?id=765370
---
 src/gcal-edit-dialog.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 3e7569f..435c03a 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -974,13 +974,10 @@ gcal_edit_dialog_set_time_format (GcalEditDialog *dialog,
 {
   g_return_if_fail (GCAL_IS_EDIT_DIALOG (dialog));
 
-  if (dialog->format_24h != use_24h_format)
-  {
-    dialog->format_24h = use_24h_format;
+  dialog->format_24h = use_24h_format;
 
-    gcal_time_selector_set_time_format (GCAL_TIME_SELECTOR (dialog->start_time_selector), dialog->format_24h);
-    gcal_time_selector_set_time_format (GCAL_TIME_SELECTOR (dialog->end_time_selector), dialog->format_24h);
-  }
+  gcal_time_selector_set_time_format (GCAL_TIME_SELECTOR (dialog->start_time_selector), dialog->format_24h);
+  gcal_time_selector_set_time_format (GCAL_TIME_SELECTOR (dialog->end_time_selector), dialog->format_24h);
 }
 
 void