rpms/parole/F-12 parole-0.1.98-browser-plugin-xulrunner-1.9.2.patch, NONE, 1.1 parole-0.1.98-fix-vbox-crash.patch, NONE, 1.1 parole-0.1.98-interface.patch, NONE, 1.1 parole-0.1.98-memleak.patch, NONE, 1.1

Christoph Wickert cwickert at fedoraproject.org
Sun Nov 29 01:02:16 UTC 2009


Author: cwickert

Update of /cvs/pkgs/rpms/parole/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21951/F-12

Added Files:
	parole-0.1.98-browser-plugin-xulrunner-1.9.2.patch 
	parole-0.1.98-fix-vbox-crash.patch 
	parole-0.1.98-interface.patch parole-0.1.98-memleak.patch 
Log Message:
add patches

parole-0.1.98-browser-plugin-xulrunner-1.9.2.patch:
 Makefile.am      |    4 ---
 np_entry.cpp     |    5 ++--
 npn_gate.cpp     |   23 ++++++++++++---------
 npp_gate.cpp     |   55 ++++++++++++++++++++++++++++++++++------------------
 npupp.h          |   58 +++++++++++++++++++------------------------------------
 parole-plugin.c  |   12 +++++------
 parole-plugin.h  |   12 ++++++-----
 plugin.cpp       |    6 ++---
 plugin.h         |    9 ++++----
 plugin_setup.cpp |    2 -
 plugin_setup.h   |    2 -
 plugin_types.cpp |    3 --
 12 files changed, 98 insertions(+), 93 deletions(-)

--- NEW FILE parole-0.1.98-browser-plugin-xulrunner-1.9.2.patch ---
>From 3a276b624edbbe9b6e72101ec8d1893fc854b0af Mon Sep 17 00:00:00 2001
From: Ali <aliov at xfce.org>
Date: Sat, 28 Nov 2009 14:42:28 +0000
Subject: Fix compilation with xulrunner 1.9.2

---
diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index e1230ee..4a78bcc 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -7,7 +7,7 @@ DEFINES = -DMOZILLA_STRICT_API -DXP_UNIX
 # This is probably not the best thing, but the browser plugin 
 # fails to compile with --enable-debug=full so overried CXXFLAGS
 # to get rid of -Wundef -Wredundant-decls -Wmissing-declarations
-CXXFLAGS = -Wall
+CXXFLAGS = -Wall -g -O2 -DXFCE_DISABLE_DEPRECATED
 if DEBUG_BROWSER_PLUGIN
 CXXFLAGS += -Wextra -Wno-missing-field-initializers	\
 	-Wno-unused-parameter 				\
@@ -18,8 +18,6 @@ CXXFLAGS += -Wextra -Wno-missing-field-initializers	\
 	-fstack-protector -O0 -g3 -Werror
 endif
 
-CFLAGS=$(CXXFLAGS)
-
 INCLUDES =                                              \
         -fPIC                                           \
         -I$(top_builddir)                               \
diff --git a/browser-plugin/np_entry.cpp b/browser-plugin/np_entry.cpp
index 3e303c8..8acbe82 100644
--- a/browser-plugin/np_entry.cpp
+++ b/browser-plugin/np_entry.cpp
@@ -39,11 +39,12 @@
 //
 // Main plugin entry point implementation
 //
-#include "npapi.h"
+#include <npapi.h>
+#include <npfunctions.h>
 #include "npupp.h"
 
 #ifndef HIBYTE
-#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8)
+#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
 #endif
 
 NPNetscapeFuncs NPNFuncs;
diff --git a/browser-plugin/npn_gate.cpp b/browser-plugin/npn_gate.cpp
index df3f14a..e3ed16b 100644
--- a/browser-plugin/npn_gate.cpp
+++ b/browser-plugin/npn_gate.cpp
@@ -39,11 +39,12 @@
 //
 // Implementation of Netscape entry points (NPN_*)
 //
-#include "npapi.h"
-#include "npupp.h"
+#include <npapi.h>
+//#include "npupp.h"
+#include <npfunctions.h>
 
 #ifndef HIBYTE
-#define HIBYTE(x) ((((uint32)(x)) & 0xff00) >> 8)
+#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
 #endif
 
 #ifndef LOBYTE
