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

Fixes for running on Linux.

This commit is contained in:
Jonathan Harris 2015-09-12 16:16:32 +01:00
parent ea88e7c0e3
commit 56f3062388
4 changed files with 8 additions and 7 deletions

View File

@ -149,7 +149,8 @@ class AppWindow:
self.w.protocol("WM_DELETE_WINDOW", self.w.withdraw) # close button shouldn't quit app
else:
file_menu = tk.Menu(menubar, tearoff=tk.FALSE)
file_menu.add_command(label=_("Check for Updates..."), command=lambda:self.updater.checkForUpdates())
if platform == 'win32':
file_menu.add_command(label=_("Check for Updates..."), command=lambda:self.updater.checkForUpdates())
file_menu.add_command(label=_("Settings"), command=lambda:prefs.PreferencesDialog(self.w, self.login)) # Item in the File menu on Windows
file_menu.add_separator()
file_menu.add_command(label=_("Exit"), command=self.onexit) # Item in the File menu on Windows
@ -190,7 +191,6 @@ class AppWindow:
# Install hotkey monitoring
self.w.bind_all('<<Invoke>>', self.getandsend) # user-generated
print config.getint('hotkey_code'), config.getint('hotkey_mods')
hotkeymgr.register(self.w, config.getint('hotkey_code'), config.getint('hotkey_mods'))
# call after credentials have changed

View File

@ -371,7 +371,7 @@ else: # Linux
class HotkeyMgr:
def register(self, keycode, modifiers):
def register(self, root, keycode, modifiers):
pass
def unregister(self):

View File

@ -49,7 +49,7 @@ class Translations:
if match:
self.translations[match.group(1)] = match.group(2)
elif not comment.match(line):
assert match, 'Bad translation: %s' % line
print 'Bad translation: %s' % line.strip()
__builtin__.__dict__['_'] = self.translate
if __debug__:

View File

@ -247,9 +247,10 @@ class PreferencesDialog(tk.Toplevel):
config.set('password', self.password.get().strip())
config.set('output', (self.out_eddn.get() and config.OUT_EDDN or 0) + (self.out_bpc.get() and config.OUT_BPC or 0) + (self.out_td.get() and config.OUT_TD or 0) + (self.out_csv.get() and config.OUT_CSV or 0) + (self.out_ship_eds.get() and config.OUT_SHIP_EDS or 0) + (self.out_log.get() and config.OUT_LOG or 0) + (self.out_ship_coriolis.get() and config.OUT_SHIP_CORIOLIS or 0))
config.set('outdir', self.outdir.get().strip())
config.set('hotkey_code', self.hotkey_code)
config.set('hotkey_mods', self.hotkey_mods)
config.set('hotkey_mute', int(not self.hotkey_play.get()))
if platform in ['darwin','win32']:
config.set('hotkey_code', self.hotkey_code)
config.set('hotkey_mods', self.hotkey_mods)
config.set('hotkey_mute', int(not self.hotkey_play.get()))
config.set('anonymous', self.out_anon.get())
self._destroy()
if credentials != (config.get('username'), config.get('password')) and self.callback: