-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmenubar.py
39 lines (30 loc) · 1.19 KB
/
menubar.py
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Graphical User Iterface for build_pack and parse_pack scripts.
"""
import tkinter as tk
from tkinter import *
from textmessage import TextMessage
from dialog import *
__author__ = "Aleyr"
__date__ = "2018/11/13"
__version__ = "$Revision: 0.9.2"
class MenuBar(tk.Menu):
def __init__(self, parent, *args, **kwargs):
tk.Menu.__init__(self, parent, *args, **kwargs)
self.parent = parent
file_menu = tk.Menu(self, tearoff=0)
help_menu = tk.Menu(self, tearoff=0)
file_menu.add_command(label="Pack Scripts Path",
command=lambda:
ScriptSelectionDialog(self.parent,
"Set Pack Scripts Folder"))
# TextMessage(parent).set_script_paths())
file_menu.add_separator()
file_menu.add_command(label="Exit",
command=self.parent.destroy)
self.add_cascade(label="File", menu=file_menu)
help_menu.add_command(label="About",
command=lambda: AboutDialog(self.parent))
self.add_cascade(label="Help", menu=help_menu)