[Swfdec] 5 commits - libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec_script.h player/Makefile.am test/Makefile.am

Benjamin Otte company at kemper.freedesktop.org
Wed Aug 8 14:30:14 PDT 2007


 libswfdec-gtk/Makefile.am         |    6 ++----
 libswfdec-gtk/swfdec_gtk_widget.c |   13 ++++++++-----
 libswfdec/Makefile.am             |    2 +-
 libswfdec/swfdec_script.h         |    2 --
 player/Makefile.am                |    6 +++---
 test/Makefile.am                  |   10 +++++-----
 6 files changed, 19 insertions(+), 20 deletions(-)

New commits:
diff-tree a52e6ff4dd2e308c031da0434bcdf194b66bbb83 (from eeb38d493a9682147c36977e031c1a064e18591a)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Aug 8 23:30:07 2007 +0200

    more fixes for player == NULL

diff --git a/libswfdec-gtk/swfdec_gtk_widget.c b/libswfdec-gtk/swfdec_gtk_widget.c
index f73e1c7..61cffca 100644
--- a/libswfdec-gtk/swfdec_gtk_widget.c
+++ b/libswfdec-gtk/swfdec_gtk_widget.c
@@ -80,7 +80,7 @@ swfdec_gtk_widget_motion_notify (GtkWidg
 
   gdk_window_get_pointer (gtkwidget->window, &x, &y, NULL);
 
-  if (priv->interactive)
+  if (priv->interactive && priv->player)
     swfdec_player_handle_mouse (priv->player, x, y, priv->button);
   
   return FALSE;
@@ -92,7 +92,7 @@ swfdec_gtk_widget_leave_notify (GtkWidge
   SwfdecGtkWidget *widget = SWFDEC_GTK_WIDGET (gtkwidget);
   SwfdecGtkWidgetPrivate *priv = widget->priv;
 
-  if (priv->interactive) {
+  if (priv->interactive && priv->player) {
     priv->button = 0;
     swfdec_player_handle_mouse (priv->player, event->x, event->y, 0);
   }
@@ -107,7 +107,7 @@ swfdec_gtk_widget_button_press (GtkWidge
 
   if (event->button == 1) {
     priv->button = 1;
-    if (priv->interactive)
+    if (priv->interactive && priv->player)
       swfdec_player_handle_mouse (priv->player, event->x, event->y, 1);
   }
   return FALSE;
@@ -121,7 +121,7 @@ swfdec_gtk_widget_button_release (GtkWid
 
   if (event->button == 1) {
     priv->button = 0;
-    if (priv->interactive)
+    if (priv->interactive && priv->player)
       swfdec_player_handle_mouse (priv->player, event->x, event->y, 0);
   }
   return FALSE;
diff-tree eeb38d493a9682147c36977e031c1a064e18591a (from e8337f10100defddc78508220d4bb4d5dfb7fd74)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Aug 8 22:14:26 2007 +0200

    remove comment belonging to just removed function (oops)

diff --git a/libswfdec/swfdec_script.h b/libswfdec/swfdec_script.h
index 8118922..31ae882 100644
--- a/libswfdec/swfdec_script.h
+++ b/libswfdec/swfdec_script.h
@@ -48,7 +48,6 @@ typedef gboolean (* SwfdecScriptForeachF
 
 /* FIXME: May want to typedef to SwfdecBuffer directly */
 struct _SwfdecScript {
-  /* must be first arg */
   SwfdecBuffer *	buffer;			/* buffer holding the script */
   guint		 	refcount;		/* reference count */
   char *		name;			/* name identifying this script */
diff-tree e8337f10100defddc78508220d4bb4d5dfb7fd74 (from cb7161908a9dc172b8a242b02e2cf0f93db7dfd2)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Aug 8 22:13:13 2007 +0200

    that member is outdated

diff --git a/libswfdec/swfdec_script.h b/libswfdec/swfdec_script.h
index 267aecb..8118922 100644
--- a/libswfdec/swfdec_script.h
+++ b/libswfdec/swfdec_script.h
@@ -49,7 +49,6 @@ typedef gboolean (* SwfdecScriptForeachF
 /* FIXME: May want to typedef to SwfdecBuffer directly */
 struct _SwfdecScript {
   /* must be first arg */
-  gpointer		fun;			/* function script belongs to or NULL */
   SwfdecBuffer *	buffer;			/* buffer holding the script */
   guint		 	refcount;		/* reference count */
   char *		name;			/* name identifying this script */
diff-tree cb7161908a9dc172b8a242b02e2cf0f93db7dfd2 (from 8e5ba3ae854d70bfa2ecd453088af664186f00de)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Aug 8 18:58:55 2007 +0200

    fix no-player-set cases

diff --git a/libswfdec-gtk/swfdec_gtk_widget.c b/libswfdec-gtk/swfdec_gtk_widget.c
index 053308d..f73e1c7 100644
--- a/libswfdec-gtk/swfdec_gtk_widget.c
+++ b/libswfdec-gtk/swfdec_gtk_widget.c
@@ -211,6 +211,8 @@ swfdec_gtk_widget_expose (GtkWidget *gtk
 
   if (event->window != gtkwidget->window)
     return FALSE;
+  if (priv->player == NULL)
+    return FALSE;
 
   if (!priv->renderer_set ||
       (surface = swfdec_gtk_widget_create_renderer (priv->renderer, 
@@ -309,7 +311,8 @@ swfdec_gtk_widget_size_allocate (GtkWidg
 
   gtkwidget->allocation = *allocation;
 
-  swfdec_player_set_size (priv->player, allocation->width, allocation->height);
+  if (priv->player)
+    swfdec_player_set_size (priv->player, allocation->width, allocation->height);
   if (GTK_WIDGET_REALIZED (gtkwidget)) {
     gdk_window_move_resize (gtkwidget->window, 
 	allocation->x, allocation->y, allocation->width, allocation->height);
diff-tree 8e5ba3ae854d70bfa2ecd453088af664186f00de (from f322d58cdb5b8e566b1ea25d3d3d6dc73b209560)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Aug 8 15:33:15 2007 +0200

    remove outdated cruft from makefiles

diff --git a/libswfdec-gtk/Makefile.am b/libswfdec-gtk/Makefile.am
index e5dec9e..5aa9af5 100644
--- a/libswfdec-gtk/Makefile.am
+++ b/libswfdec-gtk/Makefile.am
@@ -8,8 +8,6 @@ CLEANFILES = swfdec_playback.c
 
 lib_LTLIBRARIES = libswfdec-gtk- at SWFDEC_MAJORMINOR@.la
 
-js_cflags = -I$(srcdir)/js/ -I$(top_builddir)/libswfdec/js -DXP_UNIX -DDEBUG
-
 libswfdec_gtk_ at SWFDEC_MAJORMINOR@_la_SOURCES = \
 	swfdec_playback.c \
 	swfdec_source.c \
@@ -23,9 +21,9 @@ noinst_HEADERS = \
 	swfdec_source.h
 
 libswfdec_gtk_ at SWFDEC_MAJORMINOR@_la_CFLAGS = \
-	-I$(top_srcdir) $(js_cflags) $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS) \
+	-I$(top_srcdir) $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS) \
 	$(AUDIO_CFLAGS) $(HTTP_CFLAGS) \
-	-DG_LOG_DOMAIN=\"Swfdec-Gtk\" -DXP_UNIX
+	-DG_LOG_DOMAIN=\"Swfdec-Gtk\"
 libswfdec_gtk_ at SWFDEC_MAJORMINOR@_la_LDFLAGS = \
 	-version-info $(SWFDEC_LIBVERSION) \
 	-export-symbols-regex '^(swfdec_.*)' \
diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am
index c3ca179..2f48811 100644
--- a/libswfdec/Makefile.am
+++ b/libswfdec/Makefile.am
@@ -112,7 +112,7 @@ libswfdec_ at SWFDEC_MAJORMINOR@_la_SOURCES
 
 libswfdec_ at SWFDEC_MAJORMINOR@_la_CFLAGS = \
 	$(GLOBAL_CFLAGS) $(CAIRO_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) \
-	-I$(top_srcdir) -I$(srcdir)/jpeg/ $(js_cflags) $(LIBOIL_CFLAGS) \
+	-I$(top_srcdir) -I$(srcdir)/jpeg/ $(LIBOIL_CFLAGS) \
 	$(GST_CFLAGS) $(FFMPEG_CFLAGS) $(MAD_CFLAGS) \
 	-DG_LOG_DOMAIN=\"Swfdec\"
 libswfdec_ at SWFDEC_MAJORMINOR@_la_LDFLAGS = \
diff --git a/player/Makefile.am b/player/Makefile.am
index 3295db0..ce3d1fe 100644
--- a/player/Makefile.am
+++ b/player/Makefile.am
@@ -22,10 +22,10 @@ noinst_HEADERS = \
 	swfdec_player_manager.h \
 	swfdec_slow_loader.h
 
-swfplay_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_GTK_CFLAGS) $(GNOMEVFS_CFLAGS)
-swfplay_LDFLAGS = $(SWFDEC_GTK_LIBS) $(GTK_LIBS) $(GNOMEVFS_LIBS)
+swfplay_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_GTK_CFLAGS)
+swfplay_LDFLAGS = $(SWFDEC_GTK_LIBS) $(GTK_LIBS)
 
-swfdebug_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_GTK_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+swfdebug_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) $(SWFDEC_GTK_CFLAGS)
 swfdebug_LDFLAGS = $(SWFDEC_GTK_LIBS) $(GTK_LIBS)
 
 
diff --git a/test/Makefile.am b/test/Makefile.am
index a1b7a60..f0a0409 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -8,23 +8,23 @@ else
 noinst_PROGRAMS = swfdec-extract dump parse 
 endif
 
-dump_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+dump_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS)
 dump_LDFLAGS = $(SWFDEC_LIBS) $(CAIRO_LIBS) $(PANGO_LIBS)
 
 parse_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS)
 parse_LDFLAGS = $(SWFDEC_LIBS) $(CAIRO_LIBS)
 
-swfdec_extract_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+swfdec_extract_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS)
 swfdec_extract_LDFLAGS = $(SWFDEC_LIBS) $(CAIRO_LIBS)
 
-libswfedit_la_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+libswfedit_la_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS)
 libswfedit_la_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS)
 
-swfedit_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+swfedit_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS)
 swfedit_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS)
 swfedit_LDADD = libswfedit.la
 
-swfscript_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS) -DXP_UNIX -I$(top_builddir)/libswfdec/js
+swfscript_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(GTK_CFLAGS)
 swfscript_LDFLAGS = $(SWFDEC_LIBS) $(GTK_LIBS)
 swfscript_LDADD = libswfedit.la
 


More information about the Swfdec mailing list