Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Linux (http://www.linux-archive.org/red-hat-linux/)
-   -   Update time only when the spoke is displayed (http://www.linux-archive.org/red-hat-linux/652873-update-time-only-when-spoke-displayed.html)

Vratislav Podzimek 04-05-2012 07:50 AM

Update time only when the spoke is displayed
 
This patch will be squashed with the previous one.

---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index b5fc0ee..0582d92 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -106,10 +106,6 @@ class DatetimeSpoke(NormalSpoke):
self._hoursLabel = self.builder.get_object("hoursLabel")
self._minutesLabel = self.builder.get_object("minutesLabel")

- self._update_time()
- self._update_time_timer_id = GLib.timeout_add_seconds(1, self._update_time)
- self._start_updating_timer_id = None
-
self._tzmap.set_timezone("Europe/Prague")

@property
@@ -117,7 +113,7 @@ class DatetimeSpoke(NormalSpoke):
return _("Something selected")

def apply(self):
- pass
+ GLib.source_remove(self._update_time_timer_id)

@property
def completed(self):
@@ -125,8 +121,9 @@ class DatetimeSpoke(NormalSpoke):
return True

def refresh(self):
- #TODO: setup timer here!
- pass
+ self._update_time()
+ self._update_time_timer_id = GLib.timeout_add_seconds(1, self._update_time)
+ self._start_updating_timer_id = None

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 08:50 PM.

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