コード例 #1
0
ファイル: gonvert_glade.py プロジェクト: epage/gonvert-gtk
	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)
コード例 #2
0
ファイル: dc_glade.py プロジェクト: epage/dialcentral-gtk
	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)
コード例 #3
0
ファイル: _base.py プロジェクト: epage/Waters-of-Shiloah
	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
コード例 #4
0
ファイル: Gui.py プロジェクト: 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)
コード例 #5
0
ファイル: _base.py プロジェクト: epage/Waters-of-Shiloah
	def show(self):
		if self._isPortrait:
			hildonize.window_to_portrait(self._window)
		else:
			hildonize.window_to_landscape(self._window)
		self._window.show_all()