summaryrefslogtreecommitdiff
path: root/player
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2008-01-14 20:13:53 +0100
committerBenjamin Otte <otte@gnome.org>2008-01-14 20:13:53 +0100
commit23f700310f828674a57ad0fd6b56a40036754034 (patch)
tree4bd924e92ae69d5e77f3cf5f3269d2338f13573f /player
parent96cdd32e67011296e3d0dd4f20973aefbd9081cb (diff)
catch a loader error, too
Diffstat (limited to 'player')
-rw-r--r--player/swfdec-window.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/player/swfdec-window.c b/player/swfdec-window.c
index 01a86e7..28d474d 100644
--- a/player/swfdec-window.c
+++ b/player/swfdec-window.c
@@ -86,9 +86,18 @@ swfdec_window_player_aborted (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWin
static void
swfdec_window_player_next_event (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWindow *window)
{
- if (!swfdec_player_is_initialized (player) && swfdec_player_get_next_event (player) < 0)
- swfdec_window_error (window, _("%s is not a Flash file."),
+ gboolean eof, error;
+
+ g_object_get (window->loader, "error", &error, "eof", &eof, NULL);
+ if (error) {
+ swfdec_window_error (window, _("Error loading <i>%s</>."),
+ swfdec_loader_get_filename (window->loader));
+ } else if (!swfdec_player_is_initialized (player) &&
+ swfdec_player_get_next_event (player) < 0 &&
+ eof) {
+ swfdec_window_error (window, _("<i>%s</i> is not a Flash file."),
swfdec_loader_get_filename (window->loader));
+ }
}
static void