Skip to content

Commit ec8eae4

Browse files
author
netevert
committed
minor fixes
1 parent 8b51b30 commit ec8eae4

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

pockint.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from tkinter import messagebox
66
import tkinter.ttk as ttk
77
from utils import InputValidator, Database, load_icon, callback
8+
import sys
89

910
__version__ = '1.0.0'
1011

@@ -112,7 +113,8 @@ class Gui(tk.Frame):
112113
"""Main program graphical user interface"""
113114
def __init__(self, master=None, *args, **kwargs):
114115
super().__init__(master, *args, **kwargs)
115-
self.icon = load_icon()
116+
if sys.platform == "win32":
117+
self.icon = load_icon()
116118
self.multi_select = tk.BooleanVar()
117119
self.build_menu()
118120
self.build_interface()
@@ -296,10 +298,14 @@ def view_credits(self):
296298
"""Opens a new window providing credits information"""
297299
# launch window and configure window settings
298300
self.win_credits = CreditsTool()
299-
self.win_credits.title('')
301+
if sys.platform == "win32":
302+
self.win_credits.title('')
303+
else:
304+
self.win_credits.title('Credits')
300305
self.win_credits.geometry('+%d+%d' % (root.winfo_x() +
301306
20, root.winfo_y() + 20))
302-
self.win_credits.iconbitmap(self.icon)
307+
if sys.platform == "win32":
308+
self.win_credits.iconbitmap(self.icon)
303309
self.win_credits.resizable(width=False, height=False)
304310
# set focus on window
305311
self.win_credits.grab_set()
@@ -312,10 +318,11 @@ def manage_apis(self):
312318
"""Opens a new window allowing user to manage api keys"""
313319
# launch window and configure window settings
314320
self.api_tool = ApiTool()
315-
self.api_tool.title('')
321+
self.api_tool.title('Manage APIs')
316322
self.api_tool.geometry('+%d+%d' % (root.winfo_x() +
317323
20, root.winfo_y() + 20))
318-
self.api_tool.iconbitmap(self.icon)
324+
if sys.platform == "win32":
325+
self.api_tool.iconbitmap(self.icon)
319326
self.api_tool.resizable(width=False, height=False)
320327
self.api_tool.protocol('WM_DELETE_WINDOW', self.api_tool.close_window)
321328
# set focus on window
@@ -336,6 +343,7 @@ def quit_program():
336343
pockint = Gui(root)
337344
root.config(menu=pockint.top)
338345
pockint.pack(expand=False)
339-
root.iconbitmap(pockint.icon)
346+
if sys.platform == "win32":
347+
root.iconbitmap(pockint.icon)
340348
root.protocol('WM_DELETE_WINDOW', pockint.quit_program)
341349
root.mainloop()

utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self):
2323
if sys.platform == "win32":
2424
self.db_path = os.getenv("LOCALAPPDATA")+ "\\pockint\\"
2525
else:
26-
self.path_db = os.path.expanduser(os.path.join("~", ".pockint"))
26+
self.db_path = os.path.expanduser(os.path.join("~", ".pockint"))
2727
if not os.path.exists(self.db_path):
2828
os.makedirs(self.db_path)
2929
self.create_database()

0 commit comments

Comments
 (0)