Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 def on_close1_activate(self, widget):
     gmwidg = gamewidget.cur_gmwidg()
     game_handler.closeGame(gmwidg)
Exemplo n.º 5
0
 def on_close1_activate(self, widget):
     gmwidg = gamewidget.cur_gmwidg()
     game_handler.closeGame(gmwidg)