Esempio n. 1
0
	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)
Esempio n. 2
0
	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)
Esempio n. 3
0
	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
Esempio n. 4
0
File: Gui.py Progetto: epage/nqaap
    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)
Esempio n. 5
0
	def show(self):
		if self._isPortrait:
			hildonize.window_to_portrait(self._window)
		else:
			hildonize.window_to_landscape(self._window)
		self._window.show_all()