added help buttons
This commit is contained in:
parent
37d8595f82
commit
0515b77f87
1 changed files with 7 additions and 3 deletions
10
main.py
10
main.py
|
|
@ -1,6 +1,7 @@
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
from os import getenv
|
from os import getenv
|
||||||
|
import webbrowser as wb
|
||||||
|
|
||||||
def donothing():
|
def donothing():
|
||||||
filewin = Toplevel(root)
|
filewin = Toplevel(root)
|
||||||
|
|
@ -20,6 +21,9 @@ def runCmd(text):
|
||||||
check_output(text, shell=False)
|
check_output(text, shell=False)
|
||||||
root.destroy()
|
root.destroy()
|
||||||
|
|
||||||
|
def openPage(url):
|
||||||
|
wb.get('windows-default').open(url)
|
||||||
|
|
||||||
def buildRoot():
|
def buildRoot():
|
||||||
clearList = root.winfo_children()
|
clearList = root.winfo_children()
|
||||||
|
|
||||||
|
|
@ -42,9 +46,8 @@ def buildRoot():
|
||||||
menubar.add_cascade(label="File", menu=filemenu)
|
menubar.add_cascade(label="File", menu=filemenu)
|
||||||
|
|
||||||
helpmenu = Menu(menubar, tearoff=0)
|
helpmenu = Menu(menubar, tearoff=0)
|
||||||
helpmenu.add_command(label="Report Bug", command=donothing)
|
helpmenu.add_command(label="Report Bug", command=(lambda *args: openPage('https://github.com/bMorgan01/WebinarsPy/issues')))
|
||||||
helpmenu.add_command(label="Github Repo", command=donothing)
|
helpmenu.add_command(label="Github Repo", command=(lambda *args: openPage('https://github.com/bMorgan01/WebinarsPy')))
|
||||||
helpmenu.add_command(label="About", command=donothing)
|
|
||||||
menubar.add_cascade(label="Help", menu=helpmenu)
|
menubar.add_cascade(label="Help", menu=helpmenu)
|
||||||
|
|
||||||
root.config(menu=menubar)
|
root.config(menu=menubar)
|
||||||
|
|
@ -273,6 +276,7 @@ readFile()
|
||||||
root = Tk()
|
root = Tk()
|
||||||
root.title("Webinars")
|
root.title("Webinars")
|
||||||
root.option_add('*Font', '19')
|
root.option_add('*Font', '19')
|
||||||
|
root.attributes("-toolwindow",1)
|
||||||
|
|
||||||
buildRoot()
|
buildRoot()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue