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?"
|
My_Test_Label["text"] = "Next?"
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Next Button.")
|
print("An exception occurred - when pressing Next Button.")
|
||||||
|
|
||||||
#
|
#
|
||||||
def PiperTTS_GUI_New_File():
|
def PiperTTS_GUI_New_File():
|
||||||
try:
|
try:
|
||||||
@@ -99,6 +100,25 @@ def PiperTTS_GUI_New_File():
|
|||||||
Input_Box.delete("1.0", END)
|
Input_Box.delete("1.0", END)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing New File Button.")
|
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():
|
def PiperTTS_GUI_Clipboard():
|
||||||
@@ -109,7 +129,6 @@ def PiperTTS_GUI_Clipboard():
|
|||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Clipboard Button.")
|
print("An exception occurred - when pressing Clipboard Button.")
|
||||||
|
|
||||||
# Deleting info messages
|
# Deleting info messages
|
||||||
def PiperTTS_GUI_Hide_All_Labels():
|
def PiperTTS_GUI_Hide_All_Labels():
|
||||||
try:
|
try:
|
||||||
@@ -152,18 +171,19 @@ File_Toolbar.addcommand(label="Exit", command=Root_Window.quit)
|
|||||||
#Creating Playback menu for Toolbar
|
#Creating Playback menu for Toolbar
|
||||||
Playback_Toolbar = menu(Root_Toolbar, tearoff=False)
|
Playback_Toolbar = menu(Root_Toolbar, tearoff=False)
|
||||||
Root_Toolbar.add_cascade(label="Playback", menu=Playback_Toolbar)
|
Root_Toolbar.add_cascade(label="Playback", menu=Playback_Toolbar)
|
||||||
Playback_Toolbar.addcommand(label="▶", command=PiperTTS_GUI_Play)
|
Playback_Toolbar.addcommand(label="▶\tPlay", command=PiperTTS_GUI_Play)
|
||||||
Playback_Toolbar.addcommand(label="⏸", command=PiperTTS_GUI_Pause)
|
Playback_Toolbar.addcommand(label="⏸\tPause", command=PiperTTS_GUI_Pause)
|
||||||
Playback_Toolbar.addcommand(label="⏹", command=PiperTTS_GUI_Stop)
|
Playback_Toolbar.addcommand(label="⏹\tStop", command=PiperTTS_GUI_Stop)
|
||||||
Playback_Toolbar.addcommand(label="⏮", command=PiperTTS_GUI_Previous)
|
Playback_Toolbar.addcommand(label="⏮\tPrevious", command=PiperTTS_GUI_Previous)
|
||||||
Playback_Toolbar.addcommand(label="⏭", command=PiperTTS_GUI_Next)
|
Playback_Toolbar.addcommand(label="⏭\tNext", command=PiperTTS_GUI_Next)
|
||||||
#Creating Tools menu for Toolbar
|
#Creating Tools menu for Toolbar
|
||||||
Tools_Toolbar = menu(Root_Toolbar, tearoff=False)
|
Tools_Toolbar = menu(Root_Toolbar, tearoff=False)
|
||||||
Root_Toolbar.add_cascade(label="Tools", menu=Tools_Toolbar)
|
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")
|
Tools_Toolbar.addcommand(label="Prefrences")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# End of Code - Emd of Tkinter loop
|
# End of Code - Emd of Tkinter loop
|
||||||
Root_Window.mainloop()
|
Root_Window.mainloop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user