27 lines
688 B
Python
27 lines
688 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_submit_button_clicked": callback_handler.on_load_from_file_submit_button_clicked
|
||
|
, "on_save_question_to_file_submit_button_clicked": callback_handler.on_save_question_to_file_submit_button_clicked
|
||
|
}
|
||
|
|
||
|
builder.connect_signals(handlers)
|
||
|
|
||
|
|
||
|
window = builder.get_object("window1")
|
||
|
window.show_all()
|
||
|
|
||
|
Gtk.main()
|