@@ -78,7 +79,7 @@ NPError NPN_GetURL(NPP instance, const char *url, const char *target)
     return rv;
 }
 
-NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uint32 len,
+NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uint32_t len,
                           const char *buf, NPBool file, void *notifyData)
 {
     int navMinorVers = NPNFuncs.version & 0xFF;
@@ -92,7 +93,7 @@ NPError NPN_PostURLNotify(NPP instance, const char *url, const char *window, uin
     return rv;
 }
 
-NPError NPN_PostURL(NPP instance, const char *url, const char *window, uint32 len, const char *buf,
+NPError NPN_PostURL(NPP instance, const char *url, const char *window, uint32_t len, const char *buf,
                     NPBool file)
 {
     NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
@@ -119,10 +120,10 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStrea
     return rv;
 }
 
-int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void *buffer)
+int32_t NPN_Write(NPP instance, NPStream * stream, int32_t len, void *buffer)
 {
     int navMinorVersion = NPNFuncs.version & 0xFF;
-    int32 rv = 0;
+    int32_t rv = 0;
 
     if (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
         rv = NPNFuncs.write(instance, stream, len, buffer);
@@ -157,7 +158,7 @@ const char *NPN_UserAgent(NPP instance)
     return rv;
 }
 
-void *NPN_MemAlloc(uint32 size)
+void *NPN_MemAlloc(uint32_t size)
 {
     void *rv = NULL;
     rv = NPNFuncs.memalloc(size);
@@ -169,9 +170,9 @@ void NPN_MemFree(void *ptr)
     NPNFuncs.memfree(ptr);
 }
 
-uint32 NPN_MemFlush(uint32 size)
+uint32_t NPN_MemFlush(uint32_t size)
 {
-    uint32 rv = NPNFuncs.memflush(size);
+    uint32_t rv = NPNFuncs.memflush(size);
     return rv;
 }
 
@@ -180,6 +181,7 @@ void NPN_ReloadPlugins(NPBool reloadPages)
     NPNFuncs.reloadplugins(reloadPages);
 }
 
+/*
 JRIEnv *NPN_GetJavaEnv(void)
 {
     JRIEnv *rv = NULL;
@@ -193,6 +195,7 @@ jref NPN_GetJavaPeer(NPP instance)
     rv = NPNFuncs.getJavaPeer(instance);
     return rv;
 }
+*/
 
 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
 {
diff --git a/browser-plugin/npp_gate.cpp b/browser-plugin/npp_gate.cpp
index 239765c..3fbb03b 100644
--- a/browser-plugin/npp_gate.cpp
+++ b/browser-plugin/npp_gate.cpp
@@ -64,14 +64,14 @@ void NPP_Shutdown(void)
 // will do all the neccessary job
 NPError NPP_New(NPMIMEType pluginType,
                 NPP instance,
-                uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData * saved)
+                uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData * saved)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
     NPError rv = NPERR_NO_ERROR;
 
-    g_debug ("NPP_New instance");
+    printf("NPP_New called\n");
     CPlugin *pPlugin = new CPlugin(instance);
     if (pPlugin == NULL)
         return NPERR_OUT_OF_MEMORY_ERROR;
@@ -132,6 +132,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow * pNPWindow)
 
     // window resized
     if (pPlugin->isInitialized() && (pNPWindow->window != NULL)) {
+        printf("Window resized\n");
         pPlugin->SetWindow(pNPWindow);
         return NPERR_NO_ERROR;
     }
@@ -161,6 +162,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
         CPlugin *plugin = (CPlugin *) instance->pdata;
         if (plugin == NULL)
             return NPERR_GENERIC_ERROR;
+        //*(NPObject **) value = plugin->GetScriptableObject();
     } else {
         rv = PluginGetValue(variable, value);
     }
@@ -169,7 +171,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
 }
 
 NPError NPP_NewStream(NPP instance,
-                      NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype)
+                      NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
@@ -186,34 +188,36 @@ NPError NPP_NewStream(NPP instance,
     return rv;
 }
 
