gnome-media r4037 - in trunk/gnome-volume-control: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4037 - in trunk/gnome-volume-control: . src
- Date: Thu, 6 Nov 2008 10:24:47 +0000 (UTC)
Author: mccann
Date: Thu Nov 6 10:24:47 2008
New Revision: 4037
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4037&view=rev
Log:
2008-11-06 William Jon McCann <jmccann redhat com>
* src/gvc-mixer-control.c (remove_stream), (update_sink_input),
(update_event_role_stream):
* src/gvc-mixer-dialog.c (on_control_stream_added),
(on_control_stream_removed):
Fix adding and remove streams.
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 Thu Nov 6 10:24:47 2008
@@ -254,7 +254,7 @@
g_hash_table_remove (control->priv->all_streams,
GUINT_TO_POINTER (gvc_mixer_stream_get_id (stream)));
g_signal_emit (G_OBJECT (control),
- signals[STREAM_ADDED],
+ signals[STREAM_REMOVED],
0,
gvc_mixer_stream_get_id (stream));
g_object_unref (stream);
@@ -472,10 +472,6 @@
GUINT_TO_POINTER (info->index),
g_object_ref (stream));
add_stream (control, stream);
- g_signal_emit (G_OBJECT (control),
- signals[STREAM_ADDED],
- 0,
- gvc_mixer_stream_get_id (stream));
}
}
@@ -688,10 +684,6 @@
if (is_new) {
add_stream (control, stream);
- g_signal_emit (G_OBJECT (control),
- signals[STREAM_ADDED],
- 0,
- gvc_mixer_stream_get_id (stream));
}
}
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 Thu Nov 6 10:24:47 2008
@@ -317,7 +317,21 @@
guint id,
GvcMixerDialog *dialog)
{
+ 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);
+ return;
+ }
+
+ stream = gvc_mixer_control_lookup_stream_id (control, id);
+ if (stream != NULL) {
+ add_stream (dialog, stream);
+ }
}
static void
@@ -325,7 +339,16 @@
guint id,
GvcMixerDialog *dialog)
{
+ GtkWidget *bar;
+
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));
+ gtk_container_remove (GTK_CONTAINER (bar->parent),
+ bar);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]