mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-23 04:10:29 +03:00
typeshed now handles tk 'name' parameter
This commit is contained in:
parent
f0c6b9efaa
commit
8b3294ecdd
@ -320,7 +320,7 @@ class AppWindow(object):
|
||||
self.theme_close = tk.BitmapImage(
|
||||
data='#define im_width 16\n#define im_height 16\nstatic unsigned char im_bits[] = {\n 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x1c, 0x38, 0x38, 0x1c, 0x70, 0x0e,\n 0xe0, 0x07, 0xc0, 0x03, 0xc0, 0x03, 0xe0, 0x07, 0x70, 0x0e, 0x38, 0x1c,\n 0x1c, 0x38, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00 };\n') # noqa: E501
|
||||
|
||||
frame = tk.Frame(self.w, name=appname.lower()) # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
frame = tk.Frame(self.w, name=appname.lower())
|
||||
frame.grid(sticky=tk.NSEW)
|
||||
frame.columnconfigure(1, weight=1)
|
||||
|
||||
@ -334,8 +334,8 @@ class AppWindow(object):
|
||||
self.system_label.grid(row=3, column=0, sticky=tk.W)
|
||||
self.station_label.grid(row=4, column=0, sticky=tk.W)
|
||||
|
||||
self.cmdr = tk.Label(frame, compound=tk.RIGHT, anchor=tk.W, name='cmdr') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.ship = HyperlinkLabel(frame, compound=tk.RIGHT, url=self.shipyard_url, name='ship') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.cmdr = tk.Label(frame, compound=tk.RIGHT, anchor=tk.W, name='cmdr')
|
||||
self.ship = HyperlinkLabel(frame, compound=tk.RIGHT, url=self.shipyard_url, name='ship')
|
||||
self.system = HyperlinkLabel(frame, compound=tk.RIGHT, url=self.system_url, popup_copy=True, name='system')
|
||||
self.station = HyperlinkLabel(frame, compound=tk.RIGHT, url=self.station_url, name='station')
|
||||
|
||||
@ -358,7 +358,7 @@ class AppWindow(object):
|
||||
# Update button in main window
|
||||
self.button = ttk.Button(frame, text=_('Update'), width=28, default=tk.ACTIVE, state=tk.DISABLED)
|
||||
self.theme_button = tk.Label(frame, width=32 if platform == 'darwin' else 28, state=tk.DISABLED)
|
||||
self.status = tk.Label(frame, name='status', anchor=tk.W) # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.status = tk.Label(frame, name='status', anchor=tk.W)
|
||||
|
||||
row = frame.grid_size()[1]
|
||||
self.button.grid(row=row, columnspan=2, sticky=tk.NSEW)
|
||||
@ -384,23 +384,23 @@ class AppWindow(object):
|
||||
root.call('tk::unsupported::MacWindowStyle', 'style', root, 'document', 'closeBox resizable')
|
||||
|
||||
# https://www.tcl.tk/man/tcl/TkCmd/menu.htm
|
||||
self.system_menu = tk.Menu(self.menubar, name='apple') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.system_menu = tk.Menu(self.menubar, name='apple')
|
||||
self.system_menu.add_command(command=lambda: self.w.call('tk::mac::standardAboutPanel'))
|
||||
self.system_menu.add_command(command=lambda: self.updater.checkForUpdates())
|
||||
self.menubar.add_cascade(menu=self.system_menu)
|
||||
self.file_menu = tk.Menu(self.menubar, name='file') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.file_menu = tk.Menu(self.menubar, name='file')
|
||||
self.file_menu.add_command(command=self.save_raw)
|
||||
self.menubar.add_cascade(menu=self.file_menu)
|
||||
self.edit_menu = tk.Menu(self.menubar, name='edit') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.edit_menu = tk.Menu(self.menubar, name='edit')
|
||||
self.edit_menu.add_command(accelerator='Command-c', state=tk.DISABLED, command=self.copy)
|
||||
self.menubar.add_cascade(menu=self.edit_menu)
|
||||
self.w.bind('<Command-c>', self.copy)
|
||||
self.view_menu = tk.Menu(self.menubar, name='view') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.view_menu = tk.Menu(self.menubar, name='view')
|
||||
self.view_menu.add_command(command=lambda: stats.StatsDialog(self.w, self.status))
|
||||
self.menubar.add_cascade(menu=self.view_menu)
|
||||
window_menu = tk.Menu(self.menubar, name='window') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
window_menu = tk.Menu(self.menubar, name='window')
|
||||
self.menubar.add_cascade(menu=window_menu)
|
||||
self.help_menu = tk.Menu(self.menubar, name='help') # type: ignore # https://github.com/python/typeshed/issues/4658 # noqa: E501
|
||||
self.help_menu = tk.Menu(self.menubar, name='help')
|
||||
self.w.createcommand("::tk::mac::ShowHelp", self.help_general)
|
||||
self.help_menu.add_command(command=self.help_privacy)
|
||||
self.help_menu.add_command(command=self.help_releases)
|
||||
@ -436,7 +436,7 @@ class AppWindow(object):
|
||||
if platform == 'win32':
|
||||
# Must be added after at least one "real" menu entry
|
||||
self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop')))
|
||||
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 = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE)
|
||||
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