def set_orientation(self, orientation): if orientation == gtk.ORIENTATION_VERTICAL: hildonize.window_to_portrait(self._mainWindow) self.__isPortrait = True elif orientation == gtk.ORIENTATION_HORIZONTAL: hildonize.window_to_landscape(self._mainWindow) self.__isPortrait = False else: raise NotImplementedError(orientation)
def set_orientation(self, orientation): if orientation == gtk.ORIENTATION_VERTICAL: hildonize.window_to_portrait(self._window) self._notebook.set_property("tab-pos", gtk.POS_BOTTOM) self.__isPortrait = True elif orientation == gtk.ORIENTATION_HORIZONTAL: hildonize.window_to_landscape(self._window) self._notebook.set_property("tab-pos", gtk.POS_LEFT) self.__isPortrait = False else: raise NotImplementedError(orientation)
def set_orientation(self, orientation): oldIsPortrait = self._isPortrait if orientation == gtk.ORIENTATION_VERTICAL: hildonize.window_to_portrait(self._window) self._isPortrait = True elif orientation == gtk.ORIENTATION_HORIZONTAL: hildonize.window_to_landscape(self._window) self._isPortrait = False else: raise NotImplementedError(orientation) didChange = oldIsPortrait != self._isPortrait if didChange: self.emit("rotate", orientation) return didChange
def set_orientation(self, orientation): if orientation == gtk.ORIENTATION_VERTICAL: if self.__isPortrait: return hildonize.window_to_portrait(self.win) self.__isPortrait = True self._viewLayout.remove(self._controlLayout) self._mainLayout.add(self._controlLayout) elif orientation == gtk.ORIENTATION_HORIZONTAL: if not self.__isPortrait: return hildonize.window_to_landscape(self.win) self.__isPortrait = False self._mainLayout.remove(self._controlLayout) self._viewLayout.add(self._controlLayout) else: raise NotImplementedError(orientation)
def show(self): if self._isPortrait: hildonize.window_to_portrait(self._window) else: hildonize.window_to_landscape(self._window) self._window.show_all()