diff options
author | rbuj <[email protected]> | 2020-04-14 13:21:22 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-06-05 14:38:12 +0200 |
commit | 4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3 (patch) | |
tree | 53bb6898ebb505c912c6c935a80288e95c2cc6f6 /src/dlg-prop.c | |
parent | c60e1cfb6c4296bcc9c4f05da3484f22e7f15770 (diff) | |
download | engrampa-4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3.tar.bz2 engrampa-4a0d9903b8f6b33b73b2e2bc578c9a237c67b4b3.tar.xz |
Use callback symbols defined in ui files
Diffstat (limited to 'src/dlg-prop.c')
-rw-r--r-- | src/dlg-prop.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/dlg-prop.c b/src/dlg-prop.c index e604f5c..37376ad 100644 --- a/src/dlg-prop.c +++ b/src/dlg-prop.c @@ -60,7 +60,6 @@ dlg_prop (FrWindow *window) { GtkBuilder *builder; DialogData *data; - GtkWidget *help_button; GFile *parent; char *uri; char *markup; @@ -75,7 +74,6 @@ dlg_prop (FrWindow *window) /* Get the widgets. */ - help_button = GET_WIDGET ("p_help_button"); data->dialog = GET_WIDGET ("prop_dialog"); /* Set widgets data. */ @@ -156,18 +154,17 @@ dlg_prop (FrWindow *window) /* Set the signals handlers. */ - g_signal_connect (G_OBJECT (data->dialog), - "destroy", - G_CALLBACK (destroy_cb), - data); + gtk_builder_add_callback_symbols (builder, + "on_prop_dialog_destroy", G_CALLBACK (destroy_cb), + "on_p_help_button_clicked", G_CALLBACK (help_cb), + NULL); + + gtk_builder_connect_signals (builder, data); + g_signal_connect_swapped (gtk_builder_get_object (builder, "p_ok_button"), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (data->dialog)); - g_signal_connect (G_OBJECT (help_button), - "clicked", - G_CALLBACK (help_cb), - data); g_object_unref (builder); |