summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--mate-volume-control/gvc-mixer-dialog.c16
2 files changed, 9 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index c9cb974..bc68823 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@ AC_TYPE_SIZE_T
GLIB_REQUIRED_VERSION=2.36.0
GIO_REQUIRED_VERSION=2.36.0
CANBERRA_REQUIRED_VERSION=0.13
+MATE_MIXER_REQUIRED_VERSION=1.9.1
MATE_DESKTOP_REQUIRED_VERSION=1.9.1
MATE_PANEL_REQUIRED_VERSION=1.7.0
@@ -77,7 +78,7 @@ PKG_CHECK_MODULES(VOLUME_CONTROL,
unique-$UNIQUE_API_VERSION
libxml-2.0
mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
- libmatemixer
+ libmatemixer >= $MATE_MIXER_REQUIRED_VERSION
)
AC_SUBST(VOLUME_CONTROL_CFLAGS)
AC_SUBST(VOLUME_CONTROL_LIBS)
diff --git a/mate-volume-control/gvc-mixer-dialog.c b/mate-volume-control/gvc-mixer-dialog.c
index b6525fb..938c57a 100644
--- a/mate-volume-control/gvc-mixer-dialog.c
+++ b/mate-volume-control/gvc-mixer-dialog.c
@@ -143,13 +143,11 @@ find_stream_port_switch (MateMixerStream *stream)
switches = mate_mixer_stream_list_switches (stream);
while (switches != NULL) {
- MateMixerSwitch *swtch = MATE_MIXER_SWITCH (switches->data);
- MateMixerSwitchFlags flags;
+ MateMixerStreamSwitch *swtch = MATE_MIXER_STREAM_SWITCH (switches->data);
- flags = mate_mixer_switch_get_flags (swtch);
- if ((flags & MATE_MIXER_SWITCH_TOGGLE) == 0 &&
- mate_mixer_switch_get_role (swtch) == MATE_MIXER_SWITCH_ROLE_PORT)
- return swtch;
+ if (!MATE_MIXER_IS_TOGGLE (swtch) &&
+ mate_mixer_stream_switch_get_role (swtch) == MATE_MIXER_STREAM_SWITCH_ROLE_PORT)
+ return MATE_MIXER_SWITCH (swtch);
switches = switches->next;
}
@@ -163,10 +161,10 @@ find_device_profile_switch (MateMixerDevice *device)
switches = mate_mixer_device_list_switches (device);
while (switches != NULL) {
- MateMixerSwitch *swtch = MATE_MIXER_SWITCH (switches->data);
+ MateMixerDeviceSwitch *swtch = MATE_MIXER_DEVICE_SWITCH (switches->data);
- if (mate_mixer_switch_get_role (swtch) == MATE_MIXER_SWITCH_ROLE_DEVICE_PROFILE)
- return swtch;
+ if (mate_mixer_device_switch_get_role (swtch) == MATE_MIXER_DEVICE_SWITCH_ROLE_PROFILE)
+ return MATE_MIXER_SWITCH (swtch);
switches = switches->next;
}