From 0515b77f87cb6d98c0ae96ba4a527c97bbb96051 Mon Sep 17 00:00:00 2001 From: bMorgan01 Date: Sat, 16 Jan 2021 02:17:49 -0700 Subject: [PATCH] added help buttons --- main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index e301ffe..13029e6 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ from tkinter import * from subprocess import check_output from os import getenv +import webbrowser as wb def donothing(): filewin = Toplevel(root) @@ -20,6 +21,9 @@ def runCmd(text): check_output(text, shell=False) root.destroy() +def openPage(url): + wb.get('windows-default').open(url) + def buildRoot(): clearList = root.winfo_children() @@ -42,9 +46,8 @@ def buildRoot(): menubar.add_cascade(label="File", menu=filemenu) helpmenu = Menu(menubar, tearoff=0) - helpmenu.add_command(label="Report Bug", command=donothing) - helpmenu.add_command(label="Github Repo", command=donothing) - helpmenu.add_command(label="About", 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=(lambda *args: openPage('https://github.com/bMorgan01/WebinarsPy'))) menubar.add_cascade(label="Help", menu=helpmenu) root.config(menu=menubar) @@ -273,6 +276,7 @@ readFile() root = Tk() root.title("Webinars") root.option_add('*Font', '19') +root.attributes("-toolwindow",1) buildRoot()