def on_close1_activate(self, widget): persp = perspective_manager.current_perspective if persp.name == "games": gmwidg = gamewidget.cur_gmwidg() game_handler.closeGame(gmwidg) elif persp.name == "database": persp.close()
def on_quit1_activate(self, widget, *args): if isinstance(widget, Gdk.Event): if len(game_handler.gamewidgets) == 1 and conf.get("hideTabs", False): gmwidg = gamewidget.cur_gmwidg() game_handler.closeGame(gmwidg, gmwidg.gamemodel) return True elif len(game_handler.gamewidgets) >= 1 and conf.get("closeAll", False): game_handler.closeAllGames(game_handler.gamewidgets) return True if game_handler.closeAllGames(game_handler.gamewidgets) in ( Gtk.ResponseType.OK, Gtk.ResponseType.YES): Gtk.main_quit() else: return True
def on_quit1_activate(self, widget, *args): if isinstance(widget, Gdk.Event): if len(game_handler.gamewidgets) == 1 and conf.get("hideTabs", False): gmwidg = gamewidget.cur_gmwidg() game_handler.closeGame(gmwidg, gmwidg.gamemodel) return True elif len(game_handler.gamewidgets) >= 1 and conf.get("closeAll", False): game_handler.closeAllGames(game_handler.gamewidgets) return True if game_handler.closeAllGames(game_handler.gamewidgets) in ( Gtk.ResponseType.OK, Gtk.ResponseType.YES): ICLogon.stop() self.app.quit() else: return True
def on_close1_activate(self, widget): gmwidg = gamewidget.cur_gmwidg() game_handler.closeGame(gmwidg)
def on_close1_activate(self, widget): gmwidg = gamewidget.cur_gmwidg() game_handler.closeGame(gmwidg)