Moving some settings around to make life better for loading settigns
authorepage <eopage@byu.net>
Thu, 17 Sep 2009 04:00:29 +0000 (04:00 +0000)
committerepage <eopage@byu.net>
Thu, 17 Sep 2009 04:00:29 +0000 (04:00 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@444 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/constants.py
src/dc_glade.py

index a1b9b08..4e614de 100644 (file)
@@ -3,7 +3,7 @@ import os
 __pretty_app_name__ = "DialCentral"
 __app_name__ = "dialcentral"
 __version__ = "1.0.6"
-__build__ = 4
+__build__ = 5
 __app_magic__ = 0xdeadbeef
 _data_path_ = os.path.join(os.path.expanduser("~"), ".dialcentral")
 _user_settings_ = "%s/settings.ini" % _data_path_
index 49b9bf8..ef53394 100755 (executable)
@@ -463,12 +463,6 @@ class Dialcentral(object):
 
                        if self._alarmHandler is not None:
                                self._alarmHandler.load_settings(config, "alarm")
-
-                       previousOrientation = config.getint(constants.__pretty_app_name__, "orientation")
-                       if previousOrientation == gtk.ORIENTATION_HORIZONTAL:
-                               hildonize.window_to_landscape(self._window)
-                       elif previousOrientation == gtk.ORIENTATION_VERTICAL:
-                               hildonize.window_to_portrait(self._window)
                except ConfigParser.NoOptionError, e:
                        logging.exception(
                                "Settings file %s is missing section %s" % (
@@ -509,6 +503,28 @@ class Dialcentral(object):
                                        ),
                                )
 
+               # @todo down here till this issue is fixed
+               try:
+                       previousOrientation = config.getint(constants.__pretty_app_name__, "orientation")
+                       if previousOrientation == gtk.ORIENTATION_HORIZONTAL:
+                               hildonize.window_to_landscape(self._window)
+                       elif previousOrientation == gtk.ORIENTATION_VERTICAL:
+                               hildonize.window_to_portrait(self._window)
+               except ConfigParser.NoOptionError, e:
+                       logging.exception(
+                               "Settings file %s is missing section %s" % (
+                                       constants._user_settings_,
+                                       e.section,
+                               ),
+                       )
+               except ConfigParser.NoSectionError, e:
+                       logging.exception(
+                               "Settings file %s is missing section %s" % (
+                                       constants._user_settings_,
+                                       e.section,
+                               ),
+                       )
+
        def save_settings(self, config):
                """
                @note Thread Agnostic