summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGama Anderson <gamaanderson92@gmail.com>2015-02-28 20:06:09 +0100
committerArx Cruz <acruz@redhat.com>2015-04-21 13:00:44 +0200
commitba5ea0386de2a80a664fb28d3af7e8d395968314 (patch)
treef07081dd0d7b837c80716b4573dd563a2300f2ea /src/util.c
parent5c9095731e7995974de2468debbf1b82593445fd (diff)
downloadzenity-ba5ea0386de2a80a664fb28d3af7e8d395968314.tar.gz
ADD gchar **extra_label TO struct ZenityData
this is done to keep the name of the extra buttons ADD general option "extra-button" with string array as argument This will upon consecutive calls save the name of buttons in an array of strings To all MODES, except notification.c and about.c ADD 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++; } } This add the extra buttons to the dialog. The response is the number of the button To all MODES response, except notification.c and about.c ADD default: if (response < g_strv_length(zen_data->extra_label)) printf("%s\n",zen_data->extra_label[response]); This will print the button name to stdout when they are pressed ADD question option "switch" This will suppress the standard "ok" and "cancel" button in question. This just wort in combination with --extra-button, otherwise error is raised. https://bugzilla.gnome.org/show_bug.cgi?id=118016
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index d63aeca..730b7a9 100644
--- a/src/util.c
+++ b/src/util.c
@@ -76,7 +76,7 @@ zenity_util_load_ui_file (const gchar *root_widget, ...)
/* Enforce terminating NULL */
g_ptr_array_add (ptrarray, NULL);
objects = (gchar**) g_ptr_array_free (ptrarray, FALSE);
-
+
if (g_file_test (ZENITY_UI_FILE_RELATIVEPATH, G_FILE_TEST_EXISTS)) {
/* Try current dir, for debugging */
result = gtk_builder_add_objects_from_file (builder,