FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

 
 
LinkBack Thread Tools
 
Old 04-02-2012, 03:13 PM
Vratislav Podzimek
 
Default Change timezone on the map when a different city is chosen

---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index c519571..488642e 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -196,7 +196,24 @@ class DatetimeSpoke(NormalSpoke):
self._citiesFilter.refilter()

def on_city_changed(self, *args):
- pass
+ timezone = None
+
+ regions_model = self._regionCombo.get_model()
+ regions_iter = self._regionCombo.get_active_iter()
+ region = regions_model[regions_iter][0]
+
+ cities_model = self._cityCombo.get_model()
+ cities_iter = self._cityCombo.get_active_iter()
+ if cities_iter: #there can be no city selected
+ city = cities_model[cities_iter][0]
+ else:
+ city = None
+
+ if city and region:
+ timezone = region + "/" + city
+
+ if timezone and (self._tzmap.get_timezone() != timezone):
+ self._tzmap.set_timezone(timezone)

def on_month_changed(self, *args):
self._daysFilter.refilter()
--
1.7.4.4

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

Thread Tools




All times are GMT. The time now is 10:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org