예제 #1
0
    def show_about(self, widget, data):
        if self.aboutWindow == None:
            self.aboutWindow = AboutWindow()
            self.aboutWindow.set_transient_for(self)

        if self.aboutWindow.run() == RESPONSE_CANCEL:
            self.aboutWindow.hide()
예제 #2
0
파일: App.py 프로젝트: mougenj/RD4F-Tool
 def openAbout(self):
     """
         Open a window that display informations about the author of this
         application.
     """
     dialog = AboutWindow(self)
     dialog.show()
예제 #3
0
class MainWindow(Window):
    def __init__(self):
        Window.__init__(self)

        self.model = ListStore(str, str)

        self.aboutWindow = None
        self.helper = Helper(None)

        self.set_title('Gnome Custom Shortcuts')
        self.set_icon_from_file(join(data_path, 'icon.svg'))
        self.set_border_width(5)
        self.set_size_request(400, 400)

        list = TreeView()
        list.append_column(TreeViewColumn(''))
        list.append_column(TreeViewColumn('Command'))
        list.append_column(TreeViewColumn('Shortcut'))

        closeButton = Button(None, STOCK_CLOSE)
        aboutButton = Button(None, STOCK_ABOUT)

        buttonsBox = HButtonBox()
        buttonsBox.pack_start(aboutButton, False, False, 0)
        buttonsBox.pack_start(Label(''), True, True, 0)
        buttonsBox.pack_start(closeButton, False, False, 0)

        box = VBox(False, 5)
        box.pack_start(list, True, True, 0)
        box.pack_start(buttonsBox, False, False, 0)

        self.connect('destroy', main_quit, None)
        closeButton.connect('clicked', main_quit, None)
        aboutButton.connect('clicked', self.show_about, None)

        self.add(box)
        self.show_all()

    def show_about(self, widget, data):
        if self.aboutWindow == None:
            self.aboutWindow = AboutWindow()
            self.aboutWindow.set_transient_for(self)

        if self.aboutWindow.run() == RESPONSE_CANCEL:
            self.aboutWindow.hide()

    def refresh(self):
        pass
예제 #4
0
	def handle_event(self, event):
		if type(event) is sf.KeyEvent and event.pressed is True:
			if event.code is sf.Keyboard.UP:
				self.move_cursor_up()
			elif event.code is sf.Keyboard.DOWN:
				self.move_cursor_down()
			elif event.code is sf.Keyboard.RETURN:
				if self._selection_cursor is 0:
					main_game_window = MainGameWindow(self._window)
					main_game_window.open()
				elif self._selection_cursor is 1: # Two Players
					two_players_window = TwoPlayersWindow(self._window)
					two_players_window.open()
				elif self._selection_cursor is 2: # About
					about_window = AboutWindow(self._window)
					about_window.open()
				elif self._selection_cursor is 3: # Exit
					exit_window = ExitMenu(self._window)
					exit_window.open()
				else: print('Unknown command: ' + str(self._selection_cursor))
예제 #5
0
 def handle_event(self, event):
     if type(event) is sf.KeyEvent and event.pressed is True:
         if event.code is sf.Keyboard.UP:
             self.move_cursor_up()
         elif event.code is sf.Keyboard.DOWN:
             self.move_cursor_down()
         elif event.code is sf.Keyboard.RETURN:
             if self._selection_cursor is 0:
                 main_game_window = MainGameWindow(self._window)
                 main_game_window.open()
             elif self._selection_cursor is 1:  # Two Players
                 two_players_window = TwoPlayersWindow(self._window)
                 two_players_window.open()
             elif self._selection_cursor is 2:  # About
                 about_window = AboutWindow(self._window)
                 about_window.open()
             elif self._selection_cursor is 3:  # Exit
                 exit_window = ExitMenu(self._window)
                 exit_window.open()
             else:
                 print('Unknown command: ' + str(self._selection_cursor))
예제 #6
0
파일: MainWindow.py 프로젝트: faro93/YARCoM
 def About(self):
     aboutWindowTitle = "About..."
     aboutWindow = AboutWindow(None, aboutWindowTitle, self.windowTitle)
예제 #7
0
 def showAbout(self):
     wecase_about = AboutWindow()
     wecase_about.exec_()
예제 #8
0
 def __about_window(self, *args):
     about_window = AboutWindow()
     about_window.show()
예제 #9
0
파일: main.py 프로젝트: Tawmu/PyTasker
 def on_actionAboutMenu_triggered(self):
     AboutWindowShow = AboutWindow()
     AboutWindowShow.exec_()
예제 #10
0
 def showAbout(self):
     wecase_about = AboutWindow()
     wecase_about.exec_()
예제 #11
0
 def on_actAbout_triggered(self):
     dlgAbout = AboutWindow(self)
     dlgAbout.show()
예제 #12
0
 def doShowCredits(self, event):
     AboutWindow(self).Show(True)
예제 #13
0
 def aboutPressed(self):
     AboutWindow(self.root)