/
jclublauncher
44 lines (26 loc) · 866 Bytes
/
jclublauncher
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python3
import jclubtool as jclub
import tkinter as tk
from tkinter import ttk
# Delete everything in cache directory
jclub.create_cache()
# Load up Tkinter
root = tk.Tk()
# root.iconbitmap('samples/logo2.ico')
# Set Application theme
root.style = ttk.Style()
# print(root.style.theme_names()) # Shows list of available themes
root.style.theme_use('alt')
root.title(jclub.appname)
root.resizable(True, True)
app = jclub.Application(master=root, debug=False)
# Keyboard Shortcuts
root.bind('<Escape>', lambda event: root.quit())
root.bind('<Left>', lambda event: app.prev_page())
root.bind('<Right>', lambda event: app.next_page())
menubar = tk.Menu(root)
filemenu = tk.Menu(app, tearoff=0)
menubar.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="Open", command=app.load_pdf)
root.config(menu=menubar)
app.mainloop()