[totem] Fix title changes when the DVD chapters change.



commit a23fe8096702c221e79b536f99d30e79733780fd
Author: Jan Schmidt <thaytan noraisin net>
Date:   Sun Dec 12 02:12:54 2010 +1100

    Fix title changes when the DVD chapters change.
    
    Remove the 'force' argument from totem_playlist_set_title,
    as we want to update the custom title whenever the metadata changes,
    making all calls to totem_playlist_set_title need force == TRUE anyway.
    
    Fixes updating the playlist label and window title when DVDs switch
    chapters or jump into/out of the menu, broken in 71eacd.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=594222

 src/totem-object.c   |    4 ++--
 src/totem-playlist.c |   11 +----------
 src/totem-playlist.h |    3 +--
 3 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 5296a72..fc19606 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2483,7 +2483,7 @@ on_channels_change_event (BaconVideoWidget *bvw, TotemObject *totem)
 	if (name != NULL) {
 		update_mrl_label (totem, name);
 		totem_playlist_set_title
-			(TOTEM_PLAYLIST (totem->playlist), name, TRUE);
+			(TOTEM_PLAYLIST (totem->playlist), name);
 		g_free (name);
 	}
 }
@@ -2509,7 +2509,7 @@ on_got_metadata_event (BaconVideoWidget *bvw, TotemObject *totem)
 
 	if (name != NULL) {
 		totem_playlist_set_title
-			(TOTEM_PLAYLIST (totem->playlist), name, FALSE);
+			(TOTEM_PLAYLIST (totem->playlist), name);
 		g_free (name);
 	}
 
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 37ce6ba..489636e 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -2317,11 +2317,10 @@ totem_playlist_has_next_mrl (TotemPlaylist *playlist)
 }
 
 gboolean
-totem_playlist_set_title (TotemPlaylist *playlist, const char *title, gboolean force)
+totem_playlist_set_title (TotemPlaylist *playlist, const char *title)
 {
 	GtkListStore *store;
 	GtkTreeIter iter;
-	gboolean custom_title;
 	char *escaped_title;
 
 	g_return_val_if_fail (TOTEM_IS_PLAYLIST (playlist), FALSE);
@@ -2337,14 +2336,6 @@ totem_playlist_set_title (TotemPlaylist *playlist, const char *title, gboolean f
 	if (&iter == NULL)
 		return FALSE;
 
-	if (force == FALSE) {
-		gtk_tree_model_get (playlist->priv->model, &iter,
-				TITLE_CUSTOM_COL, &custom_title,
-				-1);
-		if (custom_title != FALSE)
-			return TRUE;
-	}
-
 	escaped_title = g_markup_escape_text (title, -1);
 	gtk_list_store_set (store, &iter,
 			FILENAME_COL, title,
diff --git a/src/totem-playlist.h b/src/totem-playlist.h
index d7e5a65..fe4cba2 100644
--- a/src/totem-playlist.h
+++ b/src/totem-playlist.h
@@ -120,8 +120,7 @@ char      *totem_playlist_get_title (TotemPlaylist *playlist,
 				     guint title_index);
 
 gboolean   totem_playlist_set_title (TotemPlaylist *playlist,
-				     const char *title,
-				     gboolean force);
+				     const char *title);
 void       totem_playlist_set_current_subtitle (TotemPlaylist *playlist,
 						const char *subtitle_uri);
 



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