diff -ur totem-svn.orig/bindings/python/totem.defs totem-svn/bindings/python/totem.defs
--- totem-svn.orig/bindings/python/totem.defs	2007-11-23 10:01:43.000000000 +0100
+++ totem-svn/bindings/python/totem.defs	2007-11-23 10:02:15.000000000 +0100
@@ -275,6 +275,7 @@
   (return-type "gboolean")
   (parameters
     '("const-char*" "mrl")
+    '("const-char*" "subtitle")
   )
 )
 
@@ -284,6 +285,7 @@
   (return-type "none")
   (parameters
     '("const-char*" "mrl")
+    '("const-char*" "subtitle")
   )
 )
 
@@ -293,6 +295,7 @@
   (return-type "gboolean")
   (parameters
     '("const-char*" "mrl")
+    '("const-char*" "subtitle")
     '("gboolean" "warn")
   )
 )
diff -ur totem-svn.orig/data/playlist.ui totem-svn/data/playlist.ui
--- totem-svn.orig/data/playlist.ui	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/data/playlist.ui	2007-11-23 11:26:15.000000000 +0100
@@ -22,12 +22,21 @@
                <signal name="activate" handler="playlist_copy_location_action_callback"/>
             </object>
          </child>
+         <child>
+            <object class="GtkAction" id="select-subtitle">
+               <property name="label">Select text subtitle...</property>
+               <property name="tooltip">Select a file to use for text subtitles</property>
+               <property name="stock-id">gtk-copy</property>
+               <signal name="activate" handler="playlist_select_subtitle_action_callback"/>
+            </object>
+         </child>
       </object>
    </child>
    <ui>
       <popup name="totem-playlist-popup">
          <menuitem name="remove" action="remove"/>
          <menuitem name="copy-location" action="copy-location"/>
+         <menuitem name="select-subtitle" action="select-subtitle"/>
       </popup>
    </ui>
 </object>
diff -ur totem-svn.orig/src/plugins/mythtv/totem-mythtv.c totem-svn/src/plugins/mythtv/totem-mythtv.c
--- totem-svn.orig/src/plugins/mythtv/totem-mythtv.c	2007-11-23 10:01:46.000000000 +0100
+++ totem-svn/src/plugins/mythtv/totem-mythtv.c	2007-11-23 10:02:15.000000000 +0100
@@ -187,7 +187,7 @@
 			    URI_COL, &uri, -1);
 	g_return_if_fail (uri != NULL);
 
-	totem_action_set_mrl_and_play (plugin->totem, uri);
+	totem_action_set_mrl_and_play (plugin->totem, uri, NULL);
 }
 
 static void
diff -ur totem-svn.orig/src/totem.c totem-svn/src/totem.c
--- totem-svn.orig/src/totem.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem.c	2007-11-23 11:39:06.000000000 +0100
@@ -420,9 +420,9 @@
 }
 
 void
-totem_action_set_mrl_and_play (Totem *totem, const char *mrl)
+totem_action_set_mrl_and_play (Totem *totem, const char *mrl, const char *subtitle)
 {
-	if (totem_action_set_mrl (totem, mrl) != FALSE)
+	if (totem_action_set_mrl (totem, mrl, subtitle) != FALSE)
 		totem_action_play (totem);
 }
 
@@ -450,11 +450,12 @@
 	g_slist_free (filenames);
 
 	if (play != FALSE) {
-		char *mrl;
+		char *mrl, *subtitle;
 
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
 		g_free (mrl);
+		g_free (subtitle);
 	}
 
 	return TRUE;
@@ -552,8 +553,8 @@
 	char *mrl;
 
 	if (totem_action_load_media_device (totem, device) != FALSE) {
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, NULL);
+		totem_action_set_mrl_and_play (totem, mrl, NULL);
 		g_free (mrl);
 	}
 }
@@ -564,8 +565,8 @@
 	char *mrl;
 
 	if (totem_action_load_media (totem, type, device) != FALSE) {
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, NULL);
+		totem_action_set_mrl_and_play (totem, mrl, NULL);
 		g_free (mrl);
 	}
 }
