From 68fb5e488ecf7c80622af3d00edab5348e70917c Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 10 Mar 2018 16:42:15 +0100 Subject: avoid gtk_dialog_add_buttons with stock ids --- eel/eel-stock-dialogs.c | 4 +++- eel/eel-stock-dialogs.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'eel') diff --git a/eel/eel-stock-dialogs.c b/eel/eel-stock-dialogs.c index 5cc9487e..b893642c 100644 --- a/eel/eel-stock-dialogs.c +++ b/eel/eel-stock-dialogs.c @@ -191,7 +191,7 @@ trash_dialog_response_callback (GtkDialog *dialog, gtk_widget_destroy (GTK_WIDGET (dialog)); } -void +GtkWidget* eel_dialog_add_button (GtkDialog *dialog, const gchar *button_text, const gchar *icon_name, @@ -207,6 +207,8 @@ eel_dialog_add_button (GtkDialog *dialog, gtk_widget_set_can_default (button, TRUE); gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id); + + return button; } static gboolean diff --git a/eel/eel-stock-dialogs.h b/eel/eel-stock-dialogs.h index d61c1bb1..b5f69715 100644 --- a/eel/eel-stock-dialogs.h +++ b/eel/eel-stock-dialogs.h @@ -49,7 +49,7 @@ int eel_run_simple_dialog (GtkWidget *parent, const char *primary_text, const char *secondary_text, ...); -void eel_dialog_add_button (GtkDialog *dialog, +GtkWidget* eel_dialog_add_button (GtkDialog *dialog, const gchar *button_text, const gchar *icon_name, gint response_id); -- cgit v1.2.1