banshee r3518 - in branches/banshee/stable: . data/audio-profiles src/Core/Banshee.Base src/Core/Banshee.Base/Banshee.AudioProfiles src/Core/Banshee.Base/Banshee.AudioProfiles.Gui
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3518 - in branches/banshee/stable: . data/audio-profiles src/Core/Banshee.Base src/Core/Banshee.Base/Banshee.AudioProfiles src/Core/Banshee.Base/Banshee.AudioProfiles.Gui
- Date: Sat, 22 Mar 2008 04:27:19 +0000 (GMT)
Author: abock
Date: Sat Mar 22 04:27:19 2008
New Revision: 3518
URL: http://svn.gnome.org/viewvc/banshee?rev=3518&view=rev
Log:
2008-03-22 Aaron Bockover <abock gnome org>
Fixes BNC #361828 (could not burn audio CD)
* src/Core/Banshee.Base/Banshee.AudioProfiles/Profile.cs: Support a
visible property to allow hiding profiles from the user (the WAV profile
can only be used when transcoding to audio CD)
* src/Core/Banshee.Base/Banshee.AudioProfiles.Gui/ProfileComboBox.cs: Do
not add profiles that are not visible to the combo box
* src/Core/Banshee.Base/GstTranscoder.cs: Avoid a potential crash if the
URI is null when canceling
* data/audio-profiles/wav.xml.in: Make this profile invisible since it
can only be used for transcoding to an audio CD
* data/audio-profiles/Makefile.am: Enable the install of this profile again
since it is needed to burn audio CDs
Modified:
branches/banshee/stable/ChangeLog
branches/banshee/stable/data/audio-profiles/Makefile.am
branches/banshee/stable/data/audio-profiles/wav.xml.in
branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles.Gui/ProfileComboBox.cs
branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles/Profile.cs
branches/banshee/stable/src/Core/Banshee.Base/GstTranscoder.cs
Modified: branches/banshee/stable/data/audio-profiles/Makefile.am
==============================================================================
--- branches/banshee/stable/data/audio-profiles/Makefile.am (original)
+++ branches/banshee/stable/data/audio-profiles/Makefile.am Sat Mar 22 04:27:19 2008
@@ -6,7 +6,8 @@
mp3-xing.xml.in \
vorbis.xml.in \
wavpack.xml.in \
- wma.xml.in
+ wma.xml.in \
+ wav.xml.in
audioprofiles_DATA = $(audioprofiles_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
Modified: branches/banshee/stable/data/audio-profiles/wav.xml.in
==============================================================================
--- branches/banshee/stable/data/audio-profiles/wav.xml.in (original)
+++ branches/banshee/stable/data/audio-profiles/wav.xml.in Sat Mar 22 04:27:19 2008
@@ -7,6 +7,7 @@
<output-file-extension>wav</output-file-extension>
<mimetype>audio/x-wav</mimetype>
<mimetype>audio/wav</mimetype>
+ <visible>false</visible>
<pipeline>
<process id="gstreamer">
<![CDATA[
Modified: branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles.Gui/ProfileComboBox.cs
==============================================================================
--- branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles.Gui/ProfileComboBox.cs (original)
+++ branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles.Gui/ProfileComboBox.cs Sat Mar 22 04:27:19 2008
@@ -96,11 +96,15 @@
if(mimetype_profiles.Count > 0) {
foreach(Profile profile in mimetype_profiles) {
- store.AppendValues(String.Format("{0}", profile.Name), profile);
+ if (profile.Visible) {
+ store.AppendValues(String.Format("{0}", profile.Name), profile);
+ }
}
} else {
foreach(Profile profile in manager.GetAvailableProfiles()) {
- store.AppendValues(String.Format("{0}", profile.Name), profile);
+ if (profile.Visible) {
+ store.AppendValues(String.Format("{0}", profile.Name), profile);
+ }
}
}
Modified: branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles/Profile.cs
==============================================================================
--- branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles/Profile.cs (original)
+++ branches/banshee/stable/src/Core/Banshee.Base/Banshee.AudioProfiles/Profile.cs Sat Mar 22 04:27:19 2008
@@ -40,6 +40,7 @@
private string id;
private string name;
private string description;
+ private bool visible = true;
private string output_file_extension;
private bool? available = null;
private Pipeline pipeline;
@@ -52,6 +53,11 @@
description = Banshee.Base.Localization.SelectSingleNode(node, "description").InnerText.Trim();
output_file_extension = node.SelectSingleNode("output-file-extension").InnerText.Trim();
+ XmlNode vnode = node.SelectSingleNode ("visible");
+ if (vnode != null && !String.IsNullOrEmpty (vnode.InnerText)) {
+ visible = vnode.InnerText.ToLower () == "true";
+ }
+
foreach(XmlNode mimetype_node in node.SelectNodes("mimetype")) {
mimetypes.Add(mimetype_node.InnerText.Trim());
}
@@ -115,6 +121,10 @@
set { output_file_extension = value; }
}
+ public bool Visible {
+ get { return visible; }
+ }
+
public Pipeline Pipeline {
get { return pipeline; }
set { pipeline = value; }
Modified: branches/banshee/stable/src/Core/Banshee.Base/GstTranscoder.cs
==============================================================================
--- branches/banshee/stable/src/Core/Banshee.Base/GstTranscoder.cs (original)
+++ branches/banshee/stable/src/Core/Banshee.Base/GstTranscoder.cs Sat Mar 22 04:27:19 2008
@@ -119,7 +119,9 @@
public override void Cancel()
{
- Banshee.IO.IOProxy.File.Delete(managed_output_uri);
+ if (managed_output_uri != null) {
+ Banshee.IO.IOProxy.File.Delete(managed_output_uri);
+ }
gst_transcoder_cancel(handle);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]