[Pkg-mono-svn-commits] rev 3078 - in non-group/banshee/trunk/debian: . patches

Sebastian Dröge slomo at alioth.debian.org
Wed Apr 25 14:46:35 UTC 2007


Author: slomo
Date: 2007-04-25 14:46:35 +0000 (Wed, 25 Apr 2007)
New Revision: 3078

Added:
   non-group/banshee/trunk/debian/patches/03_fix_2.18_multimedia_keys.patch
   non-group/banshee/trunk/debian/patches/04_dont_append_commas_on_broken_id3v2.patch
Modified:
   non-group/banshee/trunk/debian/changelog
Log:
* Add patches from the Ubuntu package by Christopher James Halse Rogers:
  + debian/patches/03_fix_2.18_multimedia_keys.patch:
    - Support the new multimedia keys interface with Gnome 2.18. 
  + debian/patches/04_dont_append_commas_on_broken_id3v2:
    - Don't append commas to broken id3v2 tags.

Modified: non-group/banshee/trunk/debian/changelog
===================================================================
--- non-group/banshee/trunk/debian/changelog	2007-04-24 21:28:36 UTC (rev 3077)
+++ non-group/banshee/trunk/debian/changelog	2007-04-25 14:46:35 UTC (rev 3078)
@@ -1,3 +1,13 @@
+banshee (0.12.1+dfsg-3) unstable; urgency=low
+
+  * Add patches from the Ubuntu package by Christopher James Halse Rogers:
+    + debian/patches/03_fix_2.18_multimedia_keys.patch:
+      - Support the new multimedia keys interface with Gnome 2.18. 
+    + debian/patches/04_dont_append_commas_on_broken_id3v2:
+      - Don't append commas to broken id3v2 tags.
+
+ -- Sebastian Dröge <slomo at debian.org>  Wed, 25 Apr 2007 16:42:55 +0200
+
 banshee (0.12.1+dfsg-2) unstable; urgency=low
 
   * Upload to unstable

