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 openAbout(self): """ Open a window that display informations about the author of this application. """ dialog = AboutWindow(self) dialog.show()
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
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))
def About(self): aboutWindowTitle = "About..." aboutWindow = AboutWindow(None, aboutWindowTitle, self.windowTitle)
def showAbout(self): wecase_about = AboutWindow() wecase_about.exec_()
def __about_window(self, *args): about_window = AboutWindow() about_window.show()
def on_actionAboutMenu_triggered(self): AboutWindowShow = AboutWindow() AboutWindowShow.exec_()
def on_actAbout_triggered(self): dlgAbout = AboutWindow(self) dlgAbout.show()
def doShowCredits(self, event): AboutWindow(self).Show(True)
def aboutPressed(self): AboutWindow(self.root)