[Banshee-List] patch for adding files to library over DBUS



Hello,

I made a little patch for adding files to the library over DBUS.

Greetz,
Thijs


? prepare-ChangeLog.pl
? burn-sharp/.deps
? burn-sharp/.libs
? burn-sharp/glue.lo
? burn-sharp/libnautilusburnglue.la
? libbanshee/.deps
? libbanshee/.libs
? libbanshee/gst-cd-rip-0.8.lo
? libbanshee/gst-misc-0.8.lo
? libbanshee/gst-playback-0.8.lo
? libbanshee/gst-transcode-0.8.lo
? libbanshee/hal-context.lo
? libbanshee/inotify-glue.lo
? libbanshee/libbanshee.la
? libbanshee/xing/.deps
? po/.intltool-merge-cache
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/banshee/ChangeLog,v
retrieving revision 1.280
diff -u -r1.280 ChangeLog
--- ChangeLog	25 Dec 2005 19:19:44 -0000	1.280
+++ ChangeLog	27 Dec 2005 22:31:35 -0000
@@ -1,3 +1,11 @@
+2005-12-27  Thijs Vermeir  <thijsvermeir telenet be>
+
+	* src/DBusIPC.cs: added support for adding files over Dbus
+	* src/Main.cs: added command line support for searching / Volume
+	control
+	* src/PlayerInterface.cs: changed a little to prepare for adding DBUS
+	support for adding files
+
 2005-12-25  Aaron Bockover  <aaron aaronbock net>
 
 	* banshee.mdp: Updated MonoDevelop project
Index: src/DBusIPC.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/DBusIPC.cs,v
retrieving revision 1.15
diff -u -r1.15 DBusIPC.cs
--- src/DBusIPC.cs	22 Dec 2005 02:25:53 -0000	1.15
+++ src/DBusIPC.cs	27 Dec 2005 22:32:02 -0000
@@ -155,6 +155,13 @@
                 PlayerUI.Next();
             }
         }
+
+	[Method]
+	public virtual void ImportFiles(String[] Uris){
+	    if(PlayerUI != null) {
+		PlayerUI.ImportFiles(Uris);
+	    }
+	}
         
         [Method]
         public virtual void Previous()
Index: src/Main.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Main.cs,v
retrieving revision 1.23
diff -u -r1.23 Main.cs
--- src/Main.cs	22 Dec 2005 00:42:56 -0000	1.23
+++ src/Main.cs	27 Dec 2005 22:32:11 -0000
@@ -67,6 +67,10 @@
                 new ArgumentLayout("toggle-playing", "Toggle playing of current song"),
                 new ArgumentLayout("play",           "Play current song"),
                 new ArgumentLayout("pause",          "Pause current song"),
+		new ArgumentLayout("inc-volume","Increase volume"),
+		new ArgumentLayout("dec-volume","Decrease volume"),
+                new ArgumentLayout("skip-forward","Skip forward"),
+		new ArgumentLayout("skip-backward","Skip backward"),
                 new ArgumentLayout("query-artist",   "Get artist name for current playing song"),
                 new ArgumentLayout("query-album",    "Get album name for current playing song"),
                 new ArgumentLayout("query-title",    "Get track title for current playing song"),
@@ -153,6 +157,26 @@
                     dbusCore.Previous();
                     present = false;
                     break;
+		case "inc-volume":
+		    dbusCore.IncreaseVolume();
+		    Core.ArgumentQueue.Dequeue(arg);
+		    present = false;
+		    break;
+		case "dec-volume":
+		    dbusCore.DecreaseVolume();
+		    Core.ArgumentQueue.Dequeue(arg);
+		    present = false;
+		    break;
+		case "skip-forward":
+		    dbusCore.SkipForward();
+		    Core.ArgumentQueue.Dequeue(arg);
+		    present = false;
+		    break;
+		case "skip-backward":
+		    dbusCore.SkipBackward();
+		    Core.ArgumentQueue.Dequeue(arg);
+		    present = false;
+		    break;
                 case "query-artist":
                     PrintQueryResult("Artist", dbusCore.GetPlayingArtist());
                     present = false;
Index: src/PlayerInterface.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlayerInterface.cs,v
retrieving revision 1.124
diff -u -r1.124 PlayerInterface.cs
--- src/PlayerInterface.cs	25 Dec 2005 19:19:45 -0000	1.124
+++ src/PlayerInterface.cs	27 Dec 2005 22:33:07 -0000
@@ -1074,6 +1074,12 @@
         
         // ---- Playlist Event Handlers ----
 
+
+	public void ImportFiles(String[] Uris)
+	{
+	    ImportManager.Instance.QueueSource(Uris);
+	}
+
         private void ImportWithFileSelector()
         {
             FileChooserDialog chooser = new FileChooserDialog(
@@ -2214,7 +2220,7 @@
         
         private void OnImportFilesAction(object o, EventArgs args)
         {
-            FileChooserDialog chooser = new FileChooserDialog(
+	    FileChooserDialog chooser = new FileChooserDialog(
                 Catalog.GetString("Import Files to Library"),
                 null,
                 FileChooserAction.Open
@@ -2233,7 +2239,7 @@
             chooser.DefaultResponse = ResponseType.Ok;
             
             if(chooser.Run() == (int)ResponseType.Ok) {
-                ImportManager.Instance.QueueSource(chooser.Uris);
+		ImportFiles(chooser.Uris);
             }
             
             Core.GconfClient.Set(GConfKeys.LastFileSelectorUri, chooser.CurrentFolderUri);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]