rhythmbox r5665 - in trunk: . plugins/generic-player plugins/iradio shell sources
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5665 - in trunk: . plugins/generic-player plugins/iradio shell sources
- Date: Thu, 3 Apr 2008 11:22:28 +0100 (BST)
Author: hadess
Date: Thu Apr 3 11:22:27 2008
New Revision: 5665
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5665&view=rev
Log:
2008-04-03 Bastien Nocera <hadess hadess net>
* plugins/generic-player/rb-generic-player-playlist-source.c
(load_playlist):
* plugins/iradio/rb-iradio-source.c (handle_playlist_entry_cb),
(rb_iradio_source_add_from_playlist):
* shell/rb-playlist-manager.c (handle_playlist_entry_cb),
(rb_playlist_manager_parse_file):
* shell/rb-shell-player.c (open_location_thread):
* shell/rb-shell.c (rb_shell_load_uri):
* sources/rb-playlist-source.c (playlist_iter_func):
Remove support for older versions of totem-pl-parser than what we
require in configure.in, ignore inode/directory as well as
x-directory/normal as the former is used by gvfs
Modified:
trunk/ChangeLog
trunk/plugins/generic-player/rb-generic-player-playlist-source.c
trunk/plugins/iradio/rb-iradio-source.c
trunk/shell/rb-playlist-manager.c
trunk/shell/rb-shell-player.c
trunk/shell/rb-shell.c
trunk/sources/rb-playlist-source.c
Modified: trunk/plugins/generic-player/rb-generic-player-playlist-source.c
==============================================================================
--- trunk/plugins/generic-player/rb-generic-player-playlist-source.c (original)
+++ trunk/plugins/generic-player/rb-generic-player-playlist-source.c Thu Apr 3 11:22:27 2008
@@ -274,8 +274,7 @@
g_signal_connect (parser,
"playlist-started", G_CALLBACK (handle_playlist_start_cb),
source);
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (parser), "recurse"))
- g_object_set (G_OBJECT (parser), "recurse", FALSE, NULL);
+ g_object_set (G_OBJECT (parser), "recurse", FALSE, NULL);
switch (totem_pl_parser_parse_with_base (parser, priv->playlist_path, priv->device_root, FALSE)) {
case TOTEM_PL_PARSER_RESULT_SUCCESS:
Modified: trunk/plugins/iradio/rb-iradio-source.c
==============================================================================
--- trunk/plugins/iradio/rb-iradio-source.c (original)
+++ trunk/plugins/iradio/rb-iradio-source.c Thu Apr 3 11:22:27 2008
@@ -850,27 +850,16 @@
source->priv->setting_new_query = FALSE;
}
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,19,0)
static void
handle_playlist_entry_cb (TotemPlParser *playlist,
const char *uri,
GHashTable *metadata,
RBIRadioSource *source)
-#else
-static void
-handle_playlist_entry_cb (TotemPlParser *playlist,
- const char *uri,
- const char *title,
- const char *genre,
- RBIRadioSource *source)
-#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
{
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,19,0)
const char *title, *genre;
title = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_TITLE);
genre = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_GENRE);
-#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
rb_iradio_source_add_station (source, uri, title, genre);
}
@@ -885,17 +874,10 @@
if (real_uri)
uri = real_uri;
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,19,0)
g_signal_connect_object (parser, "entry-parsed",
G_CALLBACK (handle_playlist_entry_cb),
source, 0);
-#else
- g_signal_connect_object (parser, "entry",
- G_CALLBACK (handle_playlist_entry_cb),
- source, 0);
-#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (parser), "recurse"))
- g_object_set (parser, "recurse", FALSE, NULL);
+ g_object_set (parser, "recurse", FALSE, NULL);
switch (totem_pl_parser_parse (parser, uri, FALSE)) {
case TOTEM_PL_PARSER_RESULT_UNHANDLED:
Modified: trunk/shell/rb-playlist-manager.c
==============================================================================
--- trunk/shell/rb-playlist-manager.c (original)
+++ trunk/shell/rb-playlist-manager.c Thu Apr 3 11:22:27 2008
@@ -520,12 +520,10 @@
RBPlaylistManager *mgr)
{
char *uri;
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,19,0)
const char *title, *genre;
title = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_TITLE);
genre = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_GENRE);
-#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
uri = rb_canonicalise_uri (uri_maybe);
g_return_if_fail (uri != NULL);
@@ -596,8 +594,7 @@
G_CALLBACK (playlist_load_started_cb),
mgr, 0);
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (parser), "recurse"))
- g_object_set (parser, "recurse", FALSE, NULL);
+ g_object_set (parser, "recurse", FALSE, NULL);
if (totem_pl_parser_parse (parser, uri, TRUE) != TOTEM_PL_PARSER_RESULT_SUCCESS) {
g_set_error (error,
Modified: trunk/shell/rb-shell-player.c
==============================================================================
--- trunk/shell/rb-shell-player.c (original)
+++ trunk/shell/rb-shell-player.c Thu Apr 3 11:22:27 2008
@@ -1342,6 +1342,7 @@
data->player, NULL, 0);
totem_pl_parser_add_ignored_mimetype (playlist, "x-directory/normal");
+ totem_pl_parser_add_ignored_mimetype (parser, "inode/directory");
playlist_result = totem_pl_parser_parse (playlist, data->location, FALSE);
g_object_unref (playlist);
Modified: trunk/shell/rb-shell.c
==============================================================================
--- trunk/shell/rb-shell.c (original)
+++ trunk/shell/rb-shell.c Thu Apr 3 11:22:27 2008
@@ -3302,8 +3302,8 @@
&data, NULL, 0);
totem_pl_parser_add_ignored_mimetype (parser, "x-directory/normal");
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (parser), "recurse"))
- g_object_set (G_OBJECT (parser), "recurse", FALSE, NULL);
+ totem_pl_parser_add_ignored_mimetype (parser, "inode/directory");
+ g_object_set (G_OBJECT (parser), "recurse", FALSE, NULL);
result = totem_pl_parser_parse (parser, uri, FALSE);
g_object_unref (parser);
Modified: trunk/sources/rb-playlist-source.c
==============================================================================
--- trunk/sources/rb-playlist-source.c (original)
+++ trunk/sources/rb-playlist-source.c Thu Apr 3 11:22:27 2008
@@ -504,30 +504,6 @@
gtk_drag_finish (context, TRUE, FALSE, time);
}
-#ifndef TOTEM_PL_PARSER_CHECK_VERSION
-static void
-playlist_iter_func (GtkTreeModel *model,
- GtkTreeIter *iter,
- char **uri,
- char **title,
- gpointer user_data)
-{
- RhythmDBEntry *entry;
-
- gtk_tree_model_get (model, iter, 0, &entry, -1);
-
- if (uri != NULL) {
- *uri = rhythmdb_entry_dup_string (entry, RHYTHMDB_PROP_LOCATION);
- }
- if (title != NULL) {
- *title = rhythmdb_entry_dup_string (entry, RHYTHMDB_PROP_TITLE);
- }
-
- if (entry != NULL) {
- rhythmdb_entry_unref (entry);
- }
-}
-#else
static void
playlist_iter_func (GtkTreeModel *model,
GtkTreeIter *iter,
@@ -554,7 +530,6 @@
rhythmdb_entry_unref (entry);
}
}
-#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
/**
* rb_playlist_source_save_playlist:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]