gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash gui/kde.cpp gui/kde_glue_agg.cpp gui/kde_...


From: Rob Savoye
Subject: [Gnash-commit] gnash gui/kde.cpp gui/kde_glue_agg.cpp gui/kde_...
Date: Thu, 29 Nov 2007 03:47:06 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/11/29 03:47:06

Modified files:
        gui            : kde.cpp kde_glue_agg.cpp kde_glue.h 
                         kde_glue_agg.h kdesup.h 
        .              : ChangeLog 
        macros         : agg.m4 qt.m4 qtopia.m4 
        gui/am-frag    : kde.am qtopia.am 

Log message:
                * configure.ac: Remove duplicate AC_DEFINE of HAVE_QTOPIA.
                * macros/agg.m4: Put double quotes around sub-shell invocation 
to
                avoid problems with the buggy bash.
                * macros/qt.m4: Cleanup hpw the version number gets set from
                QTDIR.
                * macros/qtopia.m4: Add more modules to qt_headers.
                * gui/kde.cpp: Add support for Qt2.
                * gui/kdesup.h.cpp: Add support for Qt2.
                * gui/kde_glue.h: Add initial support for Qt4.
                * gui/kde_glue_agg.{cpp,h}:  Add initial support for Qt4.
                * gui/am-frag/qtopia.am: Add support for Qt2, and Qtopia.
                * gui/am-frag/kde.am: Add support for the QT4 Qt3Support module.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde.cpp?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde_glue_agg.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde_glue.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde_glue_agg.h?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kdesup.h?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5007&r2=1.5008
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/agg.m4?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/qt.m4?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/qtopia.m4?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/am-frag/kde.am?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/am-frag/qtopia.am?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: gui/kde.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/kde.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- gui/kde.cpp 12 Nov 2007 18:27:46 -0000      1.25
+++ gui/kde.cpp 29 Nov 2007 03:47:04 -0000      1.26
@@ -25,11 +25,15 @@
 #include <qwidget.h>
 #include <qmessagebox.h>
 #include <qcursor.h>
+//#ifdef HAVE_KDE
 #include <qxembed.h>
+//#endif
 #include <qnamespace.h>
 #include <qtimer.h>
+#include <qcursor.h>
+#if GNASH_QT_VERSION > 2
 #include <qeventloop.h>
-
+#endif
 #include "Range2d.h"
 
 #include "gnash.h"
@@ -62,11 +66,12 @@
 //    GNASH_REPORT_FUNCTION;
     _qapp.reset(new QApplication(argc, *argv));
     _qwidget.reset(new qwidget(this)); 
+#ifdef HAVE_KDE
     if (_xid) {
         QXEmbed::initialize();
         QXEmbed::embedClientIntoWindow(_qwidget.get(), _xid);
     }
-
+#endif
     _glue.init (argc, argv);
     
     return true;
