[rhythmbox] ipod: use 'delete' rather than 'move to trash' to delete files



commit bd6226ebcc4862f0f2febb5f787c96429f606700
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Jan 13 22:59:50 2010 +1000

    ipod: use 'delete' rather than 'move to trash' to delete files
    
    'Move to trash' actually just deleted files, so now it's more accurately
    named.

 plugins/ipod/rb-ipod-db.c                     |    2 +-
 plugins/ipod/rb-ipod-source.c                 |   14 ++++++++------
 plugins/ipod/rb-ipod-source.h                 |    2 +-
 plugins/ipod/rb-ipod-static-playlist-source.c |   11 ++++++-----
 4 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-db.c b/plugins/ipod/rb-ipod-db.c
index 2eea1cb..1857486 100644
--- a/plugins/ipod/rb-ipod-db.c
+++ b/plugins/ipod/rb-ipod-db.c
@@ -609,7 +609,7 @@ rb_ipod_db_queue_remove_track (RbIpodDb *ipod_db,
 	RbIpodDbPrivate *priv = IPOD_DB_GET_PRIVATE (ipod_db);
 	
 	g_assert (priv->read_only);
-	rb_debug ("Queueing move to trash action since the iPod database is currently read-only");
+	rb_debug ("Queueing track remove action since the iPod database is currently read-only");
 	action = g_new0 (RbIpodDelayedAction, 1);
 	action->type = RB_IPOD_ACTION_REMOVE_TRACK;
 	action->track = track;
diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c
index ebd4cb0..cdc1da7 100644
--- a/plugins/ipod/rb-ipod-source.c
+++ b/plugins/ipod/rb-ipod-source.c
@@ -64,7 +64,7 @@ static char *impl_get_browser_key (RBSource *source);
 static char *impl_get_paned_key (RBBrowserSource *source);
 
 static gboolean impl_show_popup (RBSource *source);
-static void impl_move_to_trash (RBSource *asource);
+static void impl_delete (RBSource *asource);
 static void rb_ipod_load_songs (RBiPodSource *source);
 static void impl_delete_thyself (RBSource *source);
 static GList* impl_get_ui_actions (RBSource *source);
@@ -168,10 +168,12 @@ rb_ipod_source_class_init (RBiPodSourceClass *klass)
 	source_class->impl_get_browser_key  = impl_get_browser_key;
 	source_class->impl_show_popup = impl_show_popup;
 	source_class->impl_delete_thyself = impl_delete_thyself;
-	source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_true_function;
-	source_class->impl_move_to_trash = impl_move_to_trash;
+	source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_false_function;
 	source_class->impl_can_rename = (RBSourceFeatureFunc) rb_true_function;
 	source_class->impl_get_ui_actions = impl_get_ui_actions;
+	source_class->impl_can_delete = (RBSourceFeatureFunc) rb_true_function;
+	source_class->impl_delete = impl_delete;
+
 	source_class->impl_can_paste = (RBSourceFeatureFunc) rb_true_function;
 
 	mps_class->impl_get_capacity = impl_get_capacity;
@@ -1063,7 +1065,7 @@ impl_show_popup (RBSource *source)
 }
 
 void
-rb_ipod_source_trash_entries (RBiPodSource *source, GList *entries)
+rb_ipod_source_delete_entries (RBiPodSource *source, GList *entries)
 {
 	RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source);
 	RhythmDB *db;
@@ -1098,14 +1100,14 @@ rb_ipod_source_trash_entries (RBiPodSource *source, GList *entries)
 }
 
 static void
-impl_move_to_trash (RBSource *source)
+impl_delete (RBSource *source)
 {
 	GList *sel;
 	RBEntryView *songs;
 
 	songs = rb_source_get_entry_view (source);
 	sel = rb_entry_view_get_selected_entries (songs);
-	rb_ipod_source_trash_entries (RB_IPOD_SOURCE (source), sel);
+	rb_ipod_source_delete_entries (RB_IPOD_SOURCE (source), sel);
 
 	g_list_foreach (sel, (GFunc) rhythmdb_entry_unref, NULL);
 	g_list_free (sel);
diff --git a/plugins/ipod/rb-ipod-source.h b/plugins/ipod/rb-ipod-source.h
index f93ac4b..79b5e06 100644
--- a/plugins/ipod/rb-ipod-source.h
+++ b/plugins/ipod/rb-ipod-source.h
@@ -66,7 +66,7 @@ void			rb_ipod_source_remove_playlist	(RBiPodSource *ipod_source,
 
 void			rb_ipod_source_show_properties	(RBiPodSource *source);
 
-void			rb_ipod_source_trash_entries	(RBiPodSource *source,
+void			rb_ipod_source_delete_entries	(RBiPodSource *source,
 							 GList *entries);
 
 G_END_DECLS
diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c
index c5cb7c1..5a1a132 100644
--- a/plugins/ipod/rb-ipod-static-playlist-source.c
+++ b/plugins/ipod/rb-ipod-static-playlist-source.c
@@ -46,7 +46,7 @@ static void rb_ipod_static_playlist_source_get_property (GObject *object,
 
 static gboolean impl_show_popup (RBSource *source);
 static void impl_delete_thyself (RBSource *source);
-static void impl_move_to_trash (RBSource *source);
+static void impl_delete (RBSource *source);
 
 static void source_name_changed_cb (RBIpodStaticPlaylistSource *source,
 				    GParamSpec *spec,
@@ -86,8 +86,9 @@ rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klas
 
 	source_class->impl_show_popup = impl_show_popup;
 	source_class->impl_delete_thyself = impl_delete_thyself;
-	source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_true_function;
-	source_class->impl_move_to_trash = impl_move_to_trash;
+	source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_false_function;
+	source_class->impl_can_delete = (RBSourceFeatureFunc) rb_true_function;
+	source_class->impl_delete = impl_delete;
 
 	g_object_class_install_property (object_class,
 					 PROP_IPOD_SOURCE,
@@ -266,7 +267,7 @@ source_name_changed_cb (RBIpodStaticPlaylistSource *source,
 }
 
 static void
-impl_move_to_trash (RBSource *source)
+impl_delete (RBSource *source)
 {
 	RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source);
 	GList *sel;
@@ -274,7 +275,7 @@ impl_move_to_trash (RBSource *source)
 
 	songs = rb_source_get_entry_view (source);
 	sel = rb_entry_view_get_selected_entries (songs);
-	rb_ipod_source_trash_entries (priv->ipod_source, sel);
+	rb_ipod_source_delete_entries (priv->ipod_source, sel);
 
 	g_list_foreach (sel, (GFunc) rhythmdb_entry_unref, NULL);
 	g_list_free (sel);



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