static void cc_sound_panel_init (CcSoundPanel *self) { gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), ICON_DATA_DIR); gtk_window_set_default_icon_name ("cin-multimedia-volume-control"); self->control = gvc_mixer_control_new ("Sagarmatha Volume Control Dialog"); gvc_mixer_control_open (self->control); self->dialog = gvc_mixer_dialog_new (self->control); gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->dialog)); gtk_widget_show (GTK_WIDGET (self->dialog)); }
static void mpd_volume_tile_init (MpdVolumeTile *self) { MpdVolumeTilePrivate *priv = GET_PRIVATE (self); ClutterActor *icon; /* Layout */ mx_box_layout_set_spacing (MX_BOX_LAYOUT (self), MPD_TILE_ICON_SPACING); icon = mx_icon_new (); clutter_actor_set_name (icon, "volume-off"); mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (self), icon, -1, "y-fill", FALSE, NULL); priv->volume_slider = mx_slider_new (); mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (self), priv->volume_slider, -1, "expand", TRUE, NULL); g_signal_connect (priv->volume_slider, "notify::value", G_CALLBACK (_volume_slider_value_notify_cb), self); icon = mx_icon_new (); clutter_actor_set_name (icon, "volume-on"); mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (self), icon, -1, "y-fill", FALSE, NULL); /* Control */ priv->control = gvc_mixer_control_new (MIXER_CONTROL_NAME); g_signal_connect (priv->control, "default-sink-changed", G_CALLBACK (_mixer_control_default_sink_changed_cb), self); g_signal_connect (priv->control, "ready", G_CALLBACK (_mixer_control_ready_cb), self); gvc_mixer_control_open (priv->control); }