@@ -582,16 +583,17 @@
 {
 	if (totem->mrl == NULL)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 
 		/* Try to pull an mrl from the playlist */
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
 		if (mrl == NULL) {
 			play_pause_set_label (totem, STATE_STOPPED);
 			return;
 		} else {
-			totem_action_set_mrl_and_play (totem, mrl);
+			totem_action_set_mrl_and_play (totem, mrl, subtitle);
 			g_free (mrl);
+			g_free (subtitle);
 			return;
 		}
 	}
@@ -719,16 +721,17 @@
 
 	if (uri != NULL)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 		const char *filenames[2];
 
 		filenames[0] = uri;
 		filenames[1] = NULL;
 		totem_action_open_files (totem, (char **) filenames);
 
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
 		g_free (mrl);
+		g_free (subtitle);
 	}
  	g_free (uri);
 
@@ -868,8 +871,8 @@
 }
 
 gboolean
-totem_action_set_mrl_with_warning (Totem *totem, const char *mrl,
-		gboolean warn)
+totem_action_set_mrl_with_warning (Totem *totem, const char *mrl, 
+		const char *subtitle, gboolean warn)
 {
 	gboolean retval = TRUE;
 
@@ -915,13 +918,15 @@
 	} else {
 		gboolean caps;
 		gdouble volume;
-		char *subtitle_uri = NULL;
+		char *subtitle_uri;
 		GError *err = NULL;
 
 		bacon_video_widget_set_logo_mode (totem->bvw, FALSE);
 
-		if (totem->autoload_subs != FALSE)
+		subtitle_uri = subtitle;
+		if (!subtitle_uri && totem->autoload_subs != FALSE) 
 			subtitle_uri = totem_uri_get_subtitle_uri (mrl);
+
 		totem_gdk_window_set_waiting_cursor (totem->win->window);
 		retval = bacon_video_widget_open_with_subtitle (totem->bvw,
 				mrl, subtitle_uri, &err);
@@ -983,9 +988,9 @@
 }
 
 gboolean
-totem_action_set_mrl (Totem *totem, const char *mrl)
+totem_action_set_mrl (Totem *totem, const char *mrl, const char *subtitle)
 {
-	return totem_action_set_mrl_with_warning (totem, mrl, TRUE);
+	return totem_action_set_mrl_with_warning (totem, mrl, subtitle, TRUE);
 }
 
 static gboolean
@@ -1019,11 +1024,13 @@
 			|| bacon_video_widget_is_seekable (totem->bvw) == FALSE
 			|| totem_time_within_seconds (totem) != FALSE)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 
 		totem_playlist_set_direction (totem->playlist, dir);
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
+		
+		g_free (subtitle);
 		g_free (mrl);
 	} else {
 		totem_action_seek (totem, 0);
@@ -1286,14 +1293,15 @@
 	/* ... and reconnect because we're nice people */
 	if (cleared != FALSE)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 
 		g_signal_connect (G_OBJECT (totem->playlist),
 				"changed", G_CALLBACK (playlist_changed_cb),
 				totem);
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
 		g_free (mrl);
+		g_free (subtitle);
 	}
 
 	return TRUE;
