summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2003-01-09 18:07:04 +0000
committerGlynn Foster <gman@src.gnome.org>2003-01-09 18:07:04 +0000
commitcd4e438bfb3ebfd3cc872e203e343a50acc02a15 (patch)
treeaddb42a9253fbc3b768a48922eebe1c73421f3a4 /src/main.c
parent6a65d75921d352323277f770f357ca3065436133 (diff)
Fix up the date string, although I guess this should be localized.
2003-01-09 Glynn Foster <glynn.foster@sun.com> * src/calendar.c: Fix up the date string, although I guess this should be localized. * src/main.c: Add a new --pulsate option, which reads from stdin and pulsates the progress bar until we reach EOF. * src/progress.c: Rewrite to actually work. Don't really need GIOChannels here. * TODO: Updated accordingly.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index f60eb7f..53cfc99 100644
--- a/src/main.c
+++ b/src/main.c
@@ -80,6 +80,7 @@ enum {
OPTION_RADIOLIST,
OPTION_PROGRESSTEXT,
OPTION_PERCENTAGE,
+ OPTION_PULSATE,
OPTION_QUESTIONTEXT,
OPTION_TEXTFILE,
OPTION_WARNINGTEXT,
@@ -451,6 +452,15 @@ struct poptOption progress_options[] = {
N_("Set initial percentage"),
NULL
},
+ {
+ "pulsate",
+ '\0',
+ POPT_ARG_NONE,
+ NULL,
+ OPTION_PULSATE,
+ N_("Pulsate progress bar"),
+ NULL
+ },
POPT_TABLEEND
};
@@ -696,6 +706,7 @@ zenity_init_parsing_options (void) {
results->calendar_data->year = 0;
results->calendar_data->dialog_text = NULL;
results->progress_data->percentage = -1;
+ results->progress_data->pulsate = FALSE;
results->entry_data->visible = TRUE;
results->tree_data->checkbox = FALSE;
results->tree_data->radiobox = FALSE;
@@ -1094,6 +1105,14 @@ void zenity_parse_options_callback (poptContext ctx,
}
results->progress_data->percentage = atoi (arg);
break;
+ case OPTION_PULSATE:
+ if (results->mode != MODE_PROGRESS) {
+ g_printerr (_("--pulsate is not supported for this dialog\n"));
+ zenity_free_parsing_options ();
+ exit (-1);
+ }
+ results->progress_data->pulsate = TRUE;
+ break;
case OPTION_ABOUT:
if (results->mode != MODE_LAST) {
g_printerr (_("Two or more dialog options specified\n"));