diff options
author | Lucas Rocha <lucasr@gnome.org> | 2005-12-15 05:40:15 +0000 |
---|---|---|
committer | Lucas Almeida Rocha <lucasr@src.gnome.org> | 2005-12-15 05:40:15 +0000 |
commit | 4ac6730868c97e7cc800cee8eba6721a23181678 (patch) | |
tree | 93caf3c18e56e979481fb8fb1d5261542b92278c /src | |
parent | Updated Slovak translation. (diff) | |
download | zenity-4ac6730868c97e7cc800cee8eba6721a23181678.tar.gz zenity-4ac6730868c97e7cc800cee8eba6721a23181678.tar.bz2 zenity-4ac6730868c97e7cc800cee8eba6721a23181678.zip |
add --hide-value to scale dialog.
2005-12-15 Lucas Rocha <lucasr@gnome.org>
* src/option.c, src/scale.c, src/zenity.h: add
--hide-value to scale dialog.
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 12 | ||||
-rw-r--r-- | src/scale.c | 3 | ||||
-rw-r--r-- | src/zenity.h | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index f3f26b3a..2268ef7e 100644 --- a/src/option.c +++ b/src/option.c @@ -98,6 +98,7 @@ static gint zenity_scale_min_value; static gint zenity_scale_max_value; static gint zenity_scale_step; static gboolean zenity_scale_print_partial; +static gboolean zenity_scale_hide_value; /* Miscelaneus Options */ static gboolean zenity_misc_about; @@ -718,6 +719,15 @@ static GOptionEntry scale_options[] = { N_("Print partial values"), NULL }, + { + "hide-value", + '\0', + 0, + G_OPTION_ARG_NONE, + &zenity_scale_hide_value, + N_("Hide value"), + NULL + }, { NULL } @@ -1002,6 +1012,7 @@ zenity_scale_pre_callback (GOptionContext *context, zenity_scale_max_value = 100; zenity_scale_step = 1; zenity_scale_print_partial = FALSE; + zenity_scale_hide_value = FALSE; return TRUE; } @@ -1343,6 +1354,7 @@ zenity_scale_post_callback (GOptionContext *context, results->scale_data->max_value = zenity_scale_max_value; results->scale_data->step = zenity_scale_step; results->scale_data->print_partial = zenity_scale_print_partial; + results->scale_data->hide_value = zenity_scale_hide_value; } return TRUE; diff --git a/src/scale.c b/src/scale.c index 228995e6..cacb083a 100644 --- a/src/scale.c +++ b/src/scale.c @@ -89,6 +89,9 @@ zenity_scale (ZenityData *data, ZenityScaleData *scale_data) g_signal_connect (G_OBJECT (scale), "value-changed", G_CALLBACK (zenity_scale_value_changed), data); + if (scale_data->hide_value) + gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); + zenity_util_show_dialog (dialog); gtk_main (); } diff --git a/src/zenity.h b/src/zenity.h index 6b8cd294..6fb2b4c2 100644 --- a/src/zenity.h +++ b/src/zenity.h @@ -67,6 +67,7 @@ typedef struct { gint max_value; gint step; gboolean print_partial; + gboolean hide_value; } ZenityScaleData; typedef struct { |