aboutsummaryrefslogtreecommitdiff
path: root/src/volume-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/volume-widget.c')
-rw-r--r--src/volume-widget.c21
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.