Move delete-event signal connect from glade to C-File

This commit is contained in:
Mario Hüttel 2018-06-04 11:41:35 +02:00
parent 88815bc007
commit ea53890cd0
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,6 @@
<property name="height_request">250</property> <property name="height_request">250</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<signal name="delete-event" handler="on_window_close" swapped="no"/>
<child type="titlebar"> <child type="titlebar">
<object class="GtkHeaderBar"> <object class="GtkHeaderBar">
<property name="name">header</property> <property name="name">header</property>

3
main.c
View File

@ -247,6 +247,9 @@ int main(int argc, char **argv)
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(main_builder, "button-load-gds")), g_signal_connect(GTK_WIDGET(gtk_builder_get_object(main_builder, "button-load-gds")),
"clicked", G_CALLBACK(on_load_gds), (gpointer)&open_data); "clicked", G_CALLBACK(on_load_gds), (gpointer)&open_data);
/* Connect delete-event */
g_signal_connect(GTK_WIDGET(open_data.main_window), "delete-event", G_CALLBACK(on_window_close), NULL);
/* Connect Convert button */ /* Connect Convert button */
conv_data.tree_view = cell_tree; conv_data.tree_view = cell_tree;