[evolution/webkit: 137/182] Fix the Audio Plugin
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 137/182] Fix the Audio Plugin
- Date: Tue, 6 Mar 2012 16:20:14 +0000 (UTC)
commit 87d3f7d7aa71cdfcb4db25ca0443d04e03050e78
Author: Dan VrÃtil <dvratil redhat com>
Date: Wed Feb 8 12:31:41 2012 +0100
Fix the Audio Plugin
- Fix a crash when clicking 'Play' while the backend already exists
- Fix part's URI to follow the hierarchical standard
plugins/audio-inline/audio-inline.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index 7250277..dc5fce3 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -227,6 +227,8 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button,
}
g_free (filename);
+ } else {
+ playbin = em_part_audio_get_playbin (empa);
}
gst_element_get_state (playbin, &cur_state, NULL, 0);
@@ -285,7 +287,10 @@ org_gnome_audio_inline_button_panel (EMFormat *emf,
G_CALLBACK (org_gnome_audio_inline_stop_clicked),
empa, FALSE));
- gtk_widget_show (box);
+ g_signal_connect (box, "unrealize",
+ G_CALLBACK (org_gnome_audio_inline_stop_clicked), empa);
+
+ gtk_widget_show_all (box);
return box;
}
@@ -298,15 +303,18 @@ org_gnome_audio_inline_format (gpointer ep,
gchar *classid;
classid = g_strdup_printf (
- "org-gnome-audio-inline-button-panel-%d",
+ "%s.org-gnome-audio-inline-button-panel-%d",
+ t->part_id->str,
org_gnome_audio_class_id_counter);
org_gnome_audio_class_id_counter++;
d(printf ("audio inline formatter: format classid %s\n", classid));
- emp = em_part_audio_new (t->format, t->part, t->part_id, NULL);
- em_part_set_widget_func (emp, org_gnome_audio_inline_button_panel);
+ emp = em_part_audio_new (t->format, t->part, classid, NULL);
+ em_part_set_widget_func (emp, (EMPartWidgetFunc) org_gnome_audio_inline_button_panel);
em_format_add_part_object (t->format, emp);
+
+ g_free (classid);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]