update source volume when slider is moved

This commit is contained in:
Brandon Lewis 2010-08-03 14:43:41 +02:00 committed by Edward Hervey
parent c9a9cabaec
commit d34e61d395

View file

@ -98,6 +98,9 @@ gboolean duration_scale_change_value_cb (GtkRange * range, GtkScrollType
gboolean in_point_scale_change_value_cb (GtkRange * range, GtkScrollType
unused, gdouble value, App * app);
gboolean volume_change_value_cb (GtkRange * range, GtkScrollType unused,
gdouble value, App * app);
void duration_cell_func (GtkTreeViewColumn * column, GtkCellRenderer * renderer,
GtkTreeModel * model, GtkTreeIter * iter, gpointer user);
@ -127,6 +130,8 @@ void seconds_notify_text_changed_cb (GtkEntry * widget, GParamSpec * unused,
void background_type_changed_cb (GtkComboBox * widget, App * app);
void frequency_value_changed_cb (GtkSpinButton * widget, App * app);
/* UI state functions *******************************************************/
static void
@ -390,6 +395,25 @@ background_type_changed_cb (GtkComboBox * widget, App * app)
}
}
void
frequency_value_changed_cb (GtkSpinButton * widget, App * app)
{
}
gboolean
volume_change_value_cb (GtkRange * widget, GtkScrollType unused, gdouble
value, App * app)
{
GList *tmp;
value = value >= 0 ? (value <= 2.0 ? value : 2.0) : 0;
for (tmp = app->selected_objects; tmp; tmp = tmp->next) {
g_object_set (G_OBJECT (tmp->data), "volume", (gdouble) value, NULL);
}
return TRUE;
}
/* application methods ******************************************************/
static void selection_foreach (GtkTreeModel * model, GtkTreePath * path,