diff options
author | Cody Russell <crussell@canonical.com> | 2010-02-09 11:59:30 -0600 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-02-09 11:59:30 -0600 |
commit | a843525802fee1d72cb1b0f95bb068b3f9a4bba3 (patch) | |
tree | 80a338f6fe91f1b240721cae56f524dfcc632a16 | |
parent | d03f386062621035cfb774436913d426878a1df8 (diff) | |
download | ayatana-ido-a843525802fee1d72cb1b0f95bb068b3f9a4bba3.tar.gz ayatana-ido-a843525802fee1d72cb1b0f95bb068b3f9a4bba3.tar.bz2 ayatana-ido-a843525802fee1d72cb1b0f95bb068b3f9a4bba3.zip |
Add support for initial value to ido_scale_menu_item_new_with_range()
-rw-r--r-- | example/menus.c | 2 | ||||
-rw-r--r-- | src/idoscalemenuitem.c | 3 | ||||
-rw-r--r-- | src/idoscalemenuitem.h | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/example/menus.c b/example/menus.c index 9877d5e..62e6bf4 100644 --- a/example/menus.c +++ b/example/menus.c @@ -38,7 +38,7 @@ main (int argc, char *argv[]) menuitem = gtk_menu_item_new_with_label ("Open"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - menuitem = ido_scale_menu_item_new_with_range ("Volume", 0, 100, 1); + menuitem = ido_scale_menu_item_new_with_range ("Volume", 65, 0, 100, 1); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); menuitem = ido_entry_menu_item_new (); diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c index 08f54e7..2f15fa9 100644 --- a/src/idoscalemenuitem.c +++ b/src/idoscalemenuitem.c @@ -369,11 +369,12 @@ ido_scale_menu_item_new (const gchar *label, **/ GtkWidget* ido_scale_menu_item_new_with_range (const gchar *label, + gdouble value, gdouble min, gdouble max, gdouble step) { - GtkObject *adjustment = gtk_adjustment_new (min, min, max, step, 10 * step, 0); + GtkObject *adjustment = gtk_adjustment_new (value, min, max, step, 10 * step, 0); return g_object_new (IDO_TYPE_SCALE_MENU_ITEM, "label", label, diff --git a/src/idoscalemenuitem.h b/src/idoscalemenuitem.h index 4d43e96..98e333a 100644 --- a/src/idoscalemenuitem.h +++ b/src/idoscalemenuitem.h @@ -59,6 +59,7 @@ GType ido_scale_menu_item_get_type (void) G_GNUC_CONST; GtkWidget *ido_scale_menu_item_new (const gchar *label, GtkAdjustment *adjustment); GtkWidget *ido_scale_menu_item_new_with_range (const gchar *label, + gdouble value, gdouble min, gdouble max, gdouble step); |