[Xfce4-commits] r29731 - in xfce4-mixer/trunk: . libxfce4mixer xfce4-mixer
Jannis Pohlmann
jannis at xfce.org
Wed Apr 8 14:13:35 CEST 2009
Author: jannis
Date: 2009-04-08 12:13:35 +0000 (Wed, 08 Apr 2009)
New Revision: 29731
Modified:
xfce4-mixer/trunk/ChangeLog
xfce4-mixer/trunk/libxfce4mixer/libxfce4mixer.c
xfce4-mixer/trunk/xfce4-mixer/main.c
Log:
* libxfce4mixer/libxfce4mixer.c: Fix crash with backends where the
GstMixer implementation has no "device-name" property (bug #5201).
* xfce4-mixer/main.c: Include libxfcegui4.h to avoid implicit
declaration of xfce_err().
Modified: xfce4-mixer/trunk/ChangeLog
===================================================================
--- xfce4-mixer/trunk/ChangeLog 2009-04-08 12:01:08 UTC (rev 29730)
+++ xfce4-mixer/trunk/ChangeLog 2009-04-08 12:13:35 UTC (rev 29731)
@@ -1,3 +1,10 @@
+2009-04-08 Jannis Pohlmann <jannis at xfce.org>
+
+ * libxfce4mixer/libxfce4mixer.c: Fix crash with backends where the
+ GstMixer implementation has no "device-name" property (bug #5201).
+ * xfce4-mixer/main.c: Include libxfcegui4.h to avoid implicit
+ declaration of xfce_err().
+
2009-04-05 Jannis Pohlmann <jannis at xfce.org>
* panel-plugin/xfce-mixer-plugin.c: Display mute/record state properly
Modified: xfce4-mixer/trunk/libxfce4mixer/libxfce4mixer.c
===================================================================
--- xfce4-mixer/trunk/libxfce4mixer/libxfce4mixer.c 2009-04-08 12:01:08 UTC (rev 29730)
+++ xfce4-mixer/trunk/libxfce4mixer/libxfce4mixer.c 2009-04-08 12:13:35 UTC (rev 29731)
@@ -232,7 +232,7 @@
{
GstElementFactory *factory;
const gchar *long_name;
- gchar *device_name;
+ gchar *device_name = NULL;
gchar *internal_name;
gchar *name;
gchar *p;
@@ -244,11 +244,12 @@
long_name = gst_element_factory_get_longname (factory);
/* Get the device name of the mixer element */
- g_object_get (mixer, "device-name", &device_name, NULL);
-
+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (mixer)), "device-name"))
+ g_object_get (mixer, "device-name", &device_name, NULL);
+
/* Fall back to default name if neccessary */
- if (G_LIKELY (device_name == NULL))
- device_name = g_strdup_printf (_("Unknown Volume Control %d"), (*counter)++);
+ if (G_UNLIKELY (device_name == NULL))
+ device_name = g_strdup_printf (_("Unknown Volume Control %d"), (*counter)++);
/* Build display name */
name = g_strdup_printf ("%s (%s)", device_name, long_name);
Modified: xfce4-mixer/trunk/xfce4-mixer/main.c
===================================================================
--- xfce4-mixer/trunk/xfce4-mixer/main.c 2009-04-08 12:01:08 UTC (rev 29730)
+++ xfce4-mixer/trunk/xfce4-mixer/main.c 2009-04-08 12:13:35 UTC (rev 29731)
@@ -29,6 +29,7 @@
#include <gst/gst.h>
#include <libxfce4util/libxfce4util.h>
+#include <libxfcegui4/libxfcegui4.h>
#include <xfconf/xfconf.h>
#include "libxfce4mixer/libxfce4mixer.h"
More information about the Xfce4-commits
mailing list