@@ -132,10 +137,18 @@
 {
     switch(newcursor) {
         case CURSOR_HAND:
+#if QT_VERSION > 2312
             _qwidget->setCursor(Qt::PointingHandCursor);
+#else
+            _qwidget->setCursor(PointingHandCursor);
+#endif
             break;
         case CURSOR_INPUT:
+#if QT_VERSION > 2312
             _qwidget->setCursor(Qt::IbeamCursor); 
+#else
+            _qwidget->setCursor(IbeamCursor); 
+#endif
             break;
         default:
             _qwidget->unsetCursor(); 
@@ -222,7 +235,9 @@
         } table[] = {
             { Qt::Key_Backspace, gnash::key::BACKSPACE },
             { Qt::Key_Tab, gnash::key::TAB },
+#if QT_VERSION > 2312
             { Qt::Key_Clear, gnash::key::CLEAR },
+#endif
             { Qt::Key_Return, gnash::key::ENTER },
             { Qt::Key_Enter, gnash::key::ENTER },
 
@@ -305,7 +320,9 @@
 void
 KdeGui::quit()
 {
+#if QT_VERSION > 2312
     _qapp->eventLoop()->exit();
+#endif
 }
 
 
@@ -431,11 +448,13 @@
     Gui::advance_movie(_godfather);
 }
 
+#if QT_VERSION > 2312
 void
 qwidget::contextMenuEvent(QContextMenuEvent*)
 {
     _qmenu.exec(QCursor::pos());
 }
+#endif
 
 void
 qwidget::mousePressEvent(QMouseEvent* /* event */)

Index: gui/kde_glue_agg.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/kde_glue_agg.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- gui/kde_glue_agg.cpp        15 Oct 2007 12:31:33 -0000      1.7
+++ gui/kde_glue_agg.cpp        29 Nov 2007 03:47:04 -0000      1.8
@@ -15,13 +15,23 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: kde_glue_agg.cpp,v 1.7 2007/10/15 12:31:33 udog Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 
 #include "kde_glue_agg.h"
 #include "render_handler.h"
 #include "render_handler_agg.h"
+#if GNASH_QT_VERSION == 4
+#include <Qt/qpixmap.h>
+#include <Qt/qcolor.h>
+#include <Qt/Qt3Support>
+#else
 #include <qpixmap.h>
 #include <qcolor.h>
+#endif
 
 namespace gnash
 {
@@ -94,8 +104,9 @@
 {
     // In order to use our buffer in QT, we must copy it into a pixmap. This is
     // an expensive operation, but, as far as I can see, the only way to do it.
+#if HAVE_QTOPIA > 2
     QPixmap qpixmap(*_qimage);
-
+#endif
     for (unsigned bno=0; bno < _drawbounds.size(); bno++) {
        geometry::Range2d<int>& bounds = _drawbounds[bno];
 
@@ -105,8 +116,10 @@
        QRect src_rect(bounds.getMinX(), bounds.getMinY(), bounds.width(),
                       bounds.height());
        
+#if HAVE_QTOPIA > 2
        bitBlt (_drawing_area, dest_point, &qpixmap, src_rect, Qt::CopyROP,
                true /* ignore mask */ );
+#endif
     }
 }
 

Index: gui/kde_glue.h
===================================================================
RCS file: /sources/gnash/gnash/gui/kde_glue.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- gui/kde_glue.h      1 Jul 2007 10:54:03 -0000       1.13
+++ gui/kde_glue.h      29 Nov 2007 03:47:04 -0000      1.14
@@ -15,15 +15,17 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-//
-//
-
-
-/* $Id: kde_glue.h,v 1.13 2007/07/01 10:54:03 bjacques Exp $ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "gnash.h"
 
-#include <qwidget.h>
+#if GNASH_QT_VERSION == 4
+# include <Qt/qwidget.h>
+#else
+# include <qwidget.h>
+#endif
 #include "snappingrange.h"
 
 namespace gnash

Index: gui/kde_glue_agg.h
===================================================================
RCS file: /sources/gnash/gnash/gui/kde_glue_agg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gui/kde_glue_agg.h  1 Jul 2007 10:54:03 -0000       1.3
+++ gui/kde_glue_agg.h  29 Nov 2007 03:47:05 -0000      1.4
@@ -15,8 +15,17 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if GNASH_QT_VERSION == 4
+# include <QtGui/QImage>
+#else
+# include <qimage.h>
+#endif
+
 #include "kde_glue.h"
-#include <qimage.h>
 #include <boost/scoped_array.hpp>
 
 

Index: gui/kdesup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/kdesup.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- gui/kdesup.h        12 Nov 2007 18:27:46 -0000      1.21
+++ gui/kdesup.h        29 Nov 2007 03:47:05 -0000      1.22
@@ -15,9 +15,6 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// 
-//
-
 #ifndef __KDESUP_H__
 #define __KDESUP_H__
 
@@ -60,7 +57,9 @@
     qwidget(KdeGui* godfather);
     void setInterval(unsigned int interval);
 protected:
+#if QT_VERSION > 2312
     void contextMenuEvent(QContextMenuEvent *event);
+#endif
     void mousePressEvent(QMouseEvent *event);
     void mouseReleaseEvent( QMouseEvent * );
     void mouseMoveEvent(QMouseEvent *event);

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5007
retrieving revision 1.5008
diff -u -b -r1.5007 -r1.5008
--- ChangeLog   29 Nov 2007 00:40:20 -0000      1.5007
+++ ChangeLog   29 Nov 2007 03:47:05 -0000      1.5008
@@ -1,3 +1,18 @@
+2007-11-28  Rob Savoye  <address@hidden>
+
+       * configure.ac: Remove duplicate AC_DEFINE of HAVE_QTOPIA.
+       * macros/agg.m4: Put double quotes around sub-shell invocation to
+       avoid problems with the buggy bash.
+       * macros/qt.m4: Cleanup hpw the version number gets set from
+       QTDIR.
+       * macros/qtopia.m4: Add more modules to qt_headers.
+       * gui/kde.cpp: Add support for Qt2.
+       * gui/kdesup.h.cpp: Add support for Qt2.
+       * gui/kde_glue.h: Add initial support for Qt4.
+       * gui/kde_glue_agg.{cpp,h}:  Add initial support for Qt4.
+       * gui/am-frag/qtopia.am: Add support for Qt2, and Qtopia.
+       * gui/am-frag/kde.am: Add support for the QT4 Qt3Support module.
+       
 2007-11-29 Sandro Santilli <address@hidden>
 
        * libbase/jpeg.{cpp,h}: use setjmp/longjmp from custom error handler

Index: macros/agg.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/agg.m4,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- macros/agg.m4       29 Nov 2007 00:12:36 -0000      1.31
+++ macros/agg.m4       29 Nov 2007 03:47:05 -0000      1.32
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: agg.m4,v 1.31 2007/11/29 00:12:36 nihilus Exp $
+dnl $Id: agg.m4,v 1.32 2007/11/29 03:47:05 rsavoye Exp $
 
 dnl agg_rasterizer_compound_aa.h is a new file included in AGG 2.4,
 dnl but not in AGG 2.3. As we need AGG 2.4, we use this as 
@@ -39,11 +39,11 @@
   if test x$cross_compiling = xno; then
     if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_agg_incl}" = x; then
       if $PKG_CONFIG --exists libagg ; then
-        ac_cv_path_agg_incl=`$PKG_CONFIG --cflags libagg`
+        ac_cv_path_agg_incl="`$PKG_CONFIG --cflags libagg`"
         $PKG_CONFIG --atleast-version 2.5.0 libagg && agg25=yes
  
         dnl I think this setting of agg_include_dir is too error prone!
-        agg_include_dir=`$PKG_CONFIG --cflags-only-I libagg | cut -d " " -f 1 
| sed -e 's/-I//g'`
+        agg_include_dir="`$PKG_CONFIG --cflags-only-I libagg | cut -d " " -f 1 
| sed -e 's/-I//g'`"
         if test -f $agg_include_dir/agg_gradient_lut.h ; then
           agg25=yes
         fi
@@ -86,7 +86,7 @@
   pkg=no
   if test x$cross_compiling = xno; then
     if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_agg_lib}" = x; then
-      $PKG_CONFIG --exists libagg && ac_cv_path_agg_lib=`$PKG_CONFIG 
--libs-only-l libagg`
+      $PKG_CONFIG --exists libagg && ac_cv_path_agg_lib="`$PKG_CONFIG 
--libs-only-l libagg`"
       $PKG_CONFIG --exists libagg && 
ac_cv_path_agg_lib="${ac_cv_path_agg_lib}`$PKG_CONFIG --libs-only-l libagg`"
       $PKG_CONFIG --exists libagg && pkg=yes
     fi

Index: macros/qt.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/qt.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- macros/qt.m4        29 Nov 2007 00:40:21 -0000      1.2
+++ macros/qt.m4        29 Nov 2007 03:47:05 -0000      1.3
@@ -20,7 +20,7 @@
 dnl 'Qt' subdirectory now. Since it's best for now to handle the path
 dnl changes in the source files so we're concious of the changes, we
 dnl set version flags in config.h and use Automake conditionals to
-dnl force onebehaviour or the other.
+dnl force one behaviour or the other.
 
 AC_DEFUN([GNASH_PATH_QT],
 [
@@ -46,10 +46,14 @@
   if test x$QTDIR != x; then
     if test -f $QTDIR/include/qobject.h; then
       qt_pkg="qt-mt"
+      if test x`basename $QTDIR` = "qt4"; then
+        gnash_qt_version=4
+      else
       if test x`basename $QTDIR` = "qt3"; then
         gnash_qt_version=3
       else
-        gnash_qt_version=4
+          gnash_qt_version=2
+        fi
       fi
     else
       qt_pkg="QtCore"
@@ -128,6 +132,9 @@
     QT_CFLAGS=""
   fi
 
+  dnl we have to define our own config constant for this, even though
+  dnl QT_VERSION exists, the header path it's in changes, so this
+  dnl seemed easier.
   if test x$gnash_qt_version != x; then
     AC_MSG_NOTICE([QT version is $gnash_qt_version])
     dnl due to a weird problem with variable expansion, we have to use
@@ -151,7 +158,7 @@
   AC_ARG_WITH(qt_lib, AC_HELP_STRING([--with-qt-lib], [directory where qt 
libraries are]), with_qt_lib=${withval})
   AC_CACHE_VAL(ac_cv_path_qt_lib, [
     if test x"${with_qt_lib}" != x ; then
-      if test `ls -C1 ${gnash_qt_topdir}/lib/libqt-mt.*| wc -l` -gt 0 ; then
+      if test `ls -C1 ${gnash_qt_topdir}/lib/libqt*-mt.*| wc -l` -gt 0 ; then
        ac_cv_path_qt_lib="-L`(cd ${with_qt_lib}; pwd)` ${qt3support} -lqt-mt"
       else
        AC_MSG_ERROR([${with_qt_lib} directory doesn't contain qt libraries.])

Index: macros/qtopia.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/qtopia.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- macros/qtopia.m4    29 Nov 2007 00:40:21 -0000      1.4
+++ macros/qtopia.m4    29 Nov 2007 03:47:05 -0000      1.5
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: qtopia.m4,v 1.4 2007/11/29 00:40:21 nihilus Exp $
+dnl $Id: qtopia.m4,v 1.5 2007/11/29 03:47:05 rsavoye Exp $
 
 dnl address@hidden pts/8> QtCore  QtSvg Qtnetwork QtXml 
 dnl QtCore: Command not found.
@@ -100,8 +100,13 @@
   fi
   
   dnl this a sanity check for Qtopia 4
+<<<<<<< qtopia.m4
+  qt_headers="QtXml QtGui QtCore QtNetwork QtSql"
+  if test $gnash_qtopia_version -eq 4; then
+=======
   qt_headers="QtXml QtGui QtCore"
   if test "${gnash_qtopia_version} " -eq 4; then
+>>>>>>> 1.4
     if test x"${ac_cv_path_qtopia_incl}" != x; then
       for i in $qt_headers; do
         if ! test -d ${gnash_qtopia_topdir}/qtopiacore/target/include/$i; then
@@ -125,17 +130,17 @@
   fi
   
   dnl the list of Qtopia libs we need
-  qt_libs="qtopiabase qtopia md5 qtopia-sqlite qtopiasecurity"
+  qt_libs="qtopiabase qtopia qpe qt"
 
   if test x"${ac_cv_path_qtopia_lib}" = x; then
     if test x"${ac_cv_path_qtopia_lib}" = x; then
       AC_MSG_CHECKING([for libqtopia library])
-      if test -f $gnash_qtopia_topdir/lib/libqtopiamail.a -o -f 
$gnash_qtopia_topdir/lib/libqtopiamail.${shlibext}; then
+      if test -f $gnash_qtopia_topdir/lib/libqpe.a -o -f 
$gnash_qtopia_topdir/lib/libqpe.${shlibext}; then
         if test ! x"$i" = x"/usr/lib" -a ! x"$i" = x"/usr/lib64"; then
-         ac_cv_path_qtopia_lib="-L$gnash_qtopia_topdir/lib -lqtopiamail"
+         ac_cv_path_qtopia_lib="-L$gnash_qtopia_topdir/lib -lqpe"
          break
         else
-         ac_cv_path_qtopia_lib="-lqtopiamail"
+         ac_cv_path_qtopia_lib="-lqpe"
          break
        fi
       fi
@@ -145,8 +150,13 @@
   
   AC_MSG_CHECKING([Sanity checking the Qtopia installation])
   dnl this a sanity check for Qtopia 2
+<<<<<<< qtopia.m4
+  qt_libs="libqtopia libqpe"
+  if test $gnash_qtopia_version -eq 2; then
+=======
   qt_libs="libqt libqtopia libqpe"
   if test "${gnash_qtopia_version} " -eq 2; then
+>>>>>>> 1.4
     AC_DEFINE([GNASH_QTOPIA_VERSION], 2, [The Qtopia version])
     if test x"${ac_cv_path_qtopia_lib}" != x; then
       for i in $qt_libs; do

Index: gui/am-frag/kde.am
===================================================================
RCS file: /sources/gnash/gnash/gui/am-frag/kde.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/am-frag/kde.am  28 Nov 2007 22:39:09 -0000      1.1
+++ gui/am-frag/kde.am  29 Nov 2007 03:47:06 -0000      1.2
@@ -3,11 +3,11 @@
 # 
 if BUILD_KDE_GUI
 bin_PROGRAMS += kde-gnash
-if HAVE_QT_4
-QT_CFLAGS+="-DQT3_SUPPORT"
-endif
 kde_gnash_CPPFLAGS = -DGUI_KDE -DGUI_CONFIG=\"KDE\" \
         $(AM_CPPFLAGS) $(KDE_CFLAGS) $(QT_CFLAGS)
+if HAVE_QT_4
+kde_gnash_CPPFLAGS += "-DQT3_SUPPORT"
+endif
 kde_gnash_SOURCES = $(GUI_SRCS) gui_kde.cpp
 kde_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic 
 #kde_gnash_DEPENDENCIES = .configline

Index: gui/am-frag/qtopia.am
===================================================================
RCS file: /sources/gnash/gnash/gui/am-frag/qtopia.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/am-frag/qtopia.am       28 Nov 2007 22:39:10 -0000      1.1
+++ gui/am-frag/qtopia.am       29 Nov 2007 03:47:06 -0000      1.2
@@ -3,7 +3,10 @@
 # 
 if BUILD_QTOPIA_GUI
 bin_PROGRAMS += qtopia-gnash
-qtopia_gnash_CPPFLAGS = -DGUI_QTOPIA -DGUI_CONFIG=\"QTOPIA\" \
+if HAVE_QTOPIA_2
+qtopia_gnash_CPPFLAGS = -DQT_QWS_IPAQ -DQWS
+endif
+qtopia_gnash_CPPFLAGS += -DGUI_QTOPIA -DGUI_CONFIG=\"QTOPIA\" \
         $(AM_CPPFLAGS) $(KDE_CFLAGS) $(QT_CFLAGS)
 qtopia_gnash_SOURCES = $(GUI_SRCS) gui_kde.cpp
 qtopia_gnash_LDFLAGS = $(LIBLTDL) -export-dynamic 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]