1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

add patch-r29703 to fix the coredump on exit

This commit is contained in:
Oliver Lehmann 2009-04-05 17:05:07 +00:00
parent f2365b443f
commit 9f6a7fd222
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=231648
2 changed files with 140 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= xfce4-mixer
PORTVERSION= 4.6.0
PORTREVISION= 1
CATEGORIES= audio xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
DIST_SUBDIR= xfce4

View File

@ -0,0 +1,139 @@
Modified: panel-plugin/xfce-mixer-plugin.c
===================================================================
--- panel-plugin/xfce-mixer-plugin.c 2009-04-04 10:12:48 UTC (rev 29702)
+++ panel-plugin/xfce-mixer-plugin.c 2009-04-05 09:08:37 UTC (rev 29703)
@@ -86,8 +86,8 @@
/* Function prototypes */
static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin);
static XfceMixerPlugin *xfce_mixer_plugin_new (XfcePanelPlugin *plugin);
-static void xfce_mixer_plugin_free (XfcePanelPlugin *plugin,
- XfceMixerPlugin *mixer_plugin);
+static void xfce_mixer_plugin_free (XfceMixerPlugin *mixer_plugin,
+ XfcePanelPlugin *plugin);
static gboolean xfce_mixer_plugin_size_changed (XfceMixerPlugin *mixer_plugin,
gint size);
static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin,
@@ -167,8 +167,8 @@
static void
-xfce_mixer_plugin_free (XfcePanelPlugin *plugin,
- XfceMixerPlugin *mixer_plugin)
+xfce_mixer_plugin_free (XfceMixerPlugin *mixer_plugin,
+ XfcePanelPlugin *plugin)
{
/* Free card and track names */
g_free (mixer_plugin->command);
@@ -529,9 +529,11 @@
static void
xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin)
{
- gint *volumes;
- gdouble volume;
- gchar *tip_text;
+ XfceMixerTrackType track_type;
+ gboolean muted = FALSE;
+ gdouble volume;
+ gint *volumes;
+ gchar *tip_text;
g_return_if_fail (mixer_plugin != NULL);
g_return_if_fail (GST_IS_MIXER (mixer_plugin->card));
@@ -549,8 +551,17 @@
gtk_tooltips_set_tip (mixer_plugin->tooltips, mixer_plugin->button, tip_text, "test");
g_free (tip_text);
+ /* Determine track type */
+ track_type = xfce_mixer_track_type_new (mixer_plugin->track);
+
+ if (G_LIKELY (track_type == XFCE_MIXER_TRACK_TYPE_PLAYBACK))
+ muted = GST_MIXER_TRACK_HAS_FLAG (mixer_plugin->track, GST_MIXER_TRACK_MUTE);
+ else if (track_type == XFCE_MIXER_TRACK_TYPE_CAPTURE)
+ muted = !GST_MIXER_TRACK_HAS_FLAG (mixer_plugin->track, GST_MIXER_TRACK_RECORD);
+
/* Update the volume button */
xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin->button), volume);
+ xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin->button), muted);
/* Free volume array */
g_free (volumes);
@@ -650,7 +661,9 @@
/* Replace the track label */
g_free (mixer_plugin->track_label);
+ mixer_plugin->track_label = NULL;
g_object_get (track, "label", &mixer_plugin->track_label, NULL);
+ g_debug ("mixer_plugin->track_label = '%s'", mixer_plugin->track_label);
}
Modified: xfce4-mixer/xfce-mixer-track.c
===================================================================
--- xfce4-mixer/xfce-mixer-track.c 2009-04-04 10:12:48 UTC (rev 29702)
+++ xfce4-mixer/xfce-mixer-track.c 2009-04-05 09:08:37 UTC (rev 29703)
@@ -265,8 +265,7 @@
/* Some of the mixer controls need to be updated before they can be used */
xfce_mixer_track_update_mute (track);
- if (G_UNLIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_CAPTURE))
- xfce_mixer_track_update_record (track);
+ xfce_mixer_track_update_record (track);
/* Free volume array */
g_free (volumes);
@@ -425,11 +424,11 @@
g_return_if_fail (IS_XFCE_MIXER_TRACK (track));
- if (G_UNLIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_CAPTURE))
- return;
-
- muted = GST_MIXER_TRACK_HAS_FLAG (track->gst_track, GST_MIXER_TRACK_MUTE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->mute_button), muted);
+ if (G_LIKELY (xfce_mixer_track_type_new (track->gst_track) != XFCE_MIXER_TRACK_TYPE_CAPTURE))
+ {
+ muted = GST_MIXER_TRACK_HAS_FLAG (track->gst_track, GST_MIXER_TRACK_MUTE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->mute_button), muted);
+ }
}
@@ -441,8 +440,11 @@
g_return_if_fail (IS_XFCE_MIXER_TRACK (track));
- record = GST_MIXER_TRACK_HAS_FLAG (track->gst_track, GST_MIXER_TRACK_RECORD);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->record_button), record);
+ if (G_UNLIKELY (xfce_mixer_track_type_new (track->gst_track) == XFCE_MIXER_TRACK_TYPE_CAPTURE))
+ {
+ record = GST_MIXER_TRACK_HAS_FLAG (track->gst_track, GST_MIXER_TRACK_RECORD);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track->record_button), record);
+ }
}
Modified: xfce4-mixer/xfce-mixer.c
===================================================================
--- xfce4-mixer/xfce-mixer.c 2009-04-04 10:12:48 UTC (rev 29702)
+++ xfce4-mixer/xfce-mixer.c 2009-04-05 09:08:37 UTC (rev 29703)
@@ -351,7 +351,7 @@
switch (prop_id)
{
case PROP_CARD:
- g_value_set_object (value, g_object_ref (mixer->card));
+ g_value_set_object (value, mixer->card);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -372,7 +372,7 @@
switch (prop_id)
{
case PROP_CARD:
- mixer->card = g_object_ref (g_value_get_object (value));
+ mixer->card = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);