summaryrefslogtreecommitdiff
path: root/src/forms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/forms.c')
-rw-r--r--src/forms.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/forms.c b/src/forms.c
index 59c6461f..1923790f 100644
--- a/src/forms.c
+++ b/src/forms.c
@@ -206,6 +206,14 @@ void zenity_forms_dialog (ZenityData *data, ZenityFormsData *forms_data)
if (data->width > -1 || data->height > -1)
gtk_window_set_default_size (GTK_WINDOW (dialog), data->width, data->height);
+ if (data->extra_label) {
+ gint i=0;
+ while(data->extra_label[i]!=NULL){
+ gtk_dialog_add_button (GTK_DIALOG (dialog), data->extra_label[i], i);
+ i++;
+ }
+ }
+
if (data->ok_label) {
button = GTK_WIDGET (gtk_builder_get_object (builder, "zenity_forms_ok_button"));
gtk_button_set_label (GTK_BUTTON (button), data->ok_label);
@@ -439,6 +447,8 @@ zenity_forms_dialog_response (GtkWidget *widget, int response, gpointer data)
break;
default:
+ if (response < g_strv_length(zen_data->extra_label))
+ printf("%s\n",zen_data->extra_label[response]);
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
bgstack15