Exemplo n.º 1
0
    def do_activate(self):
        # asyncio.async(self.print_tasks())
        self.add_window(self.window)
        self.window.show_all()
        gamewidget.getWidgets()["player_rating1"].hide()
        gamewidget.getWidgets()["leave_fullscreen1"].hide()

        # Externals download dialog
        if not conf.get("dont_show_externals_at_startup", False):
            externals_dialog = ExternalsDialog()
            externals_dialog.show()

        # Tip of the day dialog
        if conf.get("show_tip_at_startup", False):
            tip_of_the_day = TipOfTheDay()
            tip_of_the_day.show()

        dd = DiscovererDialog(discoverer)
        self.dd_task = asyncio. async (dd.start())
Exemplo n.º 2
0
    def do_activate(self):
        # asyncio.async(self.print_tasks())
        self.add_window(self.window)
        self.window.show_all()
        gamewidget.getWidgets()["player_rating1"].hide()
        gamewidget.getWidgets()["leave_fullscreen1"].hide()

        # Externals download dialog
        if not conf.get("dont_show_externals_at_startup", False):
            externals_dialog = ExternalsDialog()
            externals_dialog.show()

        # Tip of the day dialog
        if conf.get("show_tip_at_startup", False):
            tip_of_the_day = TipOfTheDay()
            tip_of_the_day.show()

        dd = DiscovererDialog(discoverer)
        self.dd_task = asyncio.async(dd.start())
Exemplo n.º 3
0
    def do_activate(self):
        # create_task(self.print_tasks())
        self.add_window(self.window)
        self.window.show_all()
        gamewidget.getWidgets()["player_rating1"].hide()
        gamewidget.getWidgets()["leave_fullscreen1"].hide()

        # Externals download dialog
        if not conf.get("dont_show_externals_at_startup"):
            externals_dialog = ExternalsDialog()
            externals_dialog.show()

        # Tip of the day dialog
        if conf.get("show_tip_at_startup"):
            tip_of_the_day = TipOfTheDay()
            tip_of_the_day.show()

        preferencesDialog.run(gamewidget.getWidgets())

        def on_all_engine_discovered(discoverer):
            engine = discoverer.getEngineByName(discoverer.getEngineLearn())
            if engine is None:
                engine = discoverer.getEngineN(-1)
            default_engine = engine.get("md5")
            conf.set("ana_combobox", default_engine)
            conf.set("inv_ana_combobox", default_engine)

        # Try to set conf analyzer engine on very first start of pychess
        if conf.get("ana_combobox") == 0:
            discoverer.connect_after("all_engines_discovered",
                                     on_all_engine_discovered)

        dd = DiscovererDialog(discoverer)
        self.dd_task = create_task(dd.start())

        style_ctxt = gamewidget.getWidgets()["main_window"].get_style_context()
        LIGHT = hexcol(style_ctxt.lookup_color("p_light_color")[1])
        DARK = hexcol(style_ctxt.lookup_color("p_dark_color")[1])
        conf.DEFAULTS["General"]["lightcolour"] = LIGHT
        conf.DEFAULTS["General"]["darkcolour"] = DARK

        self.splash.destroy()
Exemplo n.º 4
0
    def do_activate(self):
        # create_task(self.print_tasks())
        self.add_window(self.window)
        self.window.show_all()
        gamewidget.getWidgets()["player_rating1"].hide()
        gamewidget.getWidgets()["leave_fullscreen1"].hide()

        # Externals download dialog
        if not conf.get("dont_show_externals_at_startup"):
            externals_dialog = ExternalsDialog()
            externals_dialog.show()

        # Tip of the day dialog
        if conf.get("show_tip_at_startup"):
            tip_of_the_day = TipOfTheDay()
            tip_of_the_day.show()

        preferencesDialog.run(gamewidget.getWidgets())

        def on_all_engine_discovered(discoverer):
            engine = discoverer.getEngineByName(discoverer.getEngineLearn())
            if engine is None:
                engine = discoverer.getEngineN(-1)
            default_engine = engine.get("md5")
            conf.set("ana_combobox", default_engine)
            conf.set("inv_ana_combobox", default_engine)

        # Try to set conf analyzer engine on very first start of pychess
        if conf.get("ana_combobox") == 0:
            discoverer.connect_after("all_engines_discovered", on_all_engine_discovered)

        dd = DiscovererDialog(discoverer)
        self.dd_task = create_task(dd.start())

        style_ctxt = gamewidget.getWidgets()["main_window"].get_style_context()
        LIGHT = hexcol(style_ctxt.lookup_color("p_light_color")[1])
        DARK = hexcol(style_ctxt.lookup_color("p_dark_color")[1])
        conf.set("lightcolour", LIGHT)
        conf.set("darkcolour", DARK)
Exemplo n.º 5
0
 def on_TipOfTheDayMenuItem_activate(self, widget):
     tip_of_the_day = TipOfTheDay()
     tip_of_the_day.show()
Exemplo n.º 6
0
 def on_TipOfTheDayMenuItem_activate(self, widget):
     tip_of_the_day = TipOfTheDay()
     tip_of_the_day.show()