swfdec-gnome r110 - trunk/player



Author: otte
Date: Mon Jan 28 18:39:16 2008
New Revision: 110
URL: http://svn.gnome.org/viewvc/swfdec-gnome?rev=110&view=rev

Log:
make the error messages work with current Swfdec

Modified:
   trunk/player/swfdec-window.c

Modified: trunk/player/swfdec-window.c
==============================================================================
--- trunk/player/swfdec-window.c	(original)
+++ trunk/player/swfdec-window.c	Mon Jan 28 18:39:16 2008
@@ -79,27 +79,15 @@
 static void
 swfdec_window_player_aborted (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWindow *window)
 {
-  if (swfdec_as_context_is_aborted (SWFDEC_AS_CONTEXT (player)))
-    swfdec_window_error (window, _("Broken Flash file, playback aborted."));
-}
-
-static void
-swfdec_window_player_next_event (SwfdecPlayer *player, GParamSpec *pspec, SwfdecWindow *window)
-{
-#if 0
-  gboolean eof, error;
-
-  g_object_get (window->loader, "error", &error, "eof", &eof, NULL);
-  if (error) {
-    swfdec_window_error (window, _("Error loading <i>%s</i>."), 
-	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));
+  if (swfdec_as_context_is_aborted (SWFDEC_AS_CONTEXT (player))) {
+    char *name = swfdec_url_format_for_display (swfdec_player_get_url (player));
+    if (swfdec_player_is_initialized (player)) {
+      swfdec_window_error (window, _("<i>%s</i> is broken, playback aborted."), name);
+    } else {
+      swfdec_window_error (window, _("<i>%s</i> is not a Flash file."), name);
+    }
+    g_free (name);
   }
-#endif
 }
 
 static void
@@ -114,7 +102,6 @@
     gtk_recent_manager_add_full (gtk_recent_manager_get_default (),
 	swfdec_url_get_url (swfdec_player_get_url (window->player)),
 	&data);
-    g_signal_handlers_disconnect_by_func (player, swfdec_window_player_next_event, window);
   }
   g_free (data.app_exec);
 }
@@ -148,8 +135,6 @@
       G_CALLBACK (swfdec_window_player_aborted), window);
   g_signal_connect (window->player, "notify::initialized", 
       G_CALLBACK (swfdec_window_player_initialized), window);
-  g_signal_connect (window->player, "notify::next-event", 
-      G_CALLBACK (swfdec_window_player_next_event), window);
   u = swfdec_url_new_from_input (url);
   swfdec_player_set_url (window->player, u);
   s = swfdec_url_format_for_display (u);



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