change how the windows client finds pictures

This commit is contained in:
Jimmy Kiselak 2015-09-01 00:08:53 -04:00
parent 1bf0065d9d
commit 465a4643a8
2 changed files with 17 additions and 17 deletions

View file

@ -107,11 +107,11 @@ class DownloaderApp(object):
self.frame.grid(padx=20, pady=20)
logo_file_name = "lbry-dark-242x80.gif"
try:
logo_file = os.path.join(os.path.dirname(__file__), logo_file_name)
except NameError:
if os.name == "nt":
logo_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "lbrynet",
"lbrynet_downloader_gui", logo_file_name)
else:
logo_file = os.path.join(os.path.dirname(__file__), logo_file_name)
self.logo_picture = tk.PhotoImage(file=logo_file)
@ -138,11 +138,11 @@ class DownloaderApp(object):
self.wallet_balance.grid(row=0, column=0)
dropdown_file_name = "drop_down.gif"
try:
dropdown_file = os.path.join(os.path.dirname(__file__), dropdown_file_name)
except NameError:
if os.name == "nt":
dropdown_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "lbrynet",
"lbrynet_downloader_gui", dropdown_file_name)
else:
dropdown_file = os.path.join(os.path.dirname(__file__), dropdown_file_name)
self.dropdown_picture = tk.PhotoImage(
file=dropdown_file

View file

@ -31,11 +31,11 @@ class StreamFrame(object):
self.button_cursor = "hand1"
close_file_name = "close2.gif"
try:
close_file = os.path.join(os.path.dirname(__file__), close_file_name)
except NameError:
if os.name == "nt":
close_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "lbrynet",
"lbrynet_downloader_gui", close_file_name)
else:
close_file = os.path.join(os.path.dirname(__file__), close_file_name)
self.close_picture = tk.PhotoImage(
file=close_file
@ -69,26 +69,26 @@ class StreamFrame(object):
self.outer_button_frame.grid(sticky=tk.W + tk.E, row=4)
show_options_picture_file_name = "show_options.gif"
try:
show_options_picture_file = os.path.join(os.path.dirname(__file__),
show_options_picture_file_name)
except NameError:
if os.name == "nt":
show_options_picture_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),
"lbrynet", "lbrynet_downloader_gui",
show_options_picture_file_name)
else:
show_options_picture_file = os.path.join(os.path.dirname(__file__),
show_options_picture_file_name)
self.show_options_picture = tk.PhotoImage(
file=show_options_picture_file
)
hide_options_picture_file_name = "hide_options.gif"
try:
hide_options_picture_file = os.path.join(os.path.dirname(__file__),
hide_options_picture_file_name)
except NameError:
if os.name == "nt":
hide_options_picture_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),
"lbrynet", "lbrynet_downloader_gui",
hide_options_picture_file_name)
else:
hide_options_picture_file = os.path.join(os.path.dirname(__file__),
hide_options_picture_file_name)
self.hide_options_picture = tk.PhotoImage(
file=hide_options_picture_file