Re: [Rhythmbox-devel] Create playlist from library selection
- From: Ed Mack <lists edmack com>
- To: Charles Goodwin <charlie vexi org>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] Create playlist from library selection
- Date: Thu, 28 Jul 2005 22:18:53 +0100
> How about "New Auto-Playlist from Selected Categories". A bit verbose
> but essentially what it is. Just use the word 'categories' and it
> already makes it more obvious.
"New Automatic Playlist from Selected Categories" fits the pattern
perfectly. I've updated the patch.
> Yes, you should. However this is useful enough a feature that it should
> go in straight away. Firstly it will act as an impetus to sort the out
> the auto-playlist UI and secondly it's not too much of an inconvenience
> even if you can't edit it. It only takes a few seconds to re-select the
> categories and create a similar auto-playlist. It's not a critical and
> crippling inability, and quite an unlikely one for people to run into.
Getting the crasher bug removed is important though - I'm not fully
aware of what to edit for that.
> Why not go the GtkFileChooser route - i.e. have a simple dialog with
> perhaps a UI for a single filter, with an 'advanced' option to expand
> the dialog into a more complex UI.
Here-here :)
Ed.
Index: shell/rb-playlist-manager.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-playlist-manager.c,v
retrieving revision 1.48
diff -u -r1.48 rb-playlist-manager.c
--- shell/rb-playlist-manager.c 19 Jun 2005 16:38:12 -0000 1.48
+++ shell/rb-playlist-manager.c 27 Jul 2005 19:34:34 -0000
@@ -68,6 +68,8 @@
RBPlaylistManager *mgr);
static void rb_playlist_manager_cmd_new_playlist (GtkAction *action,
RBPlaylistManager *mgr);
+static void rb_playlist_manager_cmd_new_reflection_playlist (GtkAction *action,
+ RBPlaylistManager *mgr);
static void rb_playlist_manager_cmd_new_automatic_playlist (GtkAction *action,
RBPlaylistManager *mgr);
static void rb_playlist_manager_cmd_rename_playlist (GtkAction *action,
@@ -143,6 +145,9 @@
{ "MusicPlaylistNewPlaylist", GTK_STOCK_NEW, N_("_New Playlist..."), "<control>N",
N_("Create a new playlist"),
G_CALLBACK (rb_playlist_manager_cmd_new_playlist) },
+ { "MusicPlaylistNewReflectionPlaylist", GTK_STOCK_NEW, N_("New Automatic Playlist from _Selected Categories"), NULL,
+ N_("Create a new automatic playlist from the selected categories"),
+ G_CALLBACK (rb_playlist_manager_cmd_new_reflection_playlist) },
{ "MusicPlaylistNewAutomaticPlaylist", RB_STOCK_AUTOMATIC_PLAYLIST, N_("New _Automatic Playlist..."), NULL,
N_("Create a new automatically updating playlist"),
G_CALLBACK (rb_playlist_manager_cmd_new_automatic_playlist) },
@@ -735,6 +740,24 @@
}
static void
+rb_playlist_manager_cmd_new_reflection_playlist (GtkAction *action,
+ RBPlaylistManager *mgr)
+{
+ RBLibrarySource *source;
+ RBSource *playlist;
+
+ source = mgr->priv->libsource;
+
+ playlist = rb_playlist_manager_new_playlist (mgr, NULL, TRUE);
+
+ rb_playlist_source_set_query (RB_PLAYLIST_SOURCE (playlist),
+ rb_library_get_query (source),
+ 0, 0);
+
+ rb_playlist_manager_set_dirty (mgr);
+}
+
+static void
rb_playlist_manager_cmd_new_automatic_playlist (GtkAction *action,
RBPlaylistManager *mgr)
{
Index: sources/rb-library-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-library-source.c,v
retrieving revision 1.108
diff -u -r1.108 rb-library-source.c
--- sources/rb-library-source.c 23 Jul 2005 12:41:07 -0000 1.108
+++ sources/rb-library-source.c 27 Jul 2005 19:34:37 -0000
@@ -1458,6 +1458,11 @@
return query;
}
+GPtrArray * rb_library_get_query (RBLibrarySource *source)
+{
+ return construct_query_from_selection (source);
+}
+
static void
rb_library_source_do_query (RBLibrarySource *source, RBLibraryQueryType qtype)
{
Index: sources/rb-library-source.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-library-source.h,v
retrieving revision 1.12
diff -u -r1.12 rb-library-source.h
--- sources/rb-library-source.h 10 Sep 2004 05:12:59 -0000 1.12
+++ sources/rb-library-source.h 27 Jul 2005 19:34:37 -0000
@@ -64,6 +64,8 @@
void rb_library_source_class_add_actions (RBShell *shell,
GtkActionGroup *uimgr);
+GPtrArray * rb_library_get_query (RBLibrarySource *source);
+
G_END_DECLS
#endif /* __RB_LIBRARY_SOURCE_H */
Index: data/ui/rhythmbox-ui.xml
===================================================================
RCS file: /cvs/gnome/rhythmbox/data/ui/rhythmbox-ui.xml,v
retrieving revision 1.20
diff -u -r1.20 rhythmbox-ui.xml
--- data/ui/rhythmbox-ui.xml 26 Jul 2005 14:07:28 -0000 1.20
+++ data/ui/rhythmbox-ui.xml 27 Jul 2005 19:34:38 -0000
@@ -7,6 +7,7 @@
<separator/>
<menu name="PlaylistMenu" action="Playlist">
<menuitem name="MusicPlaylistNewPlaylistMenu" action="MusicPlaylistNewPlaylist"/>
+ <menuitem name="MusicPlaylistNewReflectionPlaylistMenu" action="MusicPlaylistNewReflectionPlaylist"/>
<menuitem name="MusicPlaylistNewAutomaticPlaylistMenu" action="MusicPlaylistNewAutomaticPlaylist"/>
<menuitem name="MusicPlaylistLoadPlaylistMenu" action="MusicPlaylistLoadPlaylist"/>
<menuitem name="MusicPlaylistSavePlaylistMenu" action="MusicPlaylistSavePlaylist"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]