29 lines
840 B
Python
29 lines
840 B
Python
import gi
|
|
gi.require_version('Gtk', '3.0')
|
|
from gi.repository import Gtk
|
|
|
|
|
|
from callbacks import CallbackHandler
|
|
|
|
builder = Gtk.Builder()
|
|
builder.add_from_file("main.glade")
|
|
|
|
callback_handler = CallbackHandler(builder)
|
|
|
|
handlers = {
|
|
"onDestroy": Gtk.main_quit
|
|
, "on_manually_add_submit_button_clicked": callback_handler.on_manually_add_submit_button_clicked
|
|
, "on_load_from_file_chooser_file_set": callback_handler.on_load_from_file_chooser_file_set
|
|
, "on_save_questions_to_file_button_clicked": callback_handler.on_save_questions_to_file_button_clicked
|
|
, "on_submit_answer_button_clicked": callback_handler.on_submit_answer_button_clicked
|
|
, "on_next_question_button_clicked": callback_handler.on_next_question_button_clicked
|
|
}
|
|
|
|
builder.connect_signals(handlers)
|
|
|
|
|
|
window = builder.get_object("window1")
|
|
window.show_all()
|
|
|
|
Gtk.main()
|