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-add-folder.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-add-folder.c')
-rw-r--r-- | src/dlg-add-folder.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/dlg-add-folder.c b/src/dlg-add-folder.c index 926da11..2f62986 100644 --- a/src/dlg-add-folder.c +++ b/src/dlg-add-folder.c @@ -657,8 +657,6 @@ load_options_cb (GtkWidget *w, { LoadOptionsDialogData *aod_data; GtkBuilder *builder; - GtkWidget *ok_button; - GtkWidget *remove_button; GtkCellRenderer *renderer; GtkTreeViewColumn *column; @@ -672,31 +670,19 @@ load_options_cb (GtkWidget *w, aod_data->dialog = GET_WIDGET ("add_options_dialog"); aod_data->aod_treeview = GET_WIDGET ("aod_treeview"); - ok_button = GET_WIDGET ("aod_okbutton"); - remove_button = GET_WIDGET ("aod_remove_button"); - /* Set the signals handlers. */ + gtk_builder_add_callback_symbols (builder, + "on_add_options_dialog_destroy", G_CALLBACK (aod_destroy_cb), + "on_aod_treeview_row_activated", G_CALLBACK (aod_activated_cb), + "on_aod_okbutton_clicked", G_CALLBACK (aod_apply_cb), + "on_aod_cancelbutton_clicked", G_CALLBACK (aod_remove_cb), + NULL); + gtk_builder_connect_signals (builder, aod_data); - g_signal_connect (G_OBJECT (aod_data->dialog), - "destroy", - G_CALLBACK (aod_destroy_cb), - aod_data); - g_signal_connect (G_OBJECT (aod_data->aod_treeview), - "row_activated", - G_CALLBACK (aod_activated_cb), - aod_data); g_signal_connect_swapped (gtk_builder_get_object (builder, "aod_cancelbutton"), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (aod_data->dialog)); - g_signal_connect (G_OBJECT (ok_button), - "clicked", - G_CALLBACK (aod_apply_cb), - aod_data); - g_signal_connect (G_OBJECT (remove_button), - "clicked", - G_CALLBACK (aod_remove_cb), - aod_data); g_object_unref (builder); |