diff --git a/po/de_pysol.po b/po/de_pysol.po index f4edb0c1e..1cb1a6f3a 100644 --- a/po/de_pysol.po +++ b/po/de_pysol.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PySol 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:21-0500\n" +"PO-Revision-Date: 2024-12-22 17:14-0500\n" "Last-Translator: H. Schaekel \n" "Language-Team: German\n" "Language: de\n" @@ -5353,7 +5353,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5498,6 +5498,9 @@ msgstr "" msgid "Save games &geometry" msgstr "Spielgeometrie speichern" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/fr_pysol.po b/po/fr_pysol.po index 9a77aa429..b5c876d0d 100644 --- a/po/fr_pysol.po +++ b/po/fr_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 1.02\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:21-0500\n" +"PO-Revision-Date: 2024-12-22 17:14-0500\n" "Last-Translator: Eric Rausch \n" "Language-Team: French\n" "Language: fr\n" @@ -5399,7 +5399,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5544,6 +5544,9 @@ msgstr "Barre d'&aide" msgid "Save games &geometry" msgstr "Enregistrer la &géométrie du jeu" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/it_pysol.po b/po/it_pysol.po index 12e5b7324..a834b63df 100644 --- a/po/it_pysol.po +++ b/po/it_pysol.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: it_pysol\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:21-0500\n" +"PO-Revision-Date: 2024-12-22 17:14-0500\n" "Last-Translator: Giuliano Colla \n" "Language-Team: Italiano \n" "Language: it\n" @@ -5464,7 +5464,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5609,6 +5609,9 @@ msgstr "Mostra barra di a&iuto" msgid "Save games &geometry" msgstr "Salva gioco e &geometria" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/pl_pysol.po b/po/pl_pysol.po index b8e2a646a..b3d611573 100644 --- a/po/pl_pysol.po +++ b/po/pl_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PySolFC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:22-0500\n" +"PO-Revision-Date: 2024-12-22 17:13-0500\n" "Last-Translator: Jerzy Trzeciak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -5415,7 +5415,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5560,6 +5560,9 @@ msgstr "Pokaż pasek pomocy" msgid "Save games &geometry" msgstr "Zapisz układ &gier" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/pt_BR_pysol.po b/po/pt_BR_pysol.po index 3b0e0f544..7b4048adc 100644 --- a/po/pt_BR_pysol.po +++ b/po/pt_BR_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:23-0500\n" +"PO-Revision-Date: 2024-12-22 17:13-0500\n" "Last-Translator: Matheus Knack \n" "Language-Team: \n" "Language: pt_BR\n" @@ -5421,7 +5421,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5566,6 +5566,9 @@ msgstr "Mostra &barra de ajuda" msgid "Save games &geometry" msgstr "Salvar jogos &geometria" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/pysol.pot b/po/pysol.pot index 51fc5659e..b663b0fa5 100644 --- a/po/pysol.pot +++ b/po/pysol.pot @@ -5147,7 +5147,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5292,6 +5292,9 @@ msgstr "" msgid "Save games &geometry" msgstr "" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/po/ru_pysol.po b/po/ru_pysol.po index 07fa70c97..d1844485c 100644 --- a/po/ru_pysol.po +++ b/po/ru_pysol.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-16 11:23-0500\n" +"PO-Revision-Date: 2024-12-22 17:13-0500\n" "Last-Translator: Skomoroh \n" "Language-Team: Russian \n" "Language: ru\n" @@ -5489,7 +5489,7 @@ msgstr "" msgid "&Hamming" msgstr "" -msgid "Card la&yout" +msgid "Game la&yout" msgstr "" msgid "&Spread stacks" @@ -5634,6 +5634,9 @@ msgstr "Показывать панель помощи" msgid "Save games &geometry" msgstr "Сохранение &геометрии игры" +msgid "&Keep dialogs on top" +msgstr "" + msgid "Othe&r graphics" msgstr "" diff --git a/pysollib/actions.py b/pysollib/actions.py index cac2e3ae6..318bfb5ef 100644 --- a/pysollib/actions.py +++ b/pysollib/actions.py @@ -535,12 +535,12 @@ def mFindCard(self, *args): if self.game.canFindCard(): create_find_card_dialog(self.game.top, self.game, self.app.getFindCardImagesDir()) - raise_find_card_dialog() + raise_find_card_dialog(self.game) def mFullPicture(self, *args): if self.game.canShowFullPicture(): create_full_picture_dialog(self.game.top, self.game) - raise_full_picture_dialog() + raise_full_picture_dialog(self.game) def mSolver(self, *args): create_solver_dialog(self.game.top, self.app) @@ -832,6 +832,10 @@ def mOptTimeouts(self, *args): self.app.opt.timeouts['highlight_samerank'] = \ d.highlight_samerank_timeout + def raiseAll(self): + raise_find_card_dialog(self.game) + raise_full_picture_dialog(self.game) + # # Help menu # diff --git a/pysollib/app.py b/pysollib/app.py index 55381012a..3237e90df 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -515,8 +515,8 @@ def wm_toggle_fullscreen(self): self.opt.wm_fullscreen = not self.opt.wm_fullscreen self.top.attributes("-fullscreen", self.opt.wm_fullscreen) # Topmost dialogs need to be reset when toggling fullscreen. - raise_find_card_dialog() - raise_full_picture_dialog() + raise_find_card_dialog(self.game) + raise_full_picture_dialog(self.game) self.top.attributes('-topmost', False) def loadImages1(self): diff --git a/pysollib/kivy/findcarddialog.py b/pysollib/kivy/findcarddialog.py index 074489bd1..64858d6e5 100644 --- a/pysollib/kivy/findcarddialog.py +++ b/pysollib/kivy/findcarddialog.py @@ -69,7 +69,7 @@ def connect_game_find_card_dialog(game): ''' -def raise_find_card_dialog(): +def raise_find_card_dialog(game): pass diff --git a/pysollib/kivy/fullpicturedialog.py b/pysollib/kivy/fullpicturedialog.py index 88ec4ad0f..7e83b0713 100644 --- a/pysollib/kivy/fullpicturedialog.py +++ b/pysollib/kivy/fullpicturedialog.py @@ -108,7 +108,7 @@ def connect_game_full_picture_dialog(game): ''' -def raise_full_picture_dialog(): +def raise_full_picture_dialog(game): pass diff --git a/pysollib/options.py b/pysollib/options.py index f0b59a78c..e6456fad5 100644 --- a/pysollib/options.py +++ b/pysollib/options.py @@ -123,6 +123,7 @@ def calcCustomMouseButtonsBinding(binding_format): dragcursor = boolean save_games_geometry = boolean game_geometry = int_list(min=2, max=2) +topmost_dialogs = boolean sound = boolean sound_mode = integer(0, 1) sound_sample_volume = integer(0, 128) @@ -300,6 +301,7 @@ class Options: # ('save_cardsets', 'bool'), ('dragcursor', 'bool'), ('save_games_geometry', 'bool'), + ('topmost_dialogs', 'bool'), ('sound', 'bool'), ('sound_mode', 'int'), ('sound_sample_volume', 'int'), @@ -501,6 +503,7 @@ def __init__(self): self.wm_maximized = 1 self.wm_fullscreen = 0 self.save_games_geometry = False + self.topmost_dialogs = True # saved games geometry (gameid: (width, height)) self.games_geometry = {} self.game_geometry = (0, 0) # game geometry before exit diff --git a/pysollib/pysolgtk/findcarddialog.py b/pysollib/pysolgtk/findcarddialog.py index 79b3451fc..d05d924d7 100644 --- a/pysollib/pysolgtk/findcarddialog.py +++ b/pysollib/pysolgtk/findcarddialog.py @@ -50,7 +50,7 @@ def connect_game_find_card_dialog(game): pass -def raise_find_card_dialog(): +def raise_find_card_dialog(game): pass diff --git a/pysollib/pysolgtk/fullpicturedialog.py b/pysollib/pysolgtk/fullpicturedialog.py index 77588aeda..5b7a6854f 100644 --- a/pysollib/pysolgtk/fullpicturedialog.py +++ b/pysollib/pysolgtk/fullpicturedialog.py @@ -50,7 +50,7 @@ def connect_game_full_picture_dialog(game): pass -def raise_find_card_dialog(): +def raise_find_card_dialog(game): pass diff --git a/pysollib/ui/tktile/findcarddialog.py b/pysollib/ui/tktile/findcarddialog.py index 83bc492dd..98e4f471b 100644 --- a/pysollib/ui/tktile/findcarddialog.py +++ b/pysollib/ui/tktile/findcarddialog.py @@ -243,10 +243,13 @@ def connect_game_find_card_dialog(game): pass -def raise_find_card_dialog(): +def raise_find_card_dialog(game): try: - find_card_dialog.tkraise() - find_card_dialog.attributes("-topmost", True) + if game.app.opt.topmost_dialogs: + find_card_dialog.tkraise() + find_card_dialog.attributes("-topmost", True) + else: + find_card_dialog.attributes("-topmost", False) except Exception: pass diff --git a/pysollib/ui/tktile/fullpicturedialog.py b/pysollib/ui/tktile/fullpicturedialog.py index 25c256b55..d9ecec322 100644 --- a/pysollib/ui/tktile/fullpicturedialog.py +++ b/pysollib/ui/tktile/fullpicturedialog.py @@ -135,10 +135,13 @@ def connect_game_full_picture_dialog(game): pass -def raise_full_picture_dialog(): +def raise_full_picture_dialog(game): try: - full_picture_dialog.tkraise() - full_picture_dialog.attributes("-topmost", True) + if game.app.opt.topmost_dialogs: + full_picture_dialog.tkraise() + full_picture_dialog.attributes("-topmost", True) + else: + full_picture_dialog.attributes("-topmost", False) except Exception: pass diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index c0b2fd84b..1cbc0df23 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -317,6 +317,7 @@ def _createTkOpt(self): spread_stacks=tkinter.BooleanVar(), center_layout=tkinter.BooleanVar(), save_games_geometry=tkinter.BooleanVar(), + topmost_dialogs=tkinter.BooleanVar(), cardback=tkinter.IntVar(), tabletile=tkinter.IntVar(), animations=tkinter.IntVar(), @@ -392,6 +393,7 @@ def _setOptions(self): tkopt.spread_stacks.set(opt.spread_stacks) tkopt.center_layout.set(opt.center_layout) tkopt.save_games_geometry.set(opt.save_games_geometry) + tkopt.topmost_dialogs.set(opt.topmost_dialogs) tkopt.cardback.set(self.app.cardset.backindex) tkopt.tabletile.set(self.app.tabletile_index) tkopt.animations.set(opt.animations) @@ -756,7 +758,7 @@ def _createMenubar(self): command=self.mOptPreserveAspectRatio) submenu.add_separator() createResamplingMenu(self, submenu) - submenu = MfxMenu(menu, label=n_("Card la&yout")) + submenu = MfxMenu(menu, label=n_("Game la&yout")) submenu.add_checkbutton( label=n_("&Spread stacks"), variable=self.tkopt.spread_stacks, command=self.mOptSpreadStacks) @@ -767,6 +769,10 @@ def _createMenubar(self): label=n_("Save games &geometry"), variable=self.tkopt.save_games_geometry, command=self.mOptSaveGamesGeometry) + submenu.add_checkbutton( + label=n_("&Keep dialogs on top"), + variable=self.tkopt.topmost_dialogs, + command=self.mOptTopmostDialogs) # manager = self.app.cardset_manager # n = manager.len() menu.add_command( @@ -877,6 +883,10 @@ def _createMenubar(self): label=n_("Save games &geometry"), variable=self.tkopt.save_games_geometry, command=self.mOptSaveGamesGeometry) + submenu.add_checkbutton( + label=n_("&Keep dialogs on top"), + variable=self.tkopt.topmost_dialogs, + command=self.mOptTopmostDialogs) # menu.add_checkbutton( # label=n_("Startup splash sc&reen"), @@ -1879,6 +1889,12 @@ def mOptSaveGamesGeometry(self, *event): return self.app.opt.save_games_geometry = self.tkopt.save_games_geometry.get() + def mOptTopmostDialogs(self, *event): + if self._cancelDrag(break_pause=False): + return + self.app.opt.topmost_dialogs = self.tkopt.topmost_dialogs.get() + self.raiseAll() + def _mOptCardback(self, index): if self._cancelDrag(break_pause=False): return