[Rhythmbox-devel] Drop artist, album, genre to create playlist



Hi,

This patch should enable the ability to drag and drop artist, album, genre to the source list to create new playlists.

Does this look ok?

Jon
* looking for rhythmbox-devel gnome org--2004/rhythmbox--main--0.9--patch-149 to compare with
* comparing to rhythmbox-devel gnome org--2004/rhythmbox--main--0.9--patch-149
A  {arch}/rhythmbox/rhythmbox--main/rhythmbox--main--0.9/mccann jhu edu--2004/patch-log/patch-9
M  sources/rb-sourcelist-model.c

* modified files

--- orig/sources/rb-sourcelist-model.c
+++ mod/sources/rb-sourcelist-model.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  *  arch-tag: Implementation of GtkTreeModel iface containing RBSource objects
  *
@@ -358,7 +359,16 @@
 		*pos = GTK_TREE_VIEW_DROP_INTO_OR_BEFORE;
 		return TRUE;
 	}
-	
+
+	if ((g_list_find (targets, gdk_atom_intern ("text/x-rhythmbox-artist", TRUE))
+	     || g_list_find (targets, gdk_atom_intern ("text/x-rhythmbox-album", TRUE))
+	     || g_list_find (targets, gdk_atom_intern ("text/x-rhythmbox-genre", TRUE)))
+	    && !g_list_find (targets, gdk_atom_intern ("application/x-rhythmbox-source", TRUE))) {
+		rb_debug ("genre, album, or artist type");
+		*pos = GTK_TREE_VIEW_DROP_AFTER;
+		return TRUE;
+	}
+
 	if (!g_list_find (targets, gdk_atom_intern ("application/x-rhythmbox-source", TRUE))) {
 		rb_debug ("unsupported type");
 		return FALSE;



* added files

--- /dev/null
+++ /home/mccannwj/cvs/foo/rhythmbox--main--0.9--patch-149/,,what-changed rhythmbox--main--0 9--patch-149--rhythmbox-devel gnome org--2004/new-files-archive/./{arch}/rhythmbox/rhythmbox--main/rhythmbox--main--0.9/mccann jhu edu--2004/patch-log/patch-9
@@ -0,0 +1,12 @@
+Revision: rhythmbox--main--0.9--patch-9
+Archive: mccann jhu edu--2004
+Creator: William Jon McCann <mccann jhu edu>
+Date: Sat Nov 20 18:44:41 EST 2004
+Standard-date: 2004-11-20 23:44:41 GMT
+Modified-files: sources/rb-sourcelist-model.c
+New-patches: mccann jhu edu--2004/rhythmbox--main--0.9--patch-9
+Summary: Enable drop of genre, artist, album into sourcelist.
+Keywords: 
+
+
+



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