summaryrefslogtreecommitdiff
path: root/src/dlg-delete.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-04-14 13:21:22 +0200
committerraveit65 <[email protected]>2020-06-05 14:38:12 +0200
commit4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3 (patch)
tree53bb6898ebb505c912c6c935a80288e95c2cc6f6 /src/dlg-delete.c
parentc60e1cfb6c4296bcc9c4f05da3484f22e7f15770 (diff)
downloadengrampa-4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3.tar.bz2
engrampa-4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3.tar.xz
Use callback symbols defined in ui files
Diffstat (limited to 'src/dlg-delete.c')
-rw-r--r--src/dlg-delete.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/dlg-delete.c b/src/dlg-delete.c
index 803c9b2..39994ae 100644
--- a/src/dlg-delete.c
+++ b/src/dlg-delete.c
@@ -108,7 +108,6 @@ dlg_delete__common (FrWindow *window,
{
GtkBuilder *builder;
DialogData *data;
- GtkWidget *ok_button;
data = g_new (DialogData, 1);
data->window = window;
@@ -123,8 +122,6 @@ dlg_delete__common (FrWindow *window,
data->d_files_radio = GET_WIDGET ("d_files_radio");
data->d_files_entry = GET_WIDGET ("d_files_entry");
- ok_button = GET_WIDGET ("d_ok_button");
-
/* Set widgets data. */
if (data->selected_files != NULL)
@@ -135,23 +132,18 @@ dlg_delete__common (FrWindow *window,
}
/* Set the signals handlers. */
+ gtk_builder_add_callback_symbols (builder,
+ "on_delete_dialog_destroy", G_CALLBACK (destroy_cb),
+ "on_d_ok_button_clicked", G_CALLBACK (ok_clicked_cb),
+ "on_d_files_entry_changed", G_CALLBACK (entry_changed_cb),
+ NULL);
+
+ gtk_builder_connect_signals (builder, data);
- g_signal_connect (G_OBJECT (data->dialog),
- "destroy",
- G_CALLBACK (destroy_cb),
- data);
g_signal_connect_swapped (gtk_builder_get_object (builder, "d_cancel_button"),
"clicked",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (data->dialog));
- g_signal_connect (G_OBJECT (ok_button),
- "clicked",
- G_CALLBACK (ok_clicked_cb),
- data);
- g_signal_connect (G_OBJECT (data->d_files_entry),
- "changed",
- G_CALLBACK (entry_changed_cb),
- data);
g_object_unref (builder);