@@ -1369,7 +1377,7 @@
 {
 	gchar *old_mrl, *new_mrl;
 
-	old_mrl = totem_playlist_get_current_mrl (TOTEM_PLAYLIST (totem->playlist));
+	old_mrl = totem_playlist_get_current_mrl (TOTEM_PLAYLIST (totem->playlist), NULL);
 	new_mrl = totem_pl_parser_resolve_url (old_mrl, mrl);
 	g_free (old_mrl);
 
@@ -1857,12 +1865,13 @@
 void
 totem_action_set_playlist_index (Totem *totem, guint index)
 {
-	char *mrl;
+	char *mrl, *subtitle;
 
 	totem_playlist_set_current (totem->playlist, index);
-	mrl = totem_playlist_get_current_mrl (totem->playlist);
-	totem_action_set_mrl_and_play (totem, mrl);
+	mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+	totem_action_set_mrl_and_play (totem, mrl, subtitle);
 	g_free (mrl);
+	g_free (subtitle);
 }
 
 void
@@ -1915,7 +1924,7 @@
 		if (url == NULL) {
 			bacon_video_widget_close (totem->bvw);
 			totem_file_closed (totem);
-			totem_action_set_mrl (totem, NULL);
+			totem_action_set_mrl (totem, NULL, NULL);
 			break;
 		}
 		if (strcmp (url, "dvd:") == 0) {
@@ -2068,17 +2077,19 @@
 static void
 playlist_changed_cb (GtkWidget *playlist, Totem *totem)
 {
-	char *mrl;
+	char *mrl, *subtitle;
 
 	update_buttons (totem);
-	mrl = totem_playlist_get_current_mrl (totem->playlist);
+	mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
 
 	if (mrl == NULL)
 		return;
 
 	if (totem_playlist_get_playing (totem->playlist) == TOTEM_PLAYLIST_STATUS_NONE)
-		totem_action_set_mrl_and_play (totem, mrl);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
+
 	g_free (mrl);
+	g_free (subtitle);
 }
 
 static void
@@ -2090,23 +2101,39 @@
 static void
 current_removed_cb (GtkWidget *playlist, Totem *totem)
 {
-	char *mrl;
+	char *mrl, *subtitle;
 
 	/* Set play button status */
 	play_pause_set_label (totem, STATE_STOPPED);
-	mrl = totem_playlist_get_current_mrl (totem->playlist);
+	mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
 
 	if (mrl == NULL)
 	{
 		totem_playlist_set_at_start (totem->playlist);
 		update_buttons (totem);
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
 	} else {
 		update_buttons (totem);
 	}
 
-	totem_action_set_mrl_and_play (totem, mrl);
+	totem_action_set_mrl_and_play (totem, mrl, subtitle);
 	g_free (mrl);
+	g_free (subtitle);
+}
+
+static void
+subtitle_changed_cb (GtkWidget *playlist, Totem *totem)
+{
+    char *mrl, *subtitle;
+    
+    totem_action_stop(totem);
+
+    mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+    
+    totem_action_set_mrl_and_play (totem, mrl, subtitle);
+    
+    g_free (mrl);
+    g_free (subtitle);    
 }
 
 static void
@@ -2212,16 +2239,17 @@
 	if (totem_playlist_has_next_mrl (totem->playlist) == FALSE
 			&& totem_playlist_get_repeat (totem->playlist) == FALSE)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 
 		/* Set play button status */
 		totem_playlist_set_at_start (totem->playlist);
 		update_buttons (totem);
 		totem_action_stop (totem);
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_with_warning (totem, mrl, FALSE);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_with_warning (totem, mrl, subtitle, FALSE);
 		bacon_video_widget_pause (totem->bvw);
 		g_free (mrl);
+		g_free (subtitle);
 	} else {
 		totem_action_next (totem);
 	}
@@ -2883,6 +2911,10 @@
 			"shuffle-toggled",
 			G_CALLBACK (playlist_shuffle_toggle_cb),
 			totem);
+	g_signal_connect (G_OBJECT (totem->playlist),
+			"subtitle-changed",
+			G_CALLBACK (subtitle_changed_cb),
+			totem);
 }
 
 static void
@@ -3171,7 +3203,7 @@
 	} else if (optionstate.filenames != NULL && totem_action_open_files (totem, optionstate.filenames)) {
 		totem_action_play_pause (totem);
 	} else {
-		totem_action_set_mrl (totem, NULL);
+		totem_action_set_mrl (totem, NULL, NULL);
 	}
 
 	/* Set the logo at the last minute so we won't try to show it before a video */
