Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   Move date/time and timezone initialization to the end of the refresh method (http://www.linux-archive.org/crash-utility/664748-move-date-time-timezone-initialization-end-refresh-method.html)

Vratislav Podzimek 05-09-2012 02:35 PM

Move date/time and timezone initialization to the end of the refresh method
 
For example timezone change results in a date/time change that needs
date/time updating timers initialized.
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 4a33b42..9676690 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -105,8 +105,6 @@ class DatetimeSpoke(NormalSpoke):
self._hoursLabel = self.builder.get_object("hoursLabel")
self._minutesLabel = self.builder.get_object("minutesLabel")

- self._tzmap.set_timezone("Europe/Prague")
-
@property
def status(self):
if self.data.timezone.timezone:
@@ -124,8 +122,6 @@ class DatetimeSpoke(NormalSpoke):
return True

def refresh(self):
- self._update_datetime()
-
#update the displayed time
self._update_datetime_timer_id = GLib.timeout_add_seconds(1,
self._update_datetime)
@@ -133,6 +129,10 @@ class DatetimeSpoke(NormalSpoke):

if self.data.timezone.timezone:
self._tzmap.set_timezone(self.data.timezone.timezo ne)
+ else:
+ self._tzmap.set_timezone("Europe/Prague")
+
+ self._update_datetime()

def add_to_store(self, store, item):
store.append([item])
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 12:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.