-int32 NPP_WriteReady(NPP instance, NPStream * stream)
+int32_t NPP_WriteReady(NPP instance, NPStream * stream)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
-    int32 rv = 0x0fffffff;
+    int32_t rv = 0x0fffffff;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
 
     if (pPlugin == NULL)
         return NPERR_GENERIC_ERROR;
 
     rv = pPlugin->WriteReady(stream);
+    // printf("rv = %i\n",rv);
 
     return rv;
 }
 
-int32 NPP_Write(NPP instance, NPStream * stream, int32 offset, int32 len, void *buffer)
+int32_t NPP_Write(NPP instance, NPStream * stream, int32_t offset, int32_t len, void *buffer)
 {
     if (instance == NULL)
         return NPERR_INVALID_INSTANCE_ERROR;
 
-    int32 rv = len;
+    int32_t rv = len;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
 
     if (pPlugin == NULL)
         return NPERR_GENERIC_ERROR;
 
     rv = pPlugin->Write(stream, offset, len, buffer);
+    // printf("rv = %i\n", rv);
     return rv;
 }
 
@@ -236,10 +240,6 @@ void NPP_StreamAsFile(NPP instance, NPStream * stream, const char *fname)
 {
     if (instance == NULL)
         return;
-	
-    CPlugin *pPlugin = (CPlugin *) instance->pdata;
-    
-    pPlugin->StreamAsFile (stream, fname);
 }
 
 void NPP_Print(NPP instance, NPPrint * printInfo)
@@ -271,18 +271,35 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
     return rv;
 }
 
-int16 NPP_HandleEvent(NPP instance, void *event)
+int16_t NPP_HandleEvent(NPP instance, void *event)
 {
     if (instance == NULL)
         return 0;
-
-    int16 rv = 0;
-    /*
+/*
+    int16_t rv = 0;
     CPlugin *pPlugin = (CPlugin *) instance->pdata;
-    
     if (pPlugin)
-	rv = pPlugin->handleEvent(event);
-    */
+        rv = pPlugin->handleEvent(event);
+*/
+    return 0;
+}
 
-    return rv;
+/*
+jref NPP_GetJavaClass (void)
+{
+  return NULL;
+}
+*/
+
+NPObject *NPP_GetScriptableInstance(NPP instance)
+{
+    if (!instance)
+        return 0;
+/*
+    NPObject *npobj = 0;
+    CPlugin *pPlugin = (CPlugin *) instance->pdata;
+    if (!pPlugin)
+        npobj = pPlugin->GetScriptableObject();
+*/
+    return 0;
 }
diff --git a/browser-plugin/npupp.h b/browser-plugin/npupp.h
index a8ccaaf..9d1f25b 100644
--- a/browser-plugin/npupp.h
+++ b/browser-plugin/npupp.h
@@ -59,8 +59,6 @@
 
 #include "npruntime.h"
 
-#include "jri.h"
-
 
 /******************************************************************************************
    plug-in function table macros
@@ -86,8 +84,8 @@ typedef void (*NP_LOADDS NPP_ShutdownUPP) (void);
 		(*(FUNC))()
 
 /* NPP_New */
-typedef NPError(*NP_LOADDS NPP_NewUPP) (NPMIMEType pluginType, NPP instance, uint16 mode,
-                                        int16 argc, char *argn[], char *argv[],
+typedef NPError(*NP_LOADDS NPP_NewUPP) (NPMIMEType pluginType, NPP instance, uint16_t mode,
+                                        int16_t argc, char *argn[], char *argv[],
                                         NPSavedData * saved);
 #define NewNPP_NewProc(FUNC)		\
 		((NPP_NewUPP) (FUNC))
@@ -110,7 +108,7 @@ typedef NPError(*NP_LOADDS NPP_SetWindowUPP) (NPP instance, NPWindow * window);
 
 /* NPP_NewStream */
 typedef NPError(*NP_LOADDS NPP_NewStreamUPP) (NPP instance, NPMIMEType type, NPStream * stream,
-                                              NPBool seekable, uint16 * stype);
+                                              NPBool seekable, uint16_t * stype);
 #define NewNPP_NewStreamProc(FUNC)		\
 		((NPP_NewStreamUPP) (FUNC))
 #define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