diff -ur totem-svn.orig/src/totem.h totem-svn/src/totem.h
--- totem-svn.orig/src/totem.h	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem.h	2007-11-23 10:02:15.000000000 +0100
@@ -130,12 +130,15 @@
 void	totem_action_seek_relative		(Totem *totem, gint64 offset);
 void	totem_action_volume_relative		(Totem *totem, double off_pct);
 gboolean totem_action_set_mrl			(Totem *totem,
-						 const char *mrl);
+						 const char *mrl,
+						 const char *subtitle);
 void	totem_action_set_mrl_and_play		(Totem *totem,
-						 const char *mrl);
+						 const char *mrl, 
+						 const char *subtitle);
 
 gboolean totem_action_set_mrl_with_warning	(Totem *totem,
 						 const char *mrl,
+						 const char *subtitle,
 						 gboolean warn);
 
 void	totem_action_play_media			(Totem *totem,
diff -ur totem-svn.orig/src/totem-menu.c totem-svn/src/totem-menu.c
--- totem-svn.orig/src/totem-menu.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-menu.c	2007-11-23 10:02:15.000000000 +0100
@@ -1252,7 +1252,7 @@
 clear_playlist_action_callback (GtkAction *action, Totem *totem)
 {
 	totem_playlist_clear (totem->playlist);
-	totem_action_set_mrl (totem, NULL);
+	totem_action_set_mrl (totem, NULL, NULL);
 }
 
 static const GtkActionEntry seek_entries_ltr[] = {
diff -ur totem-svn.orig/src/totem-object.c totem-svn/src/totem-object.c
--- totem-svn.orig/src/totem-object.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-object.c	2007-11-23 11:00:04.000000000 +0100
@@ -254,12 +254,13 @@
 
 	if (playlist_changed)
 	{
-		char *mrl;
+		char *mrl, *subtitle;
 
 		totem_playlist_set_current (totem->playlist, end + 1);
-		mrl = totem_playlist_get_current_mrl (totem->playlist);
-		totem_action_set_mrl_and_play (totem, mrl);
+		mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
+		totem_action_set_mrl_and_play (totem, mrl, subtitle);
 		g_free (mrl);
+		g_free (subtitle);
 	}
 }
 
diff -ur totem-svn.orig/src/totem-playlist.c totem-svn/src/totem-playlist.c
--- totem-svn.orig/src/totem-playlist.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-playlist.c	2007-11-23 11:26:01.000000000 +0100
@@ -49,6 +49,7 @@
 void totem_playlist_up_files (GtkWidget *widget, TotemPlaylist *playlist);
 void totem_playlist_down_files (GtkWidget *widget, TotemPlaylist *playlist);
 void playlist_copy_location_action_callback (GtkAction *action, TotemPlaylist *playlist);
+void playlist_select_subtitle_action_callback (GtkAction *action, TotemPlaylist *playlist);
 void playlist_remove_action_callback (GtkAction *action, TotemPlaylist *playlist);
 
 typedef gboolean (*PlaylistCallback) (TotemPlaylist *playlist, const char *mrl,
@@ -118,6 +119,7 @@
 	CURRENT_REMOVED,
 	REPEAT_TOGGLED,
 	SHUFFLE_TOGGLED,
+	SUBTITLE_CHANGED,
 	LAST_SIGNAL
 };
 
@@ -129,6 +131,7 @@
 	CACHE_TITLE_COL,
 	CACHE_ARTIST_COL,
 	CACHE_ALBUM_COL,
+	SUBTITLES_COL,
 	NUM_COLS
 };
 
@@ -444,6 +447,42 @@
 }
 
 void
