summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c
index 819f9a8e..0e2665c1 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -396,6 +396,14 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
if (data->modal)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ 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_tree_ok_button"));
gtk_button_set_label (GTK_BUTTON (button), data->ok_label);
@@ -708,7 +716,8 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
break;
default:
- /* Esc dialog */
+ 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