mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-06 02:13:41 +03:00
Make System and Station names copyable with right-click.
This commit is contained in:
parent
7709ec5816
commit
e9028ff7a6
@ -47,9 +47,12 @@ class HyperlinkLabel(ttk.Label):
|
|||||||
self.font_n = kw.get('font', ttk.Style().lookup('TLabel', 'font'))
|
self.font_n = kw.get('font', ttk.Style().lookup('TLabel', 'font'))
|
||||||
self.font_u = tkFont.Font(self, self.font_n)
|
self.font_u = tkFont.Font(self, self.font_n)
|
||||||
self.font_u.configure(underline = True)
|
self.font_u.configure(underline = True)
|
||||||
|
self.menu = tk.Menu(None, tearoff=tk.FALSE)
|
||||||
|
self.menu.add_command(label=_('Copy'), command = self.copy) # As in Copy and Paste
|
||||||
self.bind('<Enter>', self._enter)
|
self.bind('<Enter>', self._enter)
|
||||||
self.bind('<Leave>', self._leave)
|
self.bind('<Leave>', self._leave)
|
||||||
self.bind('<Button-1>', self._click)
|
self.bind('<Button-1>', self._click)
|
||||||
|
self.bind(platform == 'darwin' and '<Button-2>' or '<Button-3>', self._contextmenu)
|
||||||
|
|
||||||
# Make blue and clickable if setting non-empty text
|
# Make blue and clickable if setting non-empty text
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
@ -71,6 +74,14 @@ class HyperlinkLabel(ttk.Label):
|
|||||||
if self.urlfn and self['text']:
|
if self.urlfn and self['text']:
|
||||||
webbrowser.open(self.urlfn(self['text']))
|
webbrowser.open(self.urlfn(self['text']))
|
||||||
|
|
||||||
|
def _contextmenu(self, event):
|
||||||
|
if self['text'] and self['text'] != '-':
|
||||||
|
self.menu.post(platform == 'darwin' and event.x_root + 1 or event.x_root, event.y_root)
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
self.clipboard_clear()
|
||||||
|
self.clipboard_append(self['text'])
|
||||||
|
|
||||||
|
|
||||||
class AppWindow:
|
class AppWindow:
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Use same text as E:D Launcher's verification dialog. [prefs.py:319] */
|
/* Use same text as E:D Launcher's verification dialog. [prefs.py:319] */
|
||||||
"A verification code has now been sent to the{CR}email address associated with your Elite account." = "A verification code has now been sent to the{CR}email address associated with your Elite account.";
|
"A verification code has now been sent to the{CR}email address associated with your Elite account." = "A verification code has now been sent to the{CR}email address associated with your Elite account.";
|
||||||
|
|
||||||
/* App menu entry on OSX. [EDMarketConnector.py:138] */
|
/* App menu entry on OSX. [EDMarketConnector.py:149] */
|
||||||
"About {APP}" = "About {APP}";
|
"About {APP}" = "About {APP}";
|
||||||
|
|
||||||
/* Folder selection button on Windows. [prefs.py:113] */
|
/* Folder selection button on Windows. [prefs.py:113] */
|
||||||
@ -10,40 +10,43 @@
|
|||||||
/* Folder selection button on OSX. [prefs.py:112] */
|
/* Folder selection button on OSX. [prefs.py:112] */
|
||||||
"Change..." = "Change...";
|
"Change..." = "Change...";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:139] */
|
/* [EDMarketConnector.py:150] */
|
||||||
"Check for Updates..." = "Check for Updates...";
|
"Check for Updates..." = "Check for Updates...";
|
||||||
|
|
||||||
/* Privacy setting. [prefs.py:152] */
|
/* Privacy setting. [prefs.py:152] */
|
||||||
"Cmdr name" = "Cmdr name";
|
"Cmdr name" = "Cmdr name";
|
||||||
|
|
||||||
/* Main window. [EDMarketConnector.py:112] */
|
/* Main window. [EDMarketConnector.py:123] */
|
||||||
"Cmdr:" = "Cmdr:";
|
"Cmdr:" = "Cmdr:";
|
||||||
|
|
||||||
/* Update button in main window. [EDMarketConnector.py:393] */
|
/* Update button in main window. [EDMarketConnector.py:406] */
|
||||||
"cooldown {SS}s" = "cooldown {SS}s";
|
"cooldown {SS}s" = "cooldown {SS}s";
|
||||||
|
|
||||||
|
/* As in Copy and Paste. [EDMarketConnector.py:51] */
|
||||||
|
"Copy" = "Copy";
|
||||||
|
|
||||||
/* Section heading in settings. [prefs.py:70] */
|
/* Section heading in settings. [prefs.py:70] */
|
||||||
"Credentials" = "Credentials";
|
"Credentials" = "Credentials";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:354] */
|
/* [EDMarketConnector.py:367] */
|
||||||
"Error: Can't connect to EDDN" = "Error: Can't connect to EDDN";
|
"Error: Can't connect to EDDN" = "Error: Can't connect to EDDN";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:359] */
|
/* [EDMarketConnector.py:372] */
|
||||||
"Error: Connection to EDDN timed out" = "Error: Connection to EDDN timed out";
|
"Error: Connection to EDDN timed out" = "Error: Connection to EDDN timed out";
|
||||||
|
|
||||||
/* [companion.py:108] */
|
/* [companion.py:110] */
|
||||||
"Error: Invalid Credentials" = "Error: Invalid Credentials";
|
"Error: Invalid Credentials" = "Error: Invalid Credentials";
|
||||||
|
|
||||||
/* [companion.py:102] */
|
/* [companion.py:104] */
|
||||||
"Error: Server is down" = "Error: Server is down";
|
"Error: Server is down" = "Error: Server is down";
|
||||||
|
|
||||||
/* Item in the File menu on Windows. [EDMarketConnector.py:156] */
|
/* Item in the File menu on Windows. [EDMarketConnector.py:167] */
|
||||||
"Exit" = "Exit";
|
"Exit" = "Exit";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:245] */
|
/* [EDMarketConnector.py:259] */
|
||||||
"Fetching station data..." = "Fetching station data...";
|
"Fetching station data..." = "Fetching station data...";
|
||||||
|
|
||||||
/* Menu title on Windows. [EDMarketConnector.py:157] */
|
/* Menu title on Windows. [EDMarketConnector.py:168] */
|
||||||
"File" = "File";
|
"File" = "File";
|
||||||
|
|
||||||
/* Output folder prompt on Windows. [prefs.py:111] */
|
/* Output folder prompt on Windows. [prefs.py:111] */
|
||||||
@ -61,10 +64,10 @@
|
|||||||
/* Section heading in settings on OSX. [prefs.py:125] */
|
/* Section heading in settings on OSX. [prefs.py:125] */
|
||||||
"Keyboard shortcut" = "Keyboard shortcut";
|
"Keyboard shortcut" = "Keyboard shortcut";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:313] */
|
/* [EDMarketConnector.py:326] */
|
||||||
"Last updated at {HH}:{MM}:{SS}" = "Last updated at {HH}:{MM}:{SS}";
|
"Last updated at {HH}:{MM}:{SS}" = "Last updated at {HH}:{MM}:{SS}";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:198] */
|
/* [EDMarketConnector.py:209] */
|
||||||
"Logging in..." = "Logging in...";
|
"Logging in..." = "Logging in...";
|
||||||
|
|
||||||
/* [prefs.py:102] */
|
/* [prefs.py:102] */
|
||||||
@ -121,10 +124,10 @@
|
|||||||
/* [prefs.py:96] */
|
/* [prefs.py:96] */
|
||||||
"Send station data to the Elite Dangerous Data Network" = "Send station data to the Elite Dangerous Data Network";
|
"Send station data to the Elite Dangerous Data Network" = "Send station data to the Elite Dangerous Data Network";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:333] */
|
/* [EDMarketConnector.py:346] */
|
||||||
"Sending data to EDDN..." = "Sending data to EDDN...";
|
"Sending data to EDDN..." = "Sending data to EDDN...";
|
||||||
|
|
||||||
/* Item in the File menu on Windows. [EDMarketConnector.py:154] */
|
/* Item in the File menu on Windows. [EDMarketConnector.py:165] */
|
||||||
"Settings" = "Settings";
|
"Settings" = "Settings";
|
||||||
|
|
||||||
/* [prefs.py:106] */
|
/* [prefs.py:106] */
|
||||||
@ -133,40 +136,40 @@
|
|||||||
/* [prefs.py:104] */
|
/* [prefs.py:104] */
|
||||||
"Ship loadout in E:D Shipyard format" = "Ship loadout in E:D Shipyard format";
|
"Ship loadout in E:D Shipyard format" = "Ship loadout in E:D Shipyard format";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:340] */
|
/* [EDMarketConnector.py:353] */
|
||||||
"Station doesn't have a market!" = "Station doesn't have a market!";
|
"Station doesn't have a market!" = "Station doesn't have a market!";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:338] */
|
/* [EDMarketConnector.py:351] */
|
||||||
"Station doesn't have anything!" = "Station doesn't have anything!";
|
"Station doesn't have anything!" = "Station doesn't have anything!";
|
||||||
|
|
||||||
/* Main window. [EDMarketConnector.py:114] */
|
/* Main window. [EDMarketConnector.py:125] */
|
||||||
"Station:" = "Station:";
|
"Station:" = "Station:";
|
||||||
|
|
||||||
/* Main window. [EDMarketConnector.py:113] */
|
/* Main window. [EDMarketConnector.py:124] */
|
||||||
"System:" = "System:";
|
"System:" = "System:";
|
||||||
|
|
||||||
/* Update button in main window. [EDMarketConnector.py:119] */
|
/* Update button in main window. [EDMarketConnector.py:130] */
|
||||||
"Update" = "Update";
|
"Update" = "Update";
|
||||||
|
|
||||||
/* Use same text as E:D Launcher's login dialog. [prefs.py:75] */
|
/* Use same text as E:D Launcher's login dialog. [prefs.py:75] */
|
||||||
"Username (Email)" = "Username (Email)";
|
"Username (Email)" = "Username (Email)";
|
||||||
|
|
||||||
/* Shouldn't happen. [EDMarketConnector.py:270] */
|
/* Shouldn't happen. [EDMarketConnector.py:283] */
|
||||||
"What are you flying?!" = "What are you flying?!";
|
"What are you flying?!" = "What are you flying?!";
|
||||||
|
|
||||||
/* Shouldn't happen. [EDMarketConnector.py:267] */
|
/* Shouldn't happen. [EDMarketConnector.py:280] */
|
||||||
"Where are you?!" = "Where are you?!";
|
"Where are you?!" = "Where are you?!";
|
||||||
|
|
||||||
/* Output folder prompt on OSX. [prefs.py:110] */
|
/* Output folder prompt on OSX. [prefs.py:110] */
|
||||||
"Where:" = "Where:";
|
"Where:" = "Where:";
|
||||||
|
|
||||||
/* Shouldn't happen. [EDMarketConnector.py:264] */
|
/* Shouldn't happen. [EDMarketConnector.py:277] */
|
||||||
"Who are you?!" = "Who are you?!";
|
"Who are you?!" = "Who are you?!";
|
||||||
|
|
||||||
/* Menu title on OSX. [EDMarketConnector.py:142] */
|
/* Menu title on OSX. [EDMarketConnector.py:153] */
|
||||||
"Window" = "Window";
|
"Window" = "Window";
|
||||||
|
|
||||||
/* [EDMarketConnector.py:316] */
|
/* [EDMarketConnector.py:329] */
|
||||||
"You're not docked at a station!" = "You're not docked at a station!";
|
"You're not docked at a station!" = "You're not docked at a station!";
|
||||||
|
|
||||||
/* Shortcut settings prompt on OSX. [prefs.py:133] */
|
/* Shortcut settings prompt on OSX. [prefs.py:133] */
|
||||||
|
@ -171,3 +171,6 @@
|
|||||||
|
|
||||||
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
||||||
"Only when Elite: Dangerous is the active app" = "Seulement quand Elite: Dangerous est l'application active";
|
"Only when Elite: Dangerous is the active app" = "Seulement quand Elite: Dangerous est l'application active";
|
||||||
|
|
||||||
|
/* As in Copy and Paste. [EDMarketConnector.py:51] */
|
||||||
|
"Copy" = "Copier";
|
||||||
|
@ -172,3 +172,6 @@
|
|||||||
|
|
||||||
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
||||||
"Only when Elite: Dangerous is the active app" = "Solo quando “Elite: Dangerous” è avviato";
|
"Only when Elite: Dangerous is the active app" = "Solo quando “Elite: Dangerous” è avviato";
|
||||||
|
|
||||||
|
/* As in Copy and Paste. [EDMarketConnector.py:51] */
|
||||||
|
"Copy" = "Copia";
|
||||||
|
@ -171,3 +171,6 @@
|
|||||||
|
|
||||||
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
/* Hotkey/Shortcut setting. [prefs.py:141] */
|
||||||
"Only when Elite: Dangerous is the active app" = "Tylko gdy Elite: Dangerous jest aplikacją aktywną";
|
"Only when Elite: Dangerous is the active app" = "Tylko gdy Elite: Dangerous jest aplikacją aktywną";
|
||||||
|
|
||||||
|
/* As in Copy and Paste. [EDMarketConnector.py:51] */
|
||||||
|
"Copy" = "Kopiuj";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user