+playlist_select_subtitle_action_callback (GtkAction *action, TotemPlaylist *playlist)
+{
+	char *subtitle;
+	subtitle = totem_load_select(totem_playlist_get_toplevel (playlist),
+			NULL);
+
+	if (subtitle) {
+		GList *l;
+		TotemPlaylistStatus playing;
+		GtkTreeIter iter;
+		
+		l = gtk_tree_selection_get_selected_rows (playlist->_priv->selection, NULL);
+		gtk_tree_model_get_iter (playlist->_priv->model, &iter, l->data);
+
+		gtk_tree_model_get (playlist->_priv->model,
+			&iter,
+			PLAYING_COL, &playing,
+			-1);
+
+		gtk_list_store_set (GTK_LIST_STORE(playlist->_priv->model), 
+			&iter, 
+			SUBTITLES_COL, subtitle,
+			-1);
+
+		if (playing != TOTEM_PLAYLIST_STATUS_NONE) 
+		{
+		    g_signal_emit (G_OBJECT (playlist),
+			    totem_playlist_table_signals[SUBTITLE_CHANGED], 0,
+		    	    NULL);
+		}
+
+		g_free(subtitle);
+	}	
+}
+
+void
 playlist_copy_location_action_callback (GtkAction *action, TotemPlaylist *playlist)
 {
 	GList *l;
@@ -1251,6 +1290,7 @@
 				G_TYPE_BOOLEAN,
 				G_TYPE_STRING,
 				G_TYPE_STRING,
+				G_TYPE_STRING,
 				G_TYPE_STRING));
 
 	/* the treeview */
@@ -1783,7 +1823,7 @@
 }
 
 char *
-totem_playlist_get_current_mrl (TotemPlaylist *playlist)
+totem_playlist_get_current_mrl (TotemPlaylist *playlist, char **subtitle)
 {
 	GtkTreeIter iter;
 	char *path;
@@ -1802,6 +1842,13 @@
 			URI_COL, &path,
 			-1);
 
+	if (subtitle != NULL) {
+		gtk_tree_model_get (playlist->_priv->model,
+			&iter,
+			SUBTITLES_COL, subtitle,
+			-1);
+	}
+
 	return path;
 }
 
@@ -2296,5 +2343,14 @@
 				NULL, NULL,
 				g_cclosure_marshal_VOID__BOOLEAN,
 				G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+	totem_playlist_table_signals[SUBTITLE_CHANGED] =
+		g_signal_new ("subtitle-changed",
+				G_TYPE_FROM_CLASS (klass),
+				G_SIGNAL_RUN_LAST,
+				G_STRUCT_OFFSET (TotemPlaylistClass,
+					subtitle_changed),
+				NULL, NULL,
+				g_cclosure_marshal_VOID__VOID,
+				G_TYPE_NONE, 0);
 }
 
diff -ur totem-svn.orig/src/totem-playlist.h totem-svn/src/totem-playlist.h
--- totem-svn.orig/src/totem-playlist.h	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-playlist.h	2007-11-23 10:51:09.000000000 +0100
@@ -65,6 +65,7 @@
 	void (*current_removed) (TotemPlaylist *playlist);
 	void (*repeat_toggled) (TotemPlaylist *playlist, gboolean repeat);
 	void (*shuffle_toggled) (TotemPlaylist *playlist, gboolean toggled);
+	void (*subtitle_changed) (TotemPlaylist *playlist);
 };
 
 GtkType    totem_playlist_get_type (void);
@@ -91,7 +92,8 @@
 gboolean   totem_playlist_clear (TotemPlaylist *playlist);
 void       totem_playlist_clear_with_gnome_vfs_volume (TotemPlaylist *playlist,
 						       GnomeVFSVolume *volume);
