diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | po/ChangeLog | 2 | ||||
-rw-r--r-- | src/option.c | 12 | ||||
-rw-r--r-- | src/scale.c | 3 | ||||
-rw-r--r-- | src/zenity.h | 1 |
5 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-12-15 Lucas Rocha <lucasr@gnome.org> + + * src/option.c, src/scale.c, src/zenity.h: add + --hide-value to scale dialog. + 2005-12-13 Lucas Rocha <lucasr@gnome.org> * src/zenity.glade: make the hscale discontinuous. diff --git a/po/ChangeLog b/po/ChangeLog index 86d0467e..a048847b 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -4,7 +4,7 @@ 2005-12-14 Ankit Patel <ankit644@yahoo.com> - * gu.po: Updated Gujarati Translation. + * gu.po: Updated Gujarati Translation. 2005-12-13 Ignacio Casal Quinteiro <nacho.resa@gmail.com> 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 { |