From: Neal H. Walfield Date: Tue, 6 Sep 2011 08:57:43 +0000 (+0200) Subject: Set the orientation before showing the main window. X-Git-Url: http://vcs.maemo.org/git/?p=feedingit;a=commitdiff_plain;h=38d618823f701656fa3b214437526d7925bc9c45 Set the orientation before showing the main window. - Avoid a gratuitious orientation change and speed up start up time. --- diff --git a/src/FeedingIt.py b/src/FeedingIt.py index 68fb7db..cdf478e 100644 --- a/src/FeedingIt.py +++ b/src/FeedingIt.py @@ -1100,10 +1100,19 @@ class FeedingIt: def __init__(self): # Init the windows self.window = hildon.StackableWindow() - self.window.set_title(__appname__) hildon.hildon_gtk_window_set_progress_indicator(self.window, 1) - self.mainVbox = gtk.VBox(False,10) + + self.config = Config(self.window, CONFIGDIR+"config.ini") + + try: + self.orientation = FremantleRotation(__appname__, main_window=self.window, app=self) + self.orientation.set_mode(self.config.getOrientation()) + except Exception, e: + logger.warn("Could not start rotation manager: %s" % str(e)) + self.window.set_title(__appname__) + self.mainVbox = gtk.VBox(False,10) + if isfile(CONFIGDIR+"/feeds.db"): self.introLabel = gtk.Label("Loading...") else: @@ -1113,7 +1122,6 @@ class FeedingIt: self.window.add(self.mainVbox) self.window.show_all() - self.config = Config(self.window, CONFIGDIR+"config.ini") gobject.idle_add(self.createWindow) def createWindow(self): @@ -1121,11 +1129,6 @@ class FeedingIt: self.listing = Listing(self.config, CONFIGDIR) self.downloadDialog = False - try: - self.orientation = FremantleRotation(__appname__, main_window=self.window, app=self) - self.orientation.set_mode(self.config.getOrientation()) - except Exception, e: - logger.warn("Could not start rotation manager: %s" % str(e)) menu = hildon.AppMenu() # Create a button and add it to the menu