[PATCH 1/2] Fix issues with the date&time not being updated on timezone changes

Vratislav Podzimek vpodzime at redhat.com
Thu Dec 11 14:54:08 UTC 2014

We need to wait for the result of _set_timezone because we are interested in its
return value. And we should use timezone map to refresh the selected timezone as
its callbacks update the rest of the spoke correctly.

(port of c7442823e88aa3a164dddf645032e2bcacdf1df0 from rhel7-branch)

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
 pyanaconda/ui/gui/spokes/datetime_spoke.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index bae75b4..b473924 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -29,7 +29,7 @@ from pyanaconda.ui.common import FirstbootSpokeMixIn
 from pyanaconda.ui.gui import GUIObject
 from pyanaconda.ui.gui.spokes import NormalSpoke
 from pyanaconda.ui.categories.localization import LocalizationCategory
-from pyanaconda.ui.gui.utils import gtk_action_nowait, gtk_call_once, override_cell_property
+from pyanaconda.ui.gui.utils import gtk_action_nowait, gtk_action_wait, gtk_call_once, override_cell_property
 from pyanaconda.ui.gui.helpers import GUIDialogInputCheckHandler
 from pyanaconda.ui.helpers import InputCheck
@@ -579,7 +579,7 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
         self._start_updating_timer_id = None
         if is_valid_timezone(self.data.timezone.timezone):
-            self._set_timezone(self.data.timezone.timezone)
+            self._tzmap.set_timezone(self.data.timezone.timezone)
@@ -597,7 +597,7 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
-    @gtk_action_nowait
+    @gtk_action_wait
     def _set_timezone(self, timezone):
         Sets timezone to the city/region comboboxes and the timezone map.

More information about the anaconda-patches mailing list