diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-09-14 19:18:28 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-09-14 19:18:28 +0100 |
commit | a817479e8353f8f84dc4f95bb980f2d1b4ba1380 (patch) | |
tree | ff8c1c03db6d2dbc98417a16dcca51916610e4a7 /src/volume-widget.c | |
parent | 0568dd3b8c0510269699d4f9f256b878137008d3 (diff) | |
parent | bab2f6616d4ad90243d3551513ad9e90c0df692e (diff) | |
download | ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.tar.gz ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.tar.bz2 ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.zip |
service crash fix branch merge
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. |