Skip to content

Commit

Permalink
[Fix] Set Parent for messageboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed May 26, 2024
1 parent 778ccae commit fe7afad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion EDMCSystemProfiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def copy_sys_report(root: tk.Tk, report: str) -> None:
"""Copy the system info to the keyboard."""
root.clipboard_clear()
root.clipboard_append(report)
messagebox.showinfo("System Profiler", "System Report copied to Clipboard")
messagebox.showinfo("System Profiler", "System Report copied to Clipboard", parent=root)


def main() -> None:
Expand Down
12 changes: 8 additions & 4 deletions EDMarketConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,8 @@ def validate_providers():
tk.messagebox.showinfo(
# LANG: Popup window title for Reset Providers
tr.tl('EDMC: Default Providers Reset'),
popup_text
popup_text,
parent=root
)


Expand Down Expand Up @@ -2237,7 +2238,8 @@ def test_prop(self):
detail = detail.replace('\\n', '\n')
detail = detail.replace('\\r', '\r')
msg = tk.messagebox.askyesno(
title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO
title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO,
parent=root
)
if msg:
webbrowser.open(
Expand Down Expand Up @@ -2271,7 +2273,8 @@ def messagebox_broken_plugins():
tk.messagebox.showinfo(
# LANG: Popup window title for list of 'broken' plugins that failed to load
tr.tl('EDMC: Broken Plugins'),
popup_text
popup_text,
parent=root
)

def messagebox_not_py3():
Expand Down Expand Up @@ -2301,7 +2304,8 @@ def messagebox_not_py3():
tk.messagebox.showinfo(
# LANG: Popup window title for list of 'enabled' plugins that don't work with Python 3.x
tr.tl('EDMC: Plugins Without Python 3.x Support'),
popup_text
popup_text,
parent=root
)
config.set('plugins_not_py3_last', int(time()))

Expand Down
3 changes: 2 additions & 1 deletion myNotebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def paste(self) -> None:
# Hijack existing translation, yes it doesn't exactly match here.
messagebox.showwarning(
tr.tl('Error'), # LANG: Generic error prefix - following text is from Frontier auth service;
tr.tl('Cannot paste non-text content.') # LANG: Can't Paste Images or Files in Text
tr.tl('Cannot paste non-text content.'), # LANG: Can't Paste Images or Files in Text
parent=self.master
)
return
text = self.clipboard_get()
Expand Down

0 comments on commit fe7afad

Please sign in to comment.