Ejemplo n.º 1
0
def failedToSend(reason):
    al = mtk.Ttk("Bug Send Error Win")
    al.geometry('600x600')
    al.title("Error")
    t = mtk.Text(al,width=500, height=500, wrap=word)
    t.insert(0.0, reason)
    t.pack()
    mtk.Button(al, text='ok', command=lambda: quitWin(al)).pack()
    al.mainloop()
Ejemplo n.º 2
0
def askForBugs(app):
    """Dependent on <app> argument being PyEdit. Not a good repurpose"""
    bug_report = mtk.Ttk("Bug Report")
    bug_report.protocol("WM_DELETE_WINDOW", lambda: quitWin(bug_report))
    bug_report.title("Submit a Bug")
    mtk.TLabel(bug_report, text="Enter a name: ").pack()
    name = mtk.Entry(bug_report)
    name.pack()
    mtk.TLabel(bug_report,
               text="Describe the steps to recreate the bug: ").pack()
    steps = mtk.Text(bug_report, width=40, height=10)
    steps.pack()
    mtk.TLabel(bug_report,
               text="Include any other additional"
                    "information that could help: ").pack()
    info = mtk.Text(bug_report, width=40, height=10)
    info.pack()
    qu = mtk.Button(bug_report, text="Next...",
                    command=lambda: askToSubmitBugs(name, steps, info, app,
                                                    bug_report))
    qu.pack()
    bug_report.mainloop()
Ejemplo n.º 3
0
def askToSubmitBugs(name, steps, info, app, br):
    br.quit()
    _name = name.get()
    _steps = steps.get(0.0, mtk.END)
    _info = info.get(0.0, mtk.END)
    br.destroy()
    error_report = writeBugReport(_name, _steps, _info, app)
    tosend = mtk.Ttk("To Send")
    tosend.title("Bug Report")
    mtk.TLabel(tosend,
               text="The following information will be submitted \n"
                    "(no personally identifiable information is sent) ").pack()
    a = mtk.Text(tosend, width=125, height=30)
    a.insert(0.0, error_report)
    a.pack()
    can = mtk.Button(tosend, text='Cancel', command=lambda: quitWin(tosend))
    can.pack()
    qu = mtk.Button(tosend, text="Go",
                    command=lambda: sendReport(error_report, tosend))
    qu.pack()
    tosend.mainloop()