-char      *totem_playlist_get_current_mrl (TotemPlaylist *playlist);
+char      *totem_playlist_get_current_mrl (TotemPlaylist *playlist,
+					   char **subtitle);
 char      *totem_playlist_get_current_title (TotemPlaylist *playlist,
 					     gboolean *custom);
 char      *totem_playlist_get_title (TotemPlaylist *playlist,
diff -ur totem-svn.orig/src/totem-session.c totem-svn/src/totem-session.c
--- totem-svn.orig/src/totem-session.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-session.c	2007-11-23 11:00:55.000000000 +0100
@@ -122,7 +122,7 @@
 void
 totem_session_restore (Totem *totem, char **filenames)
 {
-	char *mrl, *uri;
+	char *mrl, *uri, *subtitle;
 
 	g_return_if_fail (filenames[0] != NULL);
 	uri = filenames[0];
@@ -132,7 +132,7 @@
 	if (totem_playlist_add_mrl_with_cursor (totem->playlist, uri, NULL) == FALSE)
 	{
 		totem_signal_unblock_by_data (totem->playlist, totem);
-		totem_action_set_mrl (totem, NULL);
+		totem_action_set_mrl (totem, NULL, NULL);
 		g_free (uri);
 		return;
 	}
@@ -141,9 +141,9 @@
 
 	if (totem->index != 0)
 		totem_playlist_set_current (totem->playlist, totem->index);
-	mrl = totem_playlist_get_current_mrl (totem->playlist);
+	mrl = totem_playlist_get_current_mrl (totem->playlist, &subtitle);
 
-	totem_action_set_mrl_with_warning (totem, mrl, FALSE);
+	totem_action_set_mrl_with_warning (totem, mrl, subtitle, FALSE);
 
 	if (totem->seek_to != 0)
 	{
@@ -153,6 +153,7 @@
 	bacon_video_widget_pause (totem->bvw);
 
 	g_free (mrl);
+	g_free (subtitle);
 
 	return;
 }
diff -ur totem-svn.orig/src/totem-uri.c totem-svn/src/totem-uri.c
--- totem-svn.orig/src/totem-uri.c	2007-11-23 10:01:44.000000000 +0100
+++ totem-svn/src/totem-uri.c	2007-11-23 11:34:36.000000000 +0100
@@ -487,6 +487,56 @@
 	gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (chooser), dir, NULL);
 }
 
+char *
+totem_select_subtitle (GtkWindow *parent, const char *path)
+{
+	GtkWidget *dialog;
+	GConfClient *conf;
+	char *new_path;
+	char *subtitle = NULL;
+	gboolean set_folder;
+
+	dialog  = gtk_file_chooser_dialog_new(_("Select text subtitle"), 
+			parent,
+			GTK_FILE_CHOOSER_ACTION_OPEN,
+			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+			GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+			NULL);
+	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter_all);
+
+	conf = gconf_client_get_default ();
+	set_folder = TRUE;
+	if (path != NULL) {
+		set_folder = gtk_file_chooser_set_current_folder_uri
+			(GTK_FILE_CHOOSER (dialog), path);
+	} else {
+		new_path = gconf_client_get_string (conf, "/apps/totem/open_path", NULL);
+		if (new_path != NULL && *new_path != '\0') {
+			set_folder = gtk_file_chooser_set_current_folder_uri
+				(GTK_FILE_CHOOSER (dialog), new_path);
+		}
+		g_free (new_path);
+	}
+	
+	if (set_folder == FALSE) {
+		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog),
+						     g_get_home_dir ());
+	}
+	totem_add_default_dirs (GTK_FILE_CHOOSER (dialog));
+
+	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		char *filename;
+		filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+		subtitle = g_strdup_printf("file://%s", filename);		
+		g_free(filename);		
+	}
+
+	gtk_widget_destroy (dialog);
+	return subtitle;
+
+}
+
 GSList *
 totem_add_files (GtkWindow *parent, const char *path)
 {
diff -ur totem-svn.orig/src/totem-uri.h totem-svn/src/totem-uri.h
--- totem-svn.orig/src/totem-uri.h	2007-11-23 10:01:48.000000000 +0100
+++ totem-svn/src/totem-uri.h	2007-11-23 11:30:30.000000000 +0100
@@ -40,6 +40,8 @@
 void		totem_destroy_file_filters	(void);
 char*		totem_uri_get_subtitle_uri	(const char *uri);
 char*		totem_uri_escape_for_display	(const char *uri);
+char*           totem_select_subtitle             (GtkWindow *parent, 
+                           			 const char *path);
 GSList*		totem_add_files			(GtkWindow *parent,
 						 const char *path);
 void		totem_add_pictures_dir		(GtkWidget *chooser);
