[dialog-import] connect delete_event to gnc_gen_trans_list_delete

This commit is contained in:
Christopher Lam 2019-08-26 21:31:05 +08:00
parent 02f03235bf
commit 90da06b8af
2 changed files with 10 additions and 0 deletions

View File

@ -1212,6 +1212,7 @@
<property name="default_height">400</property>
<property name="type_hint">dialog</property>
<signal name="close" handler="on_matcher_cancel_clicked" swapped="no"/>
<signal name="delete-event" handler="on_matcher_delete_event" swapped="no"/>
<child>
<placeholder/>
</child>

View File

@ -99,6 +99,7 @@ static QofLogModule log_module = G_MOD_IMPORT_MATCHER;
void on_matcher_ok_clicked (GtkButton *button, GNCImportMainMatcher *info);
void on_matcher_cancel_clicked (GtkButton *button, gpointer user_data);
gboolean on_matcher_delete_event (GtkWidget *widget, GdkEvent *event, gpointer data);
void on_matcher_help_clicked (GtkButton *button, gpointer user_data);
void on_matcher_help_close_clicked (GtkButton *button, gpointer user_data);
@ -227,6 +228,14 @@ on_matcher_cancel_clicked (GtkButton *button, gpointer user_data)
gnc_gen_trans_list_delete (info);
}
gboolean
on_matcher_delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
GNCImportMainMatcher *info = data;
gnc_gen_trans_list_delete (info);
return FALSE;
}
void
on_matcher_help_close_clicked (GtkButton *button, gpointer user_data)
{