gnome-media r4051 - in trunk/gnome-volume-control: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4051 - in trunk/gnome-volume-control: . src
- Date: Tue, 11 Nov 2008 22:14:05 +0000 (UTC)
Author: mccann
Date: Tue Nov 11 22:14:05 2008
New Revision: 4051
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4051&view=rev
Log:
2008-11-11 William Jon McCann <jmccann redhat com>
* src/gvc-mixer-control.c (update_sink_input),
(update_source_output), (update_event_role_stream),
(remove_client), (remove_sink), (remove_source),
(remove_sink_input), (remove_source_output):
* src/gvc-mixer-dialog.c (on_bar_is_muted_notify), (create_bar),
(bar_set_stream), (add_stream), (on_control_stream_added),
(on_control_stream_removed):
Set the associated stream on the bar so mute works.
Hush some debugging.
Modified:
trunk/gnome-volume-control/ChangeLog
trunk/gnome-volume-control/src/gvc-mixer-control.c
trunk/gnome-volume-control/src/gvc-mixer-dialog.c
Modified: trunk/gnome-volume-control/src/gvc-mixer-control.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-mixer-control.c (original)
+++ trunk/gnome-volume-control/src/gvc-mixer-control.c Tue Nov 11 22:14:05 2008
@@ -469,9 +469,11 @@
gboolean is_default;
pa_volume_t avg_volume;
+#if 0
g_debug ("Updating sink input: index=%u name='%s'",
info->index,
info->name);
+#endif
is_new = FALSE;
is_default = FALSE;
@@ -506,9 +508,11 @@
update_source_output (GvcMixerControl *control,
const pa_source_output_info *info)
{
+#if 0
g_debug ("Updating source output: index=%u name='%s'",
info->index,
info->name);
+#endif
}
static void
@@ -682,9 +686,11 @@
return;
}
+#if 0
g_debug ("Updating event role: name='%s' device='%s'",
info->name,
info->device);
+#endif
is_new = FALSE;
@@ -704,7 +710,6 @@
avg_volume = pa_cvolume_avg (&info->volume);
gvc_mixer_stream_set_name (stream, _("System Sounds"));
- //gvc_mixer_stream_set_name (stream, info->name);
gvc_mixer_stream_set_icon_name (stream, "multimedia-volume-control");
gvc_mixer_stream_set_volume (stream, (guint)avg_volume);
gvc_mixer_stream_set_is_muted (stream, info->mute);
@@ -895,7 +900,6 @@
remove_client (GvcMixerControl *control,
guint index)
{
- g_debug ("Removing client: index=%u", index);
/* FIXME: */
}
@@ -905,7 +909,9 @@
{
GvcMixerStream *stream;
+#if 0
g_debug ("Removing sink: index=%u", index);
+#endif
stream = g_hash_table_lookup (control->priv->sinks,
GUINT_TO_POINTER (index));
@@ -924,7 +930,9 @@
{
GvcMixerStream *stream;
+#if 0
g_debug ("Removing source: index=%u", index);
+#endif
stream = g_hash_table_lookup (control->priv->sources,
GUINT_TO_POINTER (index));
@@ -943,8 +951,9 @@
{
GvcMixerStream *stream;
+#if 0
g_debug ("Removing sink input: index=%u", index);
-
+#endif
stream = g_hash_table_lookup (control->priv->sink_inputs,
GUINT_TO_POINTER (index));
if (stream == NULL) {
@@ -962,7 +971,9 @@
{
GvcMixerStream *stream;
+#if 0
g_debug ("Removing source output: index=%u", index);
+#endif
stream = g_hash_table_lookup (control->priv->source_outputs,
GUINT_TO_POINTER (index));
Modified: trunk/gnome-volume-control/src/gvc-mixer-dialog.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-mixer-dialog.c (original)
+++ trunk/gnome-volume-control/src/gvc-mixer-dialog.c Tue Nov 11 22:14:05 2008
@@ -171,10 +171,13 @@
gboolean is_muted;
GvcMixerStream *stream;
- stream = g_object_get_data (object, "gvc-mixer-dialog-stream");
is_muted = gvc_channel_bar_get_is_muted (GVC_CHANNEL_BAR (object));
+
+ stream = g_object_get_data (object, "gvc-mixer-dialog-stream");
if (stream != NULL) {
gvc_mixer_stream_change_is_muted (stream, is_muted);
+ } else {
+ g_warning ("Unable to find stream for bar");
}
}
@@ -259,6 +262,10 @@
GTK_ORIENTATION_HORIZONTAL);
gvc_channel_bar_set_show_mute (GVC_CHANNEL_BAR (bar),
TRUE);
+ g_signal_connect (bar,
+ "notify::is-muted",
+ G_CALLBACK (on_bar_is_muted_notify),
+ dialog);
return bar;
}
@@ -284,16 +291,12 @@
gtk_adjustment_set_value (adj,
gvc_mixer_stream_get_volume (stream));
+ g_object_set_data (G_OBJECT (bar), "gvc-mixer-dialog-stream", stream);
g_object_set_data (G_OBJECT (adj), "gvc-mixer-dialog-stream", stream);
g_signal_connect (adj,
"value-changed",
G_CALLBACK (on_adjustment_value_changed),
dialog);
-
- g_signal_connect (bar,
- "notify::is-muted",
- G_CALLBACK (on_bar_is_muted_notify),
- dialog);
gtk_widget_show (bar);
}
@@ -324,7 +327,6 @@
gvc_mixer_stream_get_name (stream));
gvc_channel_bar_set_icon_name (GVC_CHANNEL_BAR (bar),
gvc_mixer_stream_get_icon_name (stream));
- g_object_set_data (G_OBJECT (bar), "gvc-mixer-dialog-stream", stream);
gtk_box_pack_start (GTK_BOX (dialog->priv->applications_box), bar, FALSE, FALSE, 12);
}
@@ -374,8 +376,6 @@
GvcMixerStream *stream;
GtkWidget *bar;
- g_debug ("GvcMixerDialog: Stream %u added", id);
-
bar = g_hash_table_lookup (dialog->priv->bars, GUINT_TO_POINTER (id));
if (bar != NULL) {
g_debug ("GvcMixerDialog: Stream %u already added", id);
@@ -425,8 +425,6 @@
GtkTreeIter iter;
GtkTreeModel *model;
- g_debug ("GvcMixerDialog: Stream %u removed", id);
-
bar = g_hash_table_lookup (dialog->priv->bars, GUINT_TO_POINTER (id));
if (bar != NULL) {
g_hash_table_remove (dialog->priv->bars, GUINT_TO_POINTER (id));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]