Update Uptated-Prototype/PiperTTS-GUI-Test.py
This commit is contained in:
@@ -92,6 +92,7 @@ def PiperTTS_GUI_Next():
|
||||
My_Test_Label["text"] = "Next?"
|
||||
except:
|
||||
print("An exception occurred - when pressing Next Button.")
|
||||
|
||||
#
|
||||
def PiperTTS_GUI_New_File():
|
||||
try:
|
||||
@@ -99,6 +100,25 @@ def PiperTTS_GUI_New_File():
|
||||
Input_Box.delete("1.0", END)
|
||||
except:
|
||||
print("An exception occurred - when pressing New File Button.")
|
||||
|
||||
#
|
||||
def PiperTTS_GUI_Get_Selection():
|
||||
try:
|
||||
Cursor_Position = Input_Box.index(INSERT)
|
||||
Selected = Root_Window.selection_get()
|
||||
Input_Box.insert(Cursor_Position, Selected)
|
||||
except:
|
||||
print("An exception occurred - when grabbing Selection.")
|
||||
|
||||
#
|
||||
def PiperTTS_GUI_Get_Clipboard():
|
||||
try:
|
||||
Cursor_Position = Input_Box.index(INSERT)
|
||||
Selected = Root_Window.clipboard_get()
|
||||
Input_Box.insert(Cursor_Position, Selected)
|
||||
except:
|
||||
print("An exception occurred - when grabbing Clipboard.")
|
||||
|
||||
'''
|
||||
#
|
||||
def PiperTTS_GUI_Clipboard():
|
||||
@@ -109,7 +129,6 @@ def PiperTTS_GUI_Clipboard():
|
||||
labels.append(My_Label)
|
||||
except:
|
||||
print("An exception occurred - when pressing Clipboard Button.")
|
||||
|
||||
# Deleting info messages
|
||||
def PiperTTS_GUI_Hide_All_Labels():
|
||||
try:
|
||||
@@ -152,18 +171,19 @@ File_Toolbar.addcommand(label="Exit", command=Root_Window.quit)
|
||||
#Creating Playback menu for Toolbar
|
||||
Playback_Toolbar = menu(Root_Toolbar, tearoff=False)
|
||||
Root_Toolbar.add_cascade(label="Playback", menu=Playback_Toolbar)
|
||||
Playback_Toolbar.addcommand(label="▶", command=PiperTTS_GUI_Play)
|
||||
Playback_Toolbar.addcommand(label="⏸", command=PiperTTS_GUI_Pause)
|
||||
Playback_Toolbar.addcommand(label="⏹", command=PiperTTS_GUI_Stop)
|
||||
Playback_Toolbar.addcommand(label="⏮", command=PiperTTS_GUI_Previous)
|
||||
Playback_Toolbar.addcommand(label="⏭", command=PiperTTS_GUI_Next)
|
||||
Playback_Toolbar.addcommand(label="▶\tPlay", command=PiperTTS_GUI_Play)
|
||||
Playback_Toolbar.addcommand(label="⏸\tPause", command=PiperTTS_GUI_Pause)
|
||||
Playback_Toolbar.addcommand(label="⏹\tStop", command=PiperTTS_GUI_Stop)
|
||||
Playback_Toolbar.addcommand(label="⏮\tPrevious", command=PiperTTS_GUI_Previous)
|
||||
Playback_Toolbar.addcommand(label="⏭\tNext", command=PiperTTS_GUI_Next)
|
||||
#Creating Tools menu for Toolbar
|
||||
Tools_Toolbar = menu(Root_Toolbar, tearoff=False)
|
||||
Root_Toolbar.add_cascade(label="Tools", menu=Tools_Toolbar)
|
||||
Tools_Toolbar.addcommand(label="Insert Selection", command=PiperTTS_GUI_Get_Selection)
|
||||
Tools_Toolbar.addcommand(label="Insert Clipboard", command=PiperTTS_GUI_Get_Clipboard)
|
||||
Tools_Toolbar.add_seperator()
|
||||
Tools_Toolbar.addcommand(label="Prefrences")
|
||||
|
||||
|
||||
|
||||
# End of Code - Emd of Tkinter loop
|
||||
Root_Window.mainloop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user