Added: non-group/banshee/trunk/debian/patches/03_fix_2.18_multimedia_keys.patch
===================================================================
--- non-group/banshee/trunk/debian/patches/03_fix_2.18_multimedia_keys.patch	2007-04-24 21:28:36 UTC (rev 3077)
+++ non-group/banshee/trunk/debian/patches/03_fix_2.18_multimedia_keys.patch	2007-04-25 14:46:35 UTC (rev 3078)
@@ -0,0 +1,216 @@
+diff -Nur banshee-0.12.0+dfsg/src/Plugins/Banshee.Plugins.MMKeys/Makefile.in banshee-0.12.0+dfsg.new/src/Plugins/Banshee.Plugins.MMKeys/Makefile.in
+--- banshee-0.12.0+dfsg/src/Plugins/Banshee.Plugins.MMKeys/Makefile.in	2007-03-06 02:36:33.000000000 +1100
++++ banshee-0.12.0+dfsg.new/src/Plugins/Banshee.Plugins.MMKeys/Makefile.in	2007-03-30 16:57:02.000000000 +1000
+@@ -67,7 +67,7 @@
+ 	$(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ 	$(ACLOCAL_M4)
+-mkinstalldirs = $(install_sh) -d
++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_HEADER = $(top_builddir)/config.h
+ CONFIG_CLEAN_FILES = Banshee.Plugins.MMKeys.dll.config
+ am__installdirs = "$(DESTDIR)$(fsmondir)" "$(DESTDIR)$(schemadir)"
+@@ -626,7 +626,7 @@
+ 
+ 
+ $(ASSEMBLY): $(ASSEMBLY_SOURCES) 
+-	$(BUILD_LIB_BANSHEE_CORE) -out:$@ $(LINK_GTK) $(LINK_MONO_UNIX) $(ASSEMBLY_SOURCES)
++	$(BUILD_LIB_BANSHEE_CORE) -out:$@ $(LINK_DBUS) $(LINK_GTK) $(LINK_MONO_UNIX) $(ASSEMBLY_SOURCES)
+ 
+ $(srcdir)/$(ASSEMBLY_GCONF_SCHEMA): $(ASSEMBLY)
+ 	if test -w $@ -o \( ! -e $@ -a -w $(srcdir) \); then \
+diff -Nur banshee-0.12.0+dfsg/src/Plugins/Banshee.Plugins.MMKeys/MMKeysPlugin.cs banshee-0.12.0+dfsg.new/src/Plugins/Banshee.Plugins.MMKeys/MMKeysPlugin.cs
+--- banshee-0.12.0+dfsg/src/Plugins/Banshee.Plugins.MMKeys/MMKeysPlugin.cs	2007-01-02 05:25:56.000000000 +1100
++++ banshee-0.12.0+dfsg.new/src/Plugins/Banshee.Plugins.MMKeys/MMKeysPlugin.cs	2007-03-30 16:55:44.000000000 +1000
+@@ -2,6 +2,7 @@
+  *  MMKeysPlugin.cs
+  *
+  *  Written by Danilo Reinhardt (danilo.reinhardt at gmx.net)
++ *             Jan Arne Petersen (jap at gnome.org)
+  ****************************************************************************/
+ 
+ /*  THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW: 
+@@ -31,90 +32,112 @@
+ using Gdk;
+ using Mono.Unix;
+ 
++using NDesk.DBus;
++
+ using Banshee.Base;
+ using Banshee.Configuration;
+ 
+ public static class PluginModuleEntry
+ {
+-    public static Type [] GetTypes()
+-    {
+-        return new Type [] {
+-            typeof(Banshee.Plugins.MMKeys.MMKeysPlugin)
+-        };
+-    }
++	public static Type [] GetTypes()
++	{
++		return new Type [] {
++			typeof(Banshee.Plugins.MMKeys.MMKeysPlugin)
++		};
++	}
+ }
+ 
+ namespace Banshee.Plugins.MMKeys
+ {
++	public delegate void MediaPlayerKeyPressedHandler(string application, string key);
++
++	[Interface ("org.gnome.SettingsDaemon")]
++	public interface ISettingsDaemon
++	{
++		void GrabMediaPlayerKeys(string application, uint time);
++		void ReleaseMediaPlayerKeys(string application);
++		event MediaPlayerKeyPressedHandler MediaPlayerKeyPressed;
++	}
++
+ 	public class MMKeysPlugin : Banshee.Plugins.Plugin
+ 	{
+-	   protected override string ConfigurationName { get { return "mmkeys"; } }
+-        public override string DisplayName { get { return Catalog.GetString("Multimedia Keys"); } }
+-	
++		private const string BusName = "org.gnome.SettingsDaemon";
++		private const string ObjectPath = "/org/gnome/SettingsDaemon";
++
++		protected override string ConfigurationName { get { return "mmkeys"; } }
++		public override string DisplayName { get { return Catalog.GetString("Multimedia Keys"); } }
++
+ 		public override string Description {
+-            get {
+-                return Catalog.GetString(
+-                    "Adds support for multimedia keys configured through GNOME."
+-                );
+-            }
+-        }
+-
+-        public override string [] Authors {
+-            get {
+-                return new string [] {
+-                    "Danilo Reinhardt"
+-                };
+-            }
+-        }
++			get {
++				return Catalog.GetString("Adds support for multimedia keys configured through GNOME.");
++			}
++		}
++
++		public override string [] Authors {
++			get {
++				return new string [] {
++					"Danilo Reinhardt",
++					"Jan Arne Petersen"
++				};
++			}
++		}
++
++		private ISettingsDaemon settings_daemon;
+ 
+-        private SpecialKeys special_keys;
+-		
+ 		protected override void PluginInitialize()
+-        {
+-            special_keys = new SpecialKeys();
+-            special_keys.Delay = new TimeSpan(500 * TimeSpan.TicksPerMillisecond);
+-
+-            special_keys.RegisterHandler(OnSpecialKeysPressed, 
+-                SpecialKey.AudioPlay,
+-                SpecialKey.AudioPrev,
+-                SpecialKey.AudioNext
+-            );
+-        }
+-        
+-        private void OnSpecialKeysPressed(object o, SpecialKey key)
+-        {
+-           switch(key) {
+-                case SpecialKey.AudioPlay:
+-                    Globals.ActionManager["PlayPauseAction"].Activate();
+-                    break;
+-                case SpecialKey.AudioNext:
+-                    Globals.ActionManager["NextAction"].Activate();
+-                    break;
+-                case SpecialKey.AudioPrev:
+-                    Globals.ActionManager["PreviousAction"].Activate();
+-                    break;
+-            }
+-        }
+-        
+-        protected override void PluginDispose()
+-        {
+-            special_keys.UnregisterHandler(OnSpecialKeysPressed, 
+-                SpecialKey.AudioPlay, 
+-                SpecialKey.AudioPrev,
+-                SpecialKey.AudioNext);
+-            special_keys.Dispose();
+-        }
+-        
+-        public override Gtk.Widget GetConfigurationWidget()
+-        {
+-            return new MMKeysConfigPage();
+-        }
+-        
+-        public static readonly SchemaEntry<bool> EnabledSchema = new SchemaEntry<bool>(
+-            "plugins.mmkeys", "enabled",
+-            false,
+-            "Plugin enabled",
+-            "Multimedia Keys plugin enabled"
+-        );
++		{
++			settings_daemon = Bus.Session.GetObject<ISettingsDaemon>(BusName, new ObjectPath(ObjectPath));;
++
++			settings_daemon.GrabMediaPlayerKeys("Banshee", 0);
++			settings_daemon.MediaPlayerKeyPressed += OnMediaPlayerKeyPressed;
++		}
++
++		protected override void InterfaceInitialize()
++		{
++			InterfaceElements.MainWindow.FocusInEvent += OnFocusInEvent; 
++		}
++
++		private void OnMediaPlayerKeyPressed(string application, string key)
++		{
++			if (application != "Banshee") {
++				return;
++			}
++			switch(key) {
++				case "Play":
++					Globals.ActionManager["PlayPauseAction"].Activate();
++				break;
++				case "Next":
++					Globals.ActionManager["NextAction"].Activate();
++				break;
++				case "Previous":
++					Globals.ActionManager["PreviousAction"].Activate();
++				break;
++			}
++		}
++
++		private void OnFocusInEvent(object o, FocusInEventArgs args)
++		{
++			settings_daemon.GrabMediaPlayerKeys("Banshee", 0);
++		}
++
++
++		protected override void PluginDispose()
++		{
++			InterfaceElements.MainWindow.FocusInEvent -= OnFocusInEvent; 
++			settings_daemon.MediaPlayerKeyPressed -= OnMediaPlayerKeyPressed;
++			settings_daemon.ReleaseMediaPlayerKeys("Banshee");
++		}
++
++		public override Gtk.Widget GetConfigurationWidget()
++		{
++			return new MMKeysConfigPage();
++		}
++
++		public static readonly SchemaEntry<bool> EnabledSchema = new SchemaEntry<bool>(
++				"plugins.mmkeys", "enabled",
++				false,
++				"Plugin enabled",
++				"Multimedia Keys plugin enabled"
++				);
+ 	}
+ }

Added: non-group/banshee/trunk/debian/patches/04_dont_append_commas_on_broken_id3v2.patch
===================================================================
--- non-group/banshee/trunk/debian/patches/04_dont_append_commas_on_broken_id3v2.patch	2007-04-24 21:28:36 UTC (rev 3077)
+++ non-group/banshee/trunk/debian/patches/04_dont_append_commas_on_broken_id3v2.patch	2007-04-25 14:46:35 UTC (rev 3078)
@@ -0,0 +1,15 @@
+diff -Nur banshee-0.12.0+dfsg/ext/taglib-sharp/TagLib/Id3v2/Frames/TextIdentificationFrame.cs banshee-0.12.0+dfsg.new/ext/taglib-sharp/TagLib/Id3v2/Frames/TextIdentificationFrame.cs
+--- banshee-0.12.0+dfsg/ext/taglib-sharp/TagLib/Id3v2/Frames/TextIdentificationFrame.cs	2007-02-19 18:31:08.000000000 +1100
++++ banshee-0.12.0+dfsg.new/ext/taglib-sharp/TagLib/Id3v2/Frames/TextIdentificationFrame.cs	2007-04-03 15:59:52.000000000 +1000
+@@ -117,6 +117,11 @@
+          field_list = new StringList ();
+          text_encoding = StringType.UTF8;
+          ParseFields (FieldData (data, offset));
++
++         // Remove the last string if it's empty. (Workaround for defective
++         // nul terminated tags.)
++         if (field_list.Count != 0 && field_list [field_list.Count - 1] == "")
++            field_list.RemoveAt (field_list.Count - 1);
+       }
+    }
+ 




More information about the Pkg-mono-svn-commits mailing list