From 749e836002a29444023160a94806529fd2d071aa Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 2 Jul 2012 20:18:16 +0100 Subject: main: Add a GMount column to the playlist To keep track of it, as by the time the GMount will disappear, it will be too late to try and look for it, and we'd have nothing to compare it against. --- src/totem-playlist.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/totem-playlist.c') diff --git a/src/totem-playlist.c b/src/totem-playlist.c index e133e1c48..6bdc3e8eb 100644 --- a/src/totem-playlist.c +++ b/src/totem-playlist.c @@ -146,6 +146,7 @@ enum { TITLE_CUSTOM_COL, SUBTITLE_URI_COL, FILE_MONITOR_COL, + MOUNT_COL, MIME_TYPE_COL, NUM_COLS }; @@ -1745,6 +1746,7 @@ totem_playlist_add_one_mrl (TotemPlaylist *playlist, char *filename_for_display, *uri, *escaped_filename; GtkTreeRowReference *ref; GFileMonitor *monitor; + GMount *mount; GFile *file; int pos; @@ -1783,20 +1785,23 @@ totem_playlist_add_one_mrl (TotemPlaylist *playlist, "changed", G_CALLBACK (totem_playlist_file_changed), playlist); + mount = NULL; } else { + mount = totem_get_mount_for_media (uri ? uri : mrl); monitor = NULL; } escaped_filename = g_markup_escape_text (filename_for_display, -1); gtk_list_store_insert_with_values (store, &iter, pos, - PLAYING_COL, TOTEM_PLAYLIST_STATUS_NONE, - FILENAME_COL, filename_for_display, - FILENAME_ESCAPED_COL, escaped_filename, - URI_COL, uri ? uri : mrl, - TITLE_CUSTOM_COL, display_name ? TRUE : FALSE, - FILE_MONITOR_COL, monitor, - MIME_TYPE_COL, content_type, - -1); + PLAYING_COL, TOTEM_PLAYLIST_STATUS_NONE, + FILENAME_COL, filename_for_display, + FILENAME_ESCAPED_COL, escaped_filename, + URI_COL, uri ? uri : mrl, + TITLE_CUSTOM_COL, display_name ? TRUE : FALSE, + FILE_MONITOR_COL, monitor, + MOUNT_COL, mount, + MIME_TYPE_COL, content_type, + -1); g_free (escaped_filename); g_signal_emit (playlist, -- cgit v1.2.1