diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-09-14 15:13:49 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-09-14 15:13:49 -0400 |
commit | 51fbe7e43942f7fb94f6a26fd917cf181cde58af (patch) | |
tree | e8cd5c0133819afdccf0010f6785cad816857a54 /src/volume-widget.c | |
parent | e9a955249e88474858861e944ace11d55245d967 (diff) | |
parent | 4b7abb73527b7ce240c15d408b00afa6a80a3c07 (diff) | |
download | ayatana-indicator-sound-51fbe7e43942f7fb94f6a26fd917cf181cde58af.tar.gz ayatana-indicator-sound-51fbe7e43942f7fb94f6a26fd917cf181cde58af.tar.bz2 ayatana-indicator-sound-51fbe7e43942f7fb94f6a26fd917cf181cde58af.zip |
Import upstream version 0.4.5
Diffstat (limited to 'src/volume-widget.c')
-rw-r--r-- | src/volume-widget.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/volume-widget.c b/src/volume-widget.c index 5e7cf9f..1cfdcc4 100644 --- a/src/volume-widget.c +++ b/src/volume-widget.c @@ -61,6 +61,7 @@ static void volume_widget_parent_changed (GtkWidget *widget, gpointer user_data) G_DEFINE_TYPE (VolumeWidget, volume_widget, G_TYPE_OBJECT); + static void volume_widget_class_init (VolumeWidgetClass *klass) { @@ -201,8 +202,6 @@ volume_widget_update(VolumeWidget* self, gdouble update) dbusmenu_menuitem_handle_event (priv->twin_item, "update", &value, 0); } - - GtkWidget* volume_widget_get_ido_slider(VolumeWidget* self) { @@ -234,6 +233,24 @@ volume_widget_slider_released(GtkWidget *widget, gpointer user_data) priv->grabbed = FALSE; } +void +volume_widget_tidy_up (GtkWidget *widget) +{ + VolumeWidget* mitem = VOLUME_WIDGET(widget); + VolumeWidgetPrivate * priv = VOLUME_WIDGET_GET_PRIVATE(mitem); + gtk_widget_destroy (priv->ido_volume_slider); +} + +gdouble +volume_widget_get_current_volume ( GtkWidget *widget ) +{ + VolumeWidget* mitem = VOLUME_WIDGET(widget); + VolumeWidgetPrivate * priv = VOLUME_WIDGET_GET_PRIVATE(mitem); + gdouble vol = g_value_get_double ( dbusmenu_menuitem_property_get_value( priv->twin_item, + DBUSMENU_VOLUME_MENUITEM_LEVEL)); + return vol; +} + /** * volume_widget_new: * @returns: a new #VolumeWidget. |