aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-02-09 14:04:22 -0600
committerCody Russell <crussell@canonical.com>2010-02-09 14:04:22 -0600
commit6ac36fef72d4071d92d5a2a0da86d57461676720 (patch)
tree764986c01aec4640f5584c1c7e9fe18c8bd1d099
parent484a47ca1df1440679b0e4f8596403afbb939b82 (diff)
parenta843525802fee1d72cb1b0f95bb068b3f9a4bba3 (diff)
downloadayatana-ido-6ac36fef72d4071d92d5a2a0da86d57461676720.tar.gz
ayatana-ido-6ac36fef72d4071d92d5a2a0da86d57461676720.tar.bz2
ayatana-ido-6ac36fef72d4071d92d5a2a0da86d57461676720.zip
Merge initial-slider-value branch
-rw-r--r--example/menus.c2
-rw-r--r--src/idoscalemenuitem.c3
-rw-r--r--src/idoscalemenuitem.h1
3 files changed, 4 insertions, 2 deletions
diff --git a/example/menus.c b/example/menus.c
index 28b505b..7d4b282 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -39,7 +39,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);
image = ido_scale_menu_item_get_primary_image (IDO_SCALE_MENU_ITEM (menuitem));
gtk_image_set_from_stock (GTK_IMAGE (image), GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
image = ido_scale_menu_item_get_secondary_image (IDO_SCALE_MENU_ITEM (menuitem));
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
index 2f9cb4e..a08f2fc 100644
--- a/src/idoscalemenuitem.c
+++ b/src/idoscalemenuitem.c
@@ -498,11 +498,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 46fa6a4..094763c 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);