mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
EDMarketConnector: Revert to tearoff=tk.FALSE
And added `# type: ignore` comments. This is a mess. On the tkinter side it *is* an int, default 0. But enough python stuff has assumed it's a bool for typeshed to define that tearoff should be. It doesn't match, mypy complains.
This commit is contained in:
parent
c1fdd27020
commit
e5e0eb0373
@ -406,17 +406,17 @@ class AppWindow(object):
|
||||
self.w.resizable(tk.FALSE, tk.FALSE) # Can't be only resizable on one axis
|
||||
|
||||
else: # win32 or linux
|
||||
self.file_menu = self.view_menu = tk.Menu(self.menubar, tearoff=False)
|
||||
self.file_menu = self.view_menu = tk.Menu(self.menubar, tearoff=tk.FALSE) # type: ignore
|
||||
self.file_menu.add_command(command=lambda: stats.StatsDialog(self))
|
||||
self.file_menu.add_command(command=self.save_raw)
|
||||
self.file_menu.add_command(command=lambda: prefs.PreferencesDialog(self.w, self.postprefs))
|
||||
self.file_menu.add_separator()
|
||||
self.file_menu.add_command(command=self.onexit)
|
||||
self.menubar.add_cascade(menu=self.file_menu)
|
||||
self.edit_menu = tk.Menu(self.menubar, tearoff=False)
|
||||
self.edit_menu = tk.Menu(self.menubar, tearoff=tk.FALSE) # type: ignore
|
||||
self.edit_menu.add_command(accelerator='Ctrl+C', state=tk.DISABLED, command=self.copy)
|
||||
self.menubar.add_cascade(menu=self.edit_menu)
|
||||
self.help_menu = tk.Menu(self.menubar, tearoff=False)
|
||||
self.help_menu = tk.Menu(self.menubar, tearoff=tk.FALSE) # type: ignore
|
||||
self.help_menu.add_command(command=self.help_general)
|
||||
self.help_menu.add_command(command=self.help_privacy)
|
||||
self.help_menu.add_command(command=self.help_releases)
|
||||
@ -427,7 +427,7 @@ class AppWindow(object):
|
||||
if platform == 'win32':
|
||||
# Must be added after at least one "real" menu entry
|
||||
self.always_ontop = tk.BooleanVar(value=config.getint('always_ontop'))
|
||||
self.system_menu = tk.Menu(self.menubar, name='system', tearoff=False) # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.system_menu = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE) # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.system_menu.add_separator()
|
||||
self.system_menu.add_checkbutton(label=_('Always on top'),
|
||||
variable=self.always_ontop,
|
||||
|
Loading…
x
Reference in New Issue
Block a user