[totem] Only call totem_action_add_recent() when playing the file
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [totem] Only call totem_action_add_recent() when playing the file
- Date: Fri, 17 Jul 2009 00:13:23 +0000 (UTC)
commit 94a0dfcb9d3963cabd0bb296de8ff1bd4c0193d9
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 17 01:12:42 2009 +0100
Only call totem_action_add_recent() when playing the file
2009-07-17 Bastien Nocera <hadess hadess net>
* src/totem-menu.c (totem_action_add_recent):
* src/totem-object.c (totem_action_set_mrl_with_warning),
(totem_action_open_files_list), (totem_action_remote):
Only call totem_action_add_recent() when playing the file,
not when adding it to the playlist
ChangeLog | 8 ++++++++
src/totem-menu.c | 3 +++
src/totem-object.c | 11 +++++------
3 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index be4caad..87d0177 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-17 Bastien Nocera <hadess hadess net>
+
+ * src/totem-menu.c (totem_action_add_recent):
+ * src/totem-object.c (totem_action_set_mrl_with_warning),
+ (totem_action_open_files_list), (totem_action_remote):
+ Only call totem_action_add_recent() when playing the file,
+ not when adding it to the playlist
+
2009-07-16 Sebastian Dröge <sebastian droege collabora co uk>
* src/backend/bacon-video-widget-gst-0.10.c:
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 4ae4f7c..f9b7794 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -696,6 +696,9 @@ totem_action_add_recent (Totem *totem, const char *uri)
memset (&data, 0, sizeof (data));
+ if (totem_is_special_mrl (uri) != FALSE)
+ return;
+
file = g_file_new_for_uri (uri);
file_info = g_file_query_info (file,
G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "," G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
diff --git a/src/totem-object.c b/src/totem-object.c
index 87f0517..a1ce2fa 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -1769,6 +1769,8 @@ totem_action_set_mrl_with_warning (Totem *totem,
GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
source_table, G_N_ELEMENTS (source_table),
GDK_ACTION_COPY);
+
+ totem_action_add_recent (totem, totem->mrl);
}
}
update_buttons (totem);
@@ -2714,7 +2716,6 @@ totem_action_open_files_list (Totem *totem, GSList *list)
totem_action_load_media (totem, MEDIA_TYPE_DVB, "0");
changed = TRUE;
} else if (totem_playlist_add_mrl (totem->playlist, filename, NULL) != FALSE) {
- totem_action_add_recent (totem, filename);
changed = TRUE;
}
}
@@ -2969,9 +2970,7 @@ totem_action_remote (Totem *totem, TotemRemoteCommand cmd, const char *url)
break;
case TOTEM_REMOTE_COMMAND_ENQUEUE:
g_assert (url != NULL);
- if (totem_playlist_add_mrl_with_cursor (totem->playlist, url, NULL) != FALSE) {
- totem_action_add_recent (totem, url);
- }
+ totem_playlist_add_mrl_with_cursor (totem->playlist, url, NULL);
break;
case TOTEM_REMOTE_COMMAND_REPLACE:
totem_playlist_clear (totem->playlist);
@@ -2989,8 +2988,8 @@ totem_action_remote (Totem *totem, TotemRemoteCommand cmd, const char *url)
totem_action_play_media (totem, MEDIA_TYPE_VCD, NULL);
} else if (g_str_has_prefix (url, "dvb:") != FALSE) {
totem_action_load_media (totem, MEDIA_TYPE_DVB, "0");
- } else if (totem_playlist_add_mrl_with_cursor (totem->playlist, url, NULL) != FALSE) {
- totem_action_add_recent (totem, url);
+ } else {
+ totem_playlist_add_mrl_with_cursor (totem->playlist, url, NULL);
}
break;
case TOTEM_REMOTE_COMMAND_SHOW:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]