Adding more callbacks (do not work yet)
This commit is contained in:
parent
ed6e6c45f7
commit
5c17d3bacd
|
@ -134,6 +134,24 @@ void on_help_about(gpointer data)
|
||||||
|
|
||||||
|
|
||||||
/* controls */
|
/* controls */
|
||||||
|
/* on_enum_toggled */
|
||||||
|
void on_enum_toggled(GtkWidget * widget, gpointer data)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* on_set_toggled */
|
||||||
|
void on_set_toggled(GtkWidget * widget, gpointer data)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* on_value_changed */
|
/* on_value_changed */
|
||||||
void on_value_changed(GtkWidget * widget, gdouble value, gpointer data)
|
void on_value_changed(GtkWidget * widget, gdouble value, gpointer data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,8 @@ void on_view_modem(gpointer data);
|
||||||
void on_help_about(gpointer data);
|
void on_help_about(gpointer data);
|
||||||
|
|
||||||
/* controls */
|
/* controls */
|
||||||
|
void on_enum_toggled(GtkWidget * widget, gpointer data);
|
||||||
|
void on_set_toggled(GtkWidget * widget, gpointer data);
|
||||||
void on_value_changed(GtkWidget * widget, gdouble value, gpointer data);
|
void on_value_changed(GtkWidget * widget, gdouble value, gpointer data);
|
||||||
|
|
||||||
#endif /* !MIXER_CALLBACKS_H */
|
#endif /* !MIXER_CALLBACKS_H */
|
||||||
|
|
|
@ -182,6 +182,8 @@ static GtkWidget * _new_enum(Mixer * mixer, struct audio_mixer_enum * e)
|
||||||
widget = gtk_radio_button_new_with_label(group,
|
widget = gtk_radio_button_new_with_label(group,
|
||||||
e->member[i].label.name);
|
e->member[i].label.name);
|
||||||
group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(widget));
|
group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(widget));
|
||||||
|
g_signal_connect(G_OBJECT(widget), "toggled", G_CALLBACK(
|
||||||
|
on_enum_toggled), mixer);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
||||||
}
|
}
|
||||||
return vbox;
|
return vbox;
|
||||||
|
@ -200,6 +202,8 @@ static GtkWidget * _new_set(Mixer * mixer, struct audio_mixer_set * s)
|
||||||
{
|
{
|
||||||
widget = gtk_check_button_new_with_label(
|
widget = gtk_check_button_new_with_label(
|
||||||
s->member[i].label.name);
|
s->member[i].label.name);
|
||||||
|
g_signal_connect(G_OBJECT(widget), "toggled", G_CALLBACK(
|
||||||
|
on_set_toggled), mixer);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
||||||
}
|
}
|
||||||
return vbox;
|
return vbox;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user