diff options
author | Glynn Foster <glynn.foster@sun.com> | 2003-01-09 18:07:04 +0000 |
---|---|---|
committer | Glynn Foster <gman@src.gnome.org> | 2003-01-09 18:07:04 +0000 |
commit | cd4e438bfb3ebfd3cc872e203e343a50acc02a15 (patch) | |
tree | addb42a9253fbc3b768a48922eebe1c73421f3a4 /src/main.c | |
parent | Fix up the response signal handlers. Use returns of 0 for 'Ok' and (diff) | |
download | zenity-cd4e438bfb3ebfd3cc872e203e343a50acc02a15.tar.gz zenity-cd4e438bfb3ebfd3cc872e203e343a50acc02a15.tar.bz2 zenity-cd4e438bfb3ebfd3cc872e203e343a50acc02a15.zip |
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.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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")); |