summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorLucas Rocha <lucasr@gnome.org>2006-12-02 10:54:45 +0000
committerLucas Almeida Rocha <lucasr@src.gnome.org>2006-12-02 10:54:45 +0000
commit09c4a49800992d979845e3c7a05122b5aa1ceaed (patch)
tree9500db72a1e24b6ab2cdf35da38477849e9e952f /src/option.c
parentdon't show cancel button on warning dialog (Fixes bug #324100). Patch from (diff)
downloadzenity-09c4a49800992d979845e3c7a05122b5aa1ceaed.tar.gz
zenity-09c4a49800992d979845e3c7a05122b5aa1ceaed.tar.bz2
zenity-09c4a49800992d979845e3c7a05122b5aa1ceaed.zip
add "auto-kill" option to progress dialog. Now the user can choose whether
2006-12-02 Lucas Rocha <lucasr@gnome.org> * src/zenity.h, src/progress.c, src/option.c: add "auto-kill" option to progress dialog. Now the user can choose whether to kill parent process or not (Fixes bug #310824). Patch from Diego Escalante Urrelo <diego@aureal.com.pe>.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 2be45500..79c327a2 100644
--- a/src/option.c
+++ b/src/option.c
@@ -82,6 +82,7 @@ static gboolean zenity_progress_active;
static int zenity_progress_percentage;
static gboolean zenity_progress_pulsate;
static gboolean zenity_progress_auto_close;
+static gboolean zenity_progress_auto_kill;
/* Question Dialog Options */
static gboolean zenity_question_active;
@@ -561,6 +562,16 @@ static GOptionEntry progress_options[] = {
N_("Dismiss the dialog when 100% has been reached"),
NULL
},
+ {
+ "auto-kill",
+ '\0',
+ 0,
+ G_OPTION_ARG_NONE,
+ &zenity_progress_auto_kill,
+ /* xgettext: no-c-format */
+ N_("Kill parent process if cancel button is pressed"),
+ NULL
+ },
{
NULL
}
@@ -974,6 +985,7 @@ zenity_progress_pre_callback (GOptionContext *context,
zenity_progress_percentage = 0;
zenity_progress_pulsate = FALSE;
zenity_progress_auto_close = FALSE;
+ zenity_progress_auto_kill = FALSE;
return TRUE;
}
@@ -1282,6 +1294,7 @@ zenity_progress_post_callback (GOptionContext *context,
results->progress_data->dialog_text = zenity_general_dialog_text;
results->progress_data->pulsate = zenity_progress_pulsate;
results->progress_data->autoclose = zenity_progress_auto_close;
+ results->progress_data->autokill = zenity_progress_auto_kill;
results->progress_data->percentage = zenity_progress_percentage;
} else {
if (zenity_progress_pulsate)
@@ -1295,6 +1308,10 @@ zenity_progress_post_callback (GOptionContext *context,
if (zenity_progress_auto_close)
zenity_option_error (zenity_option_get_name (progress_options, &zenity_progress_auto_close),
ERROR_SUPPORT);
+
+ if (zenity_progress_auto_kill)
+ zenity_option_error (zenity_option_get_name (progress_options, &zenity_progress_auto_kill),
+ ERROR_SUPPORT);
}
return TRUE;
bgstack15