1 from gi.repository
import Gtk
as gtk
9 self.
window = gtk.Window(gtk.WindowType.TOPLEVEL)
10 self.window.set_title(
'Transcription Verifier')
11 self.window.connect(
'destroy',
lambda w: gtk.main_quit())
12 self.window.set_border_width(10)
13 self.window.set_default_size(150, 100)
15 box = gtk.VBox(
False, 5)
16 open_button = UIUtils.create_button(
'Check TRS File', UIUtils.BUTTON_ICONS.OPEN)
17 open_button.connect(
'clicked',
lambda w: self.
open_file())
18 box.pack_start(open_button,
False,
False, 0)
20 comp_button = UIUtils.create_button(
'Compare Files', UIUtils.BUTTON_ICONS.MERGE)
21 comp_button.connect(
'clicked',
lambda w: self.
compare_files())
22 box.pack_start(comp_button,
False,
False, 0)
24 exit_button = UIUtils.create_button(
'Exit', UIUtils.BUTTON_ICONS.EXIT)
25 exit_button.connect(
'clicked',
lambda w: gtk.main_quit())
26 box.pack_start(exit_button,
False,
False, 0)
29 self.window.show_all()
32 filename = UIUtils.open_file(
'Select trs file', [UIUtils.TRS_FILE_FILTER, UIUtils.ALL_FILE_FILTER])
35 progress_dialog =
ProgressDialog(
'Processing File...', [
'Parsing trs file...',
'Validating data...',
'Building UI...'])
36 progress_dialog.show()