aboutsummaryrefslogtreecommitdiff
path: root/audio/xfce4-mixer
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2009-04-05 17:05:07 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2009-04-05 17:05:07 +0000
commit9f6a7fd222629262c5cb0338d3162ffda7d70978 (patch)
tree2eee1cb02670f6d5ae896f2f35b59ef9868342d1 /audio/xfce4-mixer
parentf2365b443ffbae29bba5be22a1fc3378d70a13de (diff)
downloadports-9f6a7fd222629262c5cb0338d3162ffda7d70978.tar.gz
ports-9f6a7fd222629262c5cb0338d3162ffda7d70978.zip
Notes
Diffstat (limited to 'audio/xfce4-mixer')
-rw-r--r--audio/xfce4-mixer/Makefile1
-rw-r--r--audio/xfce4-mixer/files/patch-r29703139
2 files changed, 140 insertions, 0 deletions
diff --git a/audio/xfce4-mixer/Makefile b/audio/xfce4-mixer/Makefile
index 5b531272b917..ba3c5f4169fa 100644
--- a/audio/xfce4-mixer/Makefile
+++ b/audio/xfce4-mixer/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xfce4-mixer
PORTVERSION= 4.6.0
+PORTREVISION= 1
CATEGORIES= audio xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
DIST_SUBDIR= xfce4
diff --git a/audio/xfce4-mixer/files/patch-r29703 b/audio/xfce4-mixer/files/patch-r29703
new file mode 100644
index 000000000000..2494ba8c4f08
--- /dev/null
+++ b/audio/xfce4-mixer/files/patch-r29703
@@ -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);
+