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.
This commit is contained in:
parent
5fd160dc83
commit
4ac6730868
@ -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>
|
2005-12-13 Lucas Rocha <lucasr@gnome.org>
|
||||||
|
|
||||||
* src/zenity.glade: make the hscale discontinuous.
|
* src/zenity.glade: make the hscale discontinuous.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
2005-12-14 Ankit Patel <ankit644@yahoo.com>
|
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>
|
2005-12-13 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
|
||||||
|
|
||||||
|
12
src/option.c
12
src/option.c
@ -98,6 +98,7 @@ static gint zenity_scale_min_value;
|
|||||||
static gint zenity_scale_max_value;
|
static gint zenity_scale_max_value;
|
||||||
static gint zenity_scale_step;
|
static gint zenity_scale_step;
|
||||||
static gboolean zenity_scale_print_partial;
|
static gboolean zenity_scale_print_partial;
|
||||||
|
static gboolean zenity_scale_hide_value;
|
||||||
|
|
||||||
/* Miscelaneus Options */
|
/* Miscelaneus Options */
|
||||||
static gboolean zenity_misc_about;
|
static gboolean zenity_misc_about;
|
||||||
@ -718,6 +719,15 @@ static GOptionEntry scale_options[] = {
|
|||||||
N_("Print partial values"),
|
N_("Print partial values"),
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"hide-value",
|
||||||
|
'\0',
|
||||||
|
0,
|
||||||
|
G_OPTION_ARG_NONE,
|
||||||
|
&zenity_scale_hide_value,
|
||||||
|
N_("Hide value"),
|
||||||
|
NULL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
@ -1002,6 +1012,7 @@ zenity_scale_pre_callback (GOptionContext *context,
|
|||||||
zenity_scale_max_value = 100;
|
zenity_scale_max_value = 100;
|
||||||
zenity_scale_step = 1;
|
zenity_scale_step = 1;
|
||||||
zenity_scale_print_partial = FALSE;
|
zenity_scale_print_partial = FALSE;
|
||||||
|
zenity_scale_hide_value = FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1343,6 +1354,7 @@ zenity_scale_post_callback (GOptionContext *context,
|
|||||||
results->scale_data->max_value = zenity_scale_max_value;
|
results->scale_data->max_value = zenity_scale_max_value;
|
||||||
results->scale_data->step = zenity_scale_step;
|
results->scale_data->step = zenity_scale_step;
|
||||||
results->scale_data->print_partial = zenity_scale_print_partial;
|
results->scale_data->print_partial = zenity_scale_print_partial;
|
||||||
|
results->scale_data->hide_value = zenity_scale_hide_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -89,6 +89,9 @@ zenity_scale (ZenityData *data, ZenityScaleData *scale_data)
|
|||||||
g_signal_connect (G_OBJECT (scale), "value-changed",
|
g_signal_connect (G_OBJECT (scale), "value-changed",
|
||||||
G_CALLBACK (zenity_scale_value_changed), data);
|
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);
|
zenity_util_show_dialog (dialog);
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ typedef struct {
|
|||||||
gint max_value;
|
gint max_value;
|
||||||
gint step;
|
gint step;
|
||||||
gboolean print_partial;
|
gboolean print_partial;
|
||||||
|
gboolean hide_value;
|
||||||
} ZenityScaleData;
|
} ZenityScaleData;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Reference in New Issue
Block a user