Skip to content

Commit

Permalink
Transcription Settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
octimot committed Feb 21, 2024
1 parent 185759a commit e4969d0
Show file tree
Hide file tree
Showing 2 changed files with 372 additions and 17 deletions.
22 changes: 16 additions & 6 deletions storytoolkitai/ui/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,10 @@ def _load_edit_menu(self):
# self.editmenu.add_command(label="Delete segment", command=self.donothing, state=DISABLED,
# accelerator="BackSpace")
self.editmenu.add_separator()
self.editmenu.add_command(label="Detect speakers", command=self.donothing, state=DISABLED)
self.editmenu.add_command(label="Group questions", command=self.donothing, state=DISABLED)
self.editmenu.add_command(label="Detect speakers...", command=self.donothing, state=DISABLED)
self.editmenu.add_command(label="Group questions...", command=self.donothing, state=DISABLED)
self.editmenu.add_separator()
self.editmenu.add_command(label="Transcription settings...", command=self.donothing, state=DISABLED)

# show the edit menu
self.menubar.add_cascade(label="Edit", menu=self.editmenu)
Expand Down Expand Up @@ -439,18 +441,25 @@ def toggle_edit_menu_items():
self.toolkit_UI_obj.t_edit_obj.button_go_to_timecode(
window_id=self.current_window_id)
)
self.editmenu.entryconfig('Detect speakers', state=NORMAL,
self.editmenu.entryconfig('Detect speakers...', state=NORMAL,
command=lambda:
self.toolkit_UI_obj.t_edit_obj.button_detect_speakers(self.current_window_id,
ignore_selection=True)
)

# enable the group questions menu item
self.editmenu.entryconfig('Group questions', state=NORMAL,
self.editmenu.entryconfig('Group questions...', state=NORMAL,
command=lambda:
self.toolkit_UI_obj.t_edit_obj.button_group_questions(self.current_window_id)
)

self.editmenu.entryconfig(
'Transcription settings...', state=NORMAL,
command=lambda: self.toolkit_UI_obj.open_transcription_settings(
parent_window_id=self.current_window_id
)
)

self.editmenu.entryconfig('Select All',
state=NORMAL,
command=lambda:
Expand Down Expand Up @@ -513,8 +522,9 @@ def toggle_edit_menu_items():

# disable transcription related menu items
self.editmenu.entryconfig("Go to timecode...", state=DISABLED)
self.editmenu.entryconfig("Detect speakers", state=DISABLED)
self.editmenu.entryconfig("Group questions", state=DISABLED)
self.editmenu.entryconfig("Detect speakers...", state=DISABLED)
self.editmenu.entryconfig("Group questions...", state=DISABLED)
self.editmenu.entryconfig("Transcription settings...", state=DISABLED)
self.editmenu.entryconfig('Copy to Clipboard with TC', state=DISABLED)
self.editmenu.entryconfig('Copy to Clipboard with Block TC', state=DISABLED)
self.editmenu.entryconfig('Add to Group', state=DISABLED)
Expand Down
Loading

0 comments on commit e4969d0

Please sign in to comment.