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 > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 05-09-2012, 02:35 PM
Vratislav Podzimek
 
Default Try to preset the timezone to the language-related one

Once we have a GeoIP available, we should use it for guessing
right timezone, but for now, try to use the chosen language.
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 +-
pyanaconda/ui/gui/spokes/welcome.py | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 82515ea..4a33b42 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -132,7 +132,7 @@ class DatetimeSpoke(NormalSpoke):
self._start_updating_timer_id = None

if self.data.timezone.timezone:
- self._tzmap.emit("timezone-changed", self.data.timezone.timezone)
+ self._tzmap.set_timezone(self.data.timezone.timezo ne)

def add_to_store(self, store, item):
store.append([item])
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 8f82745..279027b 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -29,6 +29,7 @@ from pyanaconda.ui.gui.utils import enlightbox
from pyanaconda.localization import Language, LOCALE_PREFERENCES
from pyanaconda.product import productName, productVersion
from pyanaconda import xklavier
+from pyanaconda import localization

__all__ = ["WelcomeLanguageSpoke"]

@@ -70,6 +71,12 @@ class WelcomeLanguageSpoke(StandaloneSpoke):
if layout not in self.data.keyboard.layouts_list:
self.data.keyboard.layouts_list.append(layout)

+ #TODO: better use GeoIP data once it is available
+ if self.language.territory and not self.data.timezone.timezone:
+ lang_timezone = localization.get_preferred_timezone(self.language. territory)
+ if lang_timezone:
+ self.data.timezone.timezone = lang_timezone
+
@property
def completed(self):
return self.data.lang.lang and self.data.lang.lang != ""
--
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 02:17 AM.

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