--- totem/src/totem-menu.c	2008-06-15 22:35:51.000000000 +0200
+++ totem.new/src/totem-menu.c	2008-06-15 22:21:47.000000000 +0200
@@ -73,6 +73,7 @@
 void show_controls_action_callback (GtkToggleAction *action, Totem *totem);
 void show_sidebar_action_callback (GtkToggleAction *action, Totem *totem);
 void aspect_ratio_changed_callback (GtkRadioAction *action, GtkRadioAction *current, Totem *totem);
+void select_subtitle_action_callback (GtkAction *action, Totem *totem);
 void clear_playlist_action_callback (GtkAction *action, Totem *totem);
 
 /* Helper function to escape underscores in labels
@@ -1085,6 +1086,14 @@
 	totem_action_zoom_relative (totem, ZOOM_OUT_OFFSET);
 }
 
+	
+
+void
+select_subtitle_action_callback(GtkAction *action, Totem *totem)
+{
+	totem_playlist_select_subtitle_dialog(totem->playlist, TOTEM_PLAYLIST_DIALOG_PLAYING);
+} 
+
 void
 next_angle_action_callback (GtkAction *action, Totem *totem)
 {
--- totem/src/totem-playlist.h	2008-06-15 22:35:51.000000000 +0200
+++ totem.new/src/totem-playlist.h	2008-06-15 22:18:22.000000000 +0200
@@ -46,6 +46,12 @@
 	TOTEM_PLAYLIST_DIRECTION_PREVIOUS
 } TotemPlaylistDirection;
 
+typedef enum {
+	TOTEM_PLAYLIST_DIALOG_SELECTED,
+	TOTEM_PLAYLIST_DIALOG_PLAYING
+} TotemPlaylistSelectDialog;
+
+
 typedef struct TotemPlaylist	       TotemPlaylist;
 typedef struct TotemPlaylistClass      TotemPlaylistClass;
 typedef struct TotemPlaylistPrivate    TotemPlaylistPrivate;
@@ -92,6 +98,7 @@
 					   const char *output);
 void totem_playlist_save_current_playlist_ext (TotemPlaylist *playlist,
 					   const char *output, TotemPlParserType type);
+void totem_playlist_select_subtitle_dialog(TotemPlaylist *playlist, TotemPlaylistSelectDialog mode);
 
 /* totem_playlist_clear doesn't emit the current_removed signal, even if it does
  * because the caller should know what to do after it's done with clearing */
--- totem/src/totem-playlist.c	2008-06-15 22:35:51.000000000 +0200
+++ totem.new/src/totem-playlist.c	2008-06-15 22:32:03.000000000 +0200
@@ -262,6 +262,45 @@
 	gtk_widget_show (error_dialog);
 }
 
+void
+totem_playlist_select_subtitle_dialog(TotemPlaylist *playlist, TotemPlaylistSelectDialog mode)
+{
+	char *subtitle;
+	GList *l;
+	TotemPlaylistStatus playing;
+	GtkTreeIter iter;
+
+	subtitle = totem_add_subtitle (totem_playlist_get_toplevel (playlist), NULL);
+
+	if (subtitle == NULL)
+		return;
+
+	if (mode == TOTEM_PLAYLIST_DIALOG_PLAYING) {
+		gtk_tree_model_get_iter (playlist->priv->model, &iter, playlist->priv->current);
+
+	} else if (mode == TOTEM_PLAYLIST_DIALOG_SELECTED) {
+		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, 
+			    SUBTITLE_URI_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);
+}
+
+
 /* This one returns a new string, in UTF8 even if the MRL is encoded
  * in the locale's encoding
  */
@@ -458,34 +497,7 @@
 void
 playlist_select_subtitle_action_callback (GtkAction *action, TotemPlaylist *playlist)
 {
-	char *subtitle;
-	GList *l;
-	TotemPlaylistStatus playing;
-	GtkTreeIter iter;
-
-	subtitle = totem_add_subtitle (totem_playlist_get_toplevel (playlist), NULL);
-
-	if (subtitle == NULL)
-		return;
-
-	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, 
-			    SUBTITLE_URI_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);
+	totem_playlist_select_subtitle_dialog(playlist, TOTEM_PLAYLIST_DIALOG_SELECTED);
 }
 
 void
--- totem/data/totem.ui	2008-06-15 22:36:31.000000000 +0200
+++ totem.new/data/totem.ui	2008-06-15 22:33:00.000000000 +0200
@@ -355,7 +355,13 @@
                <property name="value">4</property>
             </object>
          </child>
-
+         <child>
+            <object class="GtkAction" id="select-subtitle">
+               <property name="label" translatable="yes">Select text subtitle</property>
+               <property name="tooltip" translatable="yes">Select a file to use for text subtitles</property>
+               <signal name="activate" handler="select_subtitle_action_callback"/>
+            </object>
+         </child>
          <child>
             <object class="GtkAction" id="subtitles-menu">
                <property name="label" translatable="yes">S_ubtitles</property>
@@ -471,6 +477,7 @@
             <menuitem name="deinterlace" action="deinterlace"/>
             <menuitem name="next-angle" action="next-angle"/>
             <menuitem name="show-controls" action="show-controls"/>
+            <menuitem name="select-subtitle" action="select-subtitle"/>
             <menu name="subtitles" action="subtitles-menu">
                <placeholder name="placeholder"/>
             </menu>
@@ -510,6 +517,7 @@
          <menuitem name="skip-backwards" action="skip-backwards"/>
          <menuitem name="show-controls" action="show-controls"/>
          <menuitem name="fullscreen" action="fullscreen"/>
+         <menuitem name="select-subtitle" action="select-subtitle"/>
       </popup>
    </ui>
 </object>
--- totem/src/totem.c	2008-06-15 22:35:51.000000000 +0200
+++ totem.new/src/totem.c	2008-06-15 22:04:04.000000000 +0200
@@ -1065,6 +1065,9 @@
 		/* Clear the playlist */
 		totem_action_set_sensitivity ("clear-playlist", FALSE);
 
+		/* Subtitle selection */
+		totem_action_set_sensitivity ("select-subtitle", FALSE);
+
 		/* Set the logo */
 		bacon_video_widget_set_logo_mode (totem->bvw, TRUE);
 		update_mrl_label (totem, NULL);
@@ -1104,6 +1107,9 @@
 		/* Clear the playlist */
 		totem_action_set_sensitivity ("clear-playlist", retval);
 
+		/* Subtitle selection */
+		totem_action_set_sensitivity ("select-subtitle", retval);
+
 		/* Set the playlist */
 		play_pause_set_label (totem, retval ? STATE_PAUSED : STATE_STOPPED);
 
