Skip to content

Commit ddc93b6

Browse files
andreas56perexg
authored andcommitted
envy24control: port to GTK 3
Closes: #35 Signed-off-by: Andreas Persson <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 3249563 commit ddc93b6

File tree

12 files changed

+541
-534
lines changed

12 files changed

+541
-534
lines changed

envy24control/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void config_close()
4747
void config_set_stereo(GtkWidget *but, gpointer data)
4848
{
4949
gint i=GPOINTER_TO_INT(data);
50-
config_stereo[i]=GTK_TOGGLE_BUTTON(but)->active;
50+
config_stereo[i]=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(but));
5151
}
5252

5353
void config_restore_stereo()

envy24control/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ AC_HEADER_STDC
55
AM_INIT_AUTOMAKE
66
AM_MAINTAINER_MODE([enable])
77

8-
PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-2.0 alsa >= 0.9.0)
8+
PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-3.0 alsa >= 0.9.0)
99

1010
AC_OUTPUT(Makefile desktop/Makefile)

envy24control/driverevents.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "envy24control.h"
2121

22-
void control_input_callback(gpointer data, gint source, GdkInputCondition condition)
22+
gboolean control_input_callback(GIOChannel *source, GIOCondition condition, gpointer data)
2323
{
2424
snd_ctl_t *ctl = (snd_ctl_t *)data;
2525
snd_ctl_event_t *ev;
@@ -29,12 +29,12 @@ void control_input_callback(gpointer data, gint source, GdkInputCondition condit
2929

3030
snd_ctl_event_alloca(&ev);
3131
if (snd_ctl_read(ctl, ev) < 0)
32-
return;
32+
return TRUE;
3333
name = snd_ctl_event_elem_get_name(ev);
3434
index = snd_ctl_event_elem_get_index(ev);
3535
mask = snd_ctl_event_elem_get_mask(ev);
3636
if (! (mask & (SND_CTL_EVENT_MASK_VALUE | SND_CTL_EVENT_MASK_INFO)))
37-
return;
37+
return TRUE;
3838

3939
switch (snd_ctl_event_elem_get_interface(ev)) {
4040
case SND_CTL_ELEM_IFACE_MIXER:
@@ -88,5 +88,6 @@ void control_input_callback(gpointer data, gint source, GdkInputCondition condit
8888
default:
8989
break;
9090
}
91+
return TRUE;
9192
}
9293

0 commit comments

Comments
 (0)