1 from gi.repository
import Gtk
as gtk
8 self.
window = gtk.Window(gtk.WindowType.TOPLEVEL)
9 self.window.set_title(
'WH-Frequency Counter')
10 self.window.connect(
'destroy',
lambda w: gtk.main_quit())
11 self.window.set_border_width(10)
12 self.window.set_default_size(150, 100)
14 box = gtk.VBox(
False, 5)
15 open_button = UIUtils.create_button(
'Open TRS File', UIUtils.BUTTON_ICONS.OPEN)
16 open_button.connect(
'clicked',
lambda w: self.
open_file())
17 box.pack_start(open_button,
False,
False, 0)
20 exit_button = UIUtils.create_button(
'Exit', UIUtils.BUTTON_ICONS.EXIT)
21 exit_button.connect(
'clicked',
lambda w: gtk.main_quit())
22 box.pack_start(exit_button,
False,
False, 0)
30 filename = UIUtils.open_file(
'Select trs file', [UIUtils.TRS_FILE_FILTER, UIUtils.ALL_FILE_FILTER])
33 progress_dialog =
ProgressDialog(
'Processing File...', [
'Parsing trs file...'])
34 progress_dialog.show()