@@ -124,14 +122,14 @@ typedef NPError(*NP_LOADDS NPP_DestroyStreamUPP) (NPP instance, NPStream * strea
 		(*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg))
 
 /* NPP_WriteReady */
-typedef int32(*NP_LOADDS NPP_WriteReadyUPP) (NPP instance, NPStream * stream);
+typedef int32_t(*NP_LOADDS NPP_WriteReadyUPP) (NPP instance, NPStream * stream);
 #define NewNPP_WriteReadyProc(FUNC)		\
 		((NPP_WriteReadyUPP) (FUNC))
 #define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)		\
 		(*(FUNC))((NPParg), (NPStreamPtr))
 
 /* NPP_Write */
-typedef int32(*NP_LOADDS NPP_WriteUPP) (NPP instance, NPStream * stream, int32 offset, int32 len,
+typedef int32_t(*NP_LOADDS NPP_WriteUPP) (NPP instance, NPStream * stream, int32_t offset, int32_t len,
                                         void *buffer);
 #define NewNPP_WriteProc(FUNC)		\
 		((NPP_WriteUPP) (FUNC))
@@ -153,7 +151,7 @@ typedef void (*NP_LOADDS NPP_PrintUPP) (NPP instance, NPPrint * platformPrint);
 		(*(FUNC))((NPParg), (NPPrintArg))
 
 /* NPP_HandleEvent */
-typedef int16(*NP_LOADDS NPP_HandleEventUPP) (NPP instance, void *event);
+typedef int16_t(*NP_LOADDS NPP_HandleEventUPP) (NPP instance, void *event);
 #define NewNPP_HandleEventProc(FUNC)		\
 		((NPP_HandleEventUPP) (FUNC))
 #define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)		\
@@ -210,7 +208,7 @@ typedef NPError(*NP_LOADDS NPN_GetURLNotifyUPP) (NPP instance, const char *url,
 
 /* NPN_PostUrlNotify */
 typedef NPError(*NP_LOADDS NPN_PostURLNotifyUPP) (NPP instance, const char *url, const char *window,
-                                                  uint32 len, const char *buf, NPBool file,
+                                                  uint32_t len, const char *buf, NPBool file,
                                                   void *notifyData);
 #define NewNPN_PostURLNotifyProc(FUNC)		\
 		((NPN_PostURLNotifyUPP) (FUNC))
@@ -226,7 +224,7 @@ typedef NPError(*NP_LOADDS NPN_GetURLUPP) (NPP instance, const char *url, const
 
 /* NPN_PostUrl */
 typedef NPError(*NP_LOADDS NPN_PostURLUPP) (NPP instance, const char *url, const char *window,
-                                            uint32 len, const char *buf, NPBool file);
+                                            uint32_t len, const char *buf, NPBool file);
 #define NewNPN_PostURLProc(FUNC)		\
 		((NPN_PostURLUPP) (FUNC))
 #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
@@ -248,7 +246,7 @@ typedef NPError(*NP_LOADDS NPN_NewStreamUPP) (NPP instance, NPMIMEType type, con
 		(*(FUNC))((npp), (type), (window), (stream))
 
 /* NPN_Write */
-typedef int32(*NP_LOADDS NPN_WriteUPP) (NPP instance, NPStream * stream, int32 len, void *buffer);
+typedef int32_t(*NP_LOADDS NPN_WriteUPP) (NPP instance, NPStream * stream, int32_t len, void *buffer);
 #define NewNPN_WriteProc(FUNC)		\
 		((NPN_WriteUPP) (FUNC))
 #define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)		\
@@ -276,7 +274,7 @@ typedef const char *(*NP_LOADDS NPN_UserAgentUPP) (NPP instance);
                 (*(FUNC))((ARG1))
 
 /* NPN_MemAlloc */
-typedef void *(*NP_LOADDS NPN_MemAllocUPP) (uint32 size);
+typedef void *(*NP_LOADDS NPN_MemAllocUPP) (uint32_t size);
 #define NewNPN_MemAllocProc(FUNC)		\
 		((NPN_MemAllocUPP) (FUNC))
 #define CallNPN_MemAllocProc(FUNC, ARG1)		\
@@ -290,7 +288,7 @@ typedef void (*NP_LOADDS NPN_MemFreeUPP) (void *ptr);
 		(*(FUNC))((ARG1))
 
 /* NPN_MemFlush */
-typedef uint32(*NP_LOADDS NPN_MemFlushUPP) (uint32 size);
+typedef uint32_t(*NP_LOADDS NPN_MemFlushUPP) (uint32_t size);
 #define NewNPN_MemFlushProc(FUNC)		\
 		((NPN_MemFlushUPP) (FUNC))
 #define CallNPN_MemFlushProc(FUNC, ARG1)		\
@@ -303,20 +301,6 @@ typedef void (*NP_LOADDS NPN_ReloadPluginsUPP) (NPBool reloadPages);
 #define CallNPN_ReloadPluginsProc(FUNC, ARG1)		\
 		(*(FUNC))((ARG1))
 
-/* NPN_GetJavaEnv */
-typedef JRIEnv *(*NP_LOADDS NPN_GetJavaEnvUPP) (void);
-#define NewNPN_GetJavaEnvProc(FUNC)		\
-		((NPN_GetJavaEnvUPP) (FUNC))
-#define CallNPN_GetJavaEnvProc(FUNC)		\
-		(*(FUNC))()
-
-/* NPN_GetJavaPeer */
-typedef jref(*NP_LOADDS NPN_GetJavaPeerUPP) (NPP instance);
-#define NewNPN_GetJavaPeerProc(FUNC)		\
-		((NPN_GetJavaPeerUPP) (FUNC))
-#define CallNPN_GetJavaPeerProc(FUNC, ARG1)		\
-		(*(FUNC))((ARG1))
-
 /* NPN_InvalidateRect */
 typedef void (*NP_LOADDS NPN_InvalidateRectUPP) (NPP instance, NPRect * rect);
 #define NewNPN_InvalidateRectProc(FUNC)		\
@@ -376,7 +360,7 @@ typedef NPUTF8 *(*NP_LOADDS NPN_UTF8FromIdentifierUPP) (NPIdentifier identifier)
 		(*(FUNC))((ARG1))
 
 /* NPN_IntFromIdentifier */
-typedef int32_t(*NP_LOADDS NPN_IntFromIdentifierUPP) (NPIdentifier identifier);
+typedef int32_t (*NP_LOADDS NPN_IntFromIdentifierUPP) (NPIdentifier identifier);
 #define NewNPN_IntFromIdentifierProc(FUNC)		\
 		((NPN_IntFromIdentifierUPP) (FUNC))
 #define CallNPN_IntFromIdentifierProc(FUNC, ARG1)		\
@@ -522,10 +506,10 @@ typedef bool(*NP_LOADDS NPN_ConstructUPP) (NPP npp, NPObject * obj, const NPVari
 /******************************************************************************************
  * The actual plugin function table definitions
  *******************************************************************************************/
-
+#ifdef DISABLE_THIS
 typedef struct _NPPluginFuncs {
-    uint16 size;
-    uint16 version;
+    uint16_t size;
+    uint16_t version;
     NPP_NewUPP newp;
     NPP_DestroyUPP destroy;
     NPP_SetWindowUPP setwindow;
@@ -543,8 +527,8 @@ typedef struct _NPPluginFuncs {
 } NPPluginFuncs;
 
 typedef struct _NPNetscapeFuncs {
-    uint16 size;
-    uint16 version;
+    uint16_t size;
+    uint16_t version;
     NPN_GetURLUPP geturl;
     NPN_PostURLUPP posturl;
     NPN_RequestReadUPP requestread;
@@ -591,7 +575,7 @@ typedef struct _NPNetscapeFuncs {
     // NPN_PluginThreadAsyncCallUPP pluginthreadasynccall;
     // NPN_ConstructUPP construct;
 } NPNetscapeFuncs;
-
+#endif
 
 #ifdef XP_MACOSX
 /******************************************************************************************
@@ -625,11 +609,11 @@ enum {
 };
 
 typedef struct _BPSupportedMIMETypes {
-    SInt32 structVersion;       /* struct version */
+    Sint32_t structVersion;       /* struct version */
     Handle typeStrings;         /* STR# formated handle, allocated by plug-in */
     Handle infoStrings;         /* STR# formated handle, allocated by plug-in */
 } BPSupportedMIMETypes;
-OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes * mimeInfo, UInt32 flags);
+OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes * mimeInfo, Uint32_t flags);
 
  /* NP_GetMIMEDescription */
 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
@@ -640,7 +624,7 @@ typedef const char *(*NP_LOADDS NP_GetMIMEDescriptionUPP) ();
 		(*(FUNC))()
 
 /* BP_GetSupportedMIMETypes */
-typedef OSErr(*NP_LOADDS BP_GetSupportedMIMETypesUPP) (BPSupportedMIMETypes *, UInt32);
+typedef OSErr(*NP_LOADDS BP_GetSupportedMIMETypesUPP) (BPSupportedMIMETypes *, Uint32_t);
 #define NewBP_GetSupportedMIMETypesEntryProc(FUNC)		\
 		((BP_GetSupportedMIMETypesUPP) (FUNC))
 #define CallBP_GetMIMEDescEntryProc(FUNC,  mimeInfo, flags)		\
diff --git a/browser-plugin/parole-plugin.c b/browser-plugin/parole-plugin.c
index 2ec8d8d..30e8609 100644
--- a/browser-plugin/parole-plugin.c
+++ b/browser-plugin/parole-plugin.c
@@ -36,7 +36,7 @@
 
 #include "parole-plugin.h"
 
-int32 STREAMBUFSIZE = 0x0FFFFFFF;
+static int32_t STREAMBUFSIZE = 0x0FFFFFFF;
 
 static void parole_plugin_finalize   (GObject *object);
 
@@ -425,7 +425,7 @@ void parole_plugin_stream_as_file (ParolePlugin *plugin,
     g_debug ("StreamAsFile url=%s fname=%s", stream->url, fname);
 }
 
-int32 parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
+int32_t parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
 {
     g_debug ("WriteReady url=%s", stream->url);
     
@@ -438,13 +438,13 @@ int32 parole_plugin_write_ready	(ParolePlugin *plugin, NPStream *stream)
     return  plugin->player_ready ? STREAMBUFSIZE  : 0;
 }
 								 
-int32 parole_plugin_write (ParolePlugin *plugin, 
+int32_t parole_plugin_write (ParolePlugin *plugin, 
 			   NPStream * stream, 
-			   int32 offset, 
-			   int32 len, 
+			   int32_t offset, 
+			   int32_t len, 
 			   void *buffer)
 {
-    static int32 wrotebytes = -1;
+    static int32_t wrotebytes = -1;
     
     if ( plugin->checked == FALSE )
     {
diff --git a/browser-plugin/parole-plugin.h b/browser-plugin/parole-plugin.h
index 75aee42..daee5a3 100644
--- a/browser-plugin/parole-plugin.h
+++ b/browser-plugin/parole-plugin.h
@@ -25,7 +25,9 @@
 
 #include <npapi.h>
 #include <npruntime.h>
-#include "npupp.h"
+#include <npfunctions.h>
+
+#include <stdint.h>
 
 G_BEGIN_DECLS
 
@@ -62,13 +64,13 @@ void				parole_plugin_stream_as_file	(ParolePlugin *plugin,
 								 NPStream *stream,
 								 const gchar *fname);
 
-int32				parole_plugin_write_ready	(ParolePlugin *plugin,
+int32_t				parole_plugin_write_ready	(ParolePlugin *plugin,
 								 NPStream *stream);
 								 
-int32   			parole_plugin_write             (ParolePlugin *plugin,
+int32_t   			parole_plugin_write             (ParolePlugin *plugin,
 								 NPStream * stream, 
-								 int32 offset, 
-								 int32 len, 
+								 int32_t offset, 
+								 int32_t len, 
 								 void *buffer);
 
 G_END_DECLS
diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp
index ccde40d..d44104d 100644
--- a/browser-plugin/plugin.cpp
+++ b/browser-plugin/plugin.cpp
@@ -107,7 +107,7 @@ NPBool CPlugin::isInitialized()
     return mInitialized;
 }
 
-NPError CPlugin::NewStream (NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype)
+NPError CPlugin::NewStream (NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype)
 {
     return parole_plugin_new_stream (plugin, stream, type);
 }
@@ -127,12 +127,12 @@ void CPlugin::StreamAsFile  (NPStream * stream, const char *fname)
     parole_plugin_stream_as_file (plugin, stream, fname);
 }
 
-int32 CPlugin::WriteReady (NPStream * stream)
+int32_t CPlugin::WriteReady (NPStream * stream)
 {
     return parole_plugin_write_ready (plugin, stream);
 }
     
-int32 CPlugin::Write (NPStream * stream, int32 offset, int32 len, void *buffer)
+int32_t CPlugin::Write (NPStream * stream, int32_t offset, int32_t len, void *buffer)
 {
     return parole_plugin_write (plugin, stream, offset, len, buffer);
 }
diff --git a/browser-plugin/plugin.h b/browser-plugin/plugin.h
index 9a1bce1..29e0318 100644
--- a/browser-plugin/plugin.h
+++ b/browser-plugin/plugin.h
@@ -45,6 +45,7 @@
 #include <X11/Xlib.h>
 
 #include <glib.h>
+#include <stdint.h>
 
 #include "parole-plugin.h"
 
@@ -65,17 +66,17 @@ class CPlugin {
     NPError GetValue 	  (NPPVariable variable, void *value);
     
     NPError SetWindow 	  (NPWindow * aWindow);
-    NPError NewStream     (NPMIMEType type, NPStream * stream, NPBool seekable, uint16 * stype);
+    NPError NewStream     (NPMIMEType type, NPStream * stream, NPBool seekable, uint16_t * stype);
     NPError DestroyStream (NPStream * stream, NPError reason);
     void    URLNotify     (const char *url, NPReason reason, void *notifyData);
     void    StreamAsFile  (NPStream * stream, const char *fname);
-    int32   WriteReady    (NPStream * stream);
-    int32   Write         (NPStream * stream, int32 offset, int32 len, void *buffer);
+    int32_t WriteReady    (NPStream * stream);
+    int32_t Write         (NPStream * stream, int32_t offset, int32_t len, void *buffer);
     
   public:
     ParolePlugin    *plugin;
     NPP mInstance;
-    uint16 mode;
+    uint16_t mode;
     gchar *mimetype;
 };
 
diff --git a/browser-plugin/plugin_setup.cpp b/browser-plugin/plugin_setup.cpp
index f6f0f19..735de4b 100644
--- a/browser-plugin/plugin_setup.cpp
+++ b/browser-plugin/plugin_setup.cpp
@@ -39,7 +39,7 @@
 #include "plugin_setup.h"
 
 // void new_instance(CPlugin * instance, nsPluginCreateData * parameters)
-void new_instance(CPlugin * instance, int16 argc, char *argn[], char *argv[])
+void new_instance(CPlugin * instance, int16_t argc, char *argn[], char *argv[])
 {
 }
 
diff --git a/browser-plugin/plugin_setup.h b/browser-plugin/plugin_setup.h
index 6626cdd..7f739ec 100644
--- a/browser-plugin/plugin_setup.h
+++ b/browser-plugin/plugin_setup.h
@@ -38,7 +38,7 @@
 #ifndef _PLUGIN_SETUP_H
 #define _PLUGIN_SETUP_H
 
-void new_instance(CPlugin * instance, int16 argc, char *argn[], char *argv[]);
+void new_instance(CPlugin * instance, int16_t argc, char *argn[], char *argv[]);
 gint streaming(gchar * url);
 
 #endif                          // _PLUGIN_SETUP_H
diff --git a/browser-plugin/plugin_types.cpp b/browser-plugin/plugin_types.cpp
index 4bd7c14..9b6f06a 100644
--- a/browser-plugin/plugin_types.cpp
+++ b/browser-plugin/plugin_types.cpp
@@ -122,7 +122,7 @@ NPError PluginGetValue(NPPVariable variable, void *value)
     }
 
     if (variable == NPPVpluginNeedsXEmbed) {
-        *((PRBool *) value) = PR_TRUE;
+        *((bool *) value) = TRUE;
     }
 
     if ((variable != NPPVpluginNameString)
--
cgit v0.8.2.1

parole-0.1.98-fix-vbox-crash.patch:
 parole-disc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE parole-0.1.98-fix-vbox-crash.patch ---
>From c621509e57d326d3134ea61cf783f2d9d311e5db Mon Sep 17 00:00:00 2001
From: Ali <aliov at xfce.org>
Date: Sat, 28 Nov 2009 14:41:29 +0000
Subject: Fix bug #6039 concerning the crash on a virtual box.

---
diff --git a/src/parole-disc.c b/src/parole-disc.c
index 5f0e3bc..20bf506 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -145,7 +145,7 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
     gchar **content_type;
     guint i;
     ParoleDiscKind kind;
-    gchar *uri;
+    gchar *uri = NULL;
     
     file = g_mount_get_root (mount);
     
@@ -202,7 +202,8 @@ got_cdda:
 	label = g_strdup_printf ("%s '%s'", _("Play Disc"), name);
 	
 	data = parole_disc_get_mount_data (disc, label, uri, device, kind);
-	g_free (uri);
+	if ( uri )
+	    g_free (uri);
 	
 	g_ptr_array_add (disc->priv->array, data);
 	g_free (label);
--
cgit v0.8.2.1

parole-0.1.98-interface.patch:
 parole.ui |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE parole-0.1.98-interface.patch ---
>From d61475feacd41630cb481f10dbebbb3865a40f61 Mon Sep 17 00:00:00 2001
From: Ali <aliov at xfce.org>
Date: Sat, 28 Nov 2009 14:43:03 +0000
Subject: Minor changes in the interface.

---
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 8d7eb7d..0437185 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -628,7 +628,7 @@
                           </object>
                           <packing>
                             <property name="resize">True</property>
-                            <property name="shrink">True</property>
+                            <property name="shrink">False</property>
                           </packing>
                         </child>
                         <child>
@@ -637,10 +637,11 @@
                             <property name="can_focus">True</property>
                             <property name="show_border">False</property>
                             <property name="scrollable">True</property>
+                            <property name="enable_popup">True</property>
                           </object>
                           <packing>
                             <property name="resize">False</property>
-                            <property name="shrink">True</property>
+                            <property name="shrink">False</property>
                           </packing>
                         </child>
                       </object>
--
cgit v0.8.2.1

parole-0.1.98-memleak.patch:
 parole-gst.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

--- NEW FILE parole-0.1.98-memleak.patch ---
>From aa68a2cb5e6c8162679992b5f979bf4b1d24001c Mon Sep 17 00:00:00 2001
From: Ali Abdallah <aliov at xfce.org>
Date: Sat, 28 Nov 2009 15:21:23 +0000
Subject: Fix a memory leak+reload the logo when the theme is changed.

---
diff --git a/gst/parole-gst.c b/gst/parole-gst.c
index 660152b..ca0c8e6 100644
--- a/gst/parole-gst.c
+++ b/gst/parole-gst.c
@@ -392,6 +392,8 @@ parole_gst_draw_logo_common (ParoleGst *gst)
     gdk_window_begin_paint_region (widget->window,
 				   region);
 
+    gdk_region_destroy (region);
+
     gdk_window_clear_area (widget->window,
 			   0, 0,
 			   widget->allocation.width,
@@ -1738,6 +1740,20 @@ parole_gst_constructed (GObject *object)
 }
 
 static void
+parole_gst_style_set (GtkWidget *widget, GtkStyle *prev_style)
+{
+    ParoleGst *gst;
+    
+    gst = PAROLE_GST (widget);
+    
+    if ( gst->priv->logo )
+	g_object_unref (gst->priv->logo);
+	
+    parole_gst_load_logo (gst);
+    gtk_widget_queue_draw (widget);
+}
+
+static void
 parole_gst_class_init (ParoleGstClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -1755,6 +1771,7 @@ parole_gst_class_init (ParoleGstClass *klass)
     widget_class->motion_notify_event = parole_gst_motion_notify_event;
     widget_class->button_press_event = parole_gst_button_press_event;
     widget_class->button_release_event = parole_gst_button_release_event;
+    widget_class->style_set = parole_gst_style_set;
 
     signals[MEDIA_STATE] = 
         g_signal_new ("media-state",
--
cgit v0.8.2.1




More information about the fedora-extras-commits mailing list