[rhythmbox: 1/2] remove totem-pl-parser obsolete code
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox: 1/2] remove totem-pl-parser obsolete code
- Date: Mon, 31 May 2021 10:52:21 +0000 (UTC)
commit 7d1258dc938f18deee733bb18d416d33507f9a91
Author: crvi <crvisqr gmail com>
Date: Sat Apr 24 05:58:04 2021 +0530
remove totem-pl-parser obsolete code
.../rb-generic-player-playlist-source.c | 2 -
sources/rb-playlist-source.c | 43 ----------------------
2 files changed, 45 deletions(-)
---
diff --git a/plugins/generic-player/rb-generic-player-playlist-source.c
b/plugins/generic-player/rb-generic-player-playlist-source.c
index a66d1e429..51c4e377d 100644
--- a/plugins/generic-player/rb-generic-player-playlist-source.c
+++ b/plugins/generic-player/rb-generic-player-playlist-source.c
@@ -64,9 +64,7 @@ enum {
typedef struct {
RBGenericPlayerPlaylistSource *source;
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,29,1)
TotemPlPlaylist *playlist;
-#endif
TotemPlParserType playlist_type;
} SavePlaylistData;
diff --git a/sources/rb-playlist-source.c b/sources/rb-playlist-source.c
index 989413e06..859fa47f8 100644
--- a/sources/rb-playlist-source.c
+++ b/sources/rb-playlist-source.c
@@ -568,8 +568,6 @@ rb_playlist_source_drop_cb (GtkWidget *widget,
gtk_drag_finish (context, TRUE, FALSE, time);
}
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,29,1)
-
static void
set_field_from_property (TotemPlPlaylist *playlist,
TotemPlPlaylistIter *iter,
@@ -611,38 +609,6 @@ playlist_iter_foreach (GtkTreeModel *model,
return FALSE;
}
-
-#else
-
-static void
-playlist_iter_func (GtkTreeModel *model,
- GtkTreeIter *iter,
- char **uri,
- char **title,
- gboolean *custom_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 (custom_title != NULL) {
- *custom_title = TRUE;
- }
-
- if (entry != NULL) {
- rhythmdb_entry_unref (entry);
- }
-}
-
-#endif
-
/**
* rb_playlist_source_save_playlist:
* @source: a #RBPlaylistSource
@@ -661,10 +627,8 @@ rb_playlist_source_save_playlist (RBPlaylistSource *source,
GError *error = NULL;
char *name;
gint totem_format;
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,29,1)
TotemPlPlaylist *playlist;
GFile *file;
-#endif
g_return_if_fail (RB_IS_PLAYLIST_SOURCE (source));
@@ -686,7 +650,6 @@ rb_playlist_source_save_playlist (RBPlaylistSource *source,
break;
}
-#if TOTEM_PL_PARSER_CHECK_VERSION(2,29,1)
file = g_file_new_for_uri (uri);
playlist = totem_pl_playlist_new ();
@@ -696,12 +659,6 @@ rb_playlist_source_save_playlist (RBPlaylistSource *source,
totem_pl_parser_save (pl, playlist, file, name, totem_format, &error);
g_object_unref (playlist);
g_object_unref (file);
-#else
- totem_pl_parser_write_with_title (pl, GTK_TREE_MODEL (source->priv->model),
- playlist_iter_func, uri, name,
- totem_format,
- NULL, &error);
-#endif
g_object_unref (pl);
g_free (name);
if (error != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]