1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 15:27:14 +03:00

url parameter no longer mandatory for HyperlinkLabel

This commit is contained in:
Jonathan Harris 2017-07-29 14:30:40 +01:00
parent ef9e179fab
commit 274867ca67
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ def plugin_start():
def plugin_app(parent):
this.system_label = tk.Label(parent, text = _('System') + ':') # Main window
this.system = HyperlinkLabel(parent, compound=tk.RIGHT, url = None, popup_copy = True)
this.system = HyperlinkLabel(parent, compound=tk.RIGHT, popup_copy = True)
return (this.system_label, this.system)
def plugin_prefs(parent, cmdr, is_beta):

View File

@ -43,7 +43,7 @@ if platform == 'win32':
class HyperlinkLabel(platform == 'darwin' and tk.Label or ttk.Label, object):
def __init__(self, master=None, **kw):
self.url = kw.pop('url')
self.url = 'url' in kw and kw.pop('url') or None
self.popup_copy = kw.pop('popup_copy', False)
self.underline = kw.pop('underline', None) # override ttk.Label's underline
self.foreground = kw.get('foreground') or 'blue'