Author: toshok
Date: 2007-07-20 13:55:18 -0400 (Fri, 20 Jul 2007)
New Revision: 82380

Modified:
   trunk/moon/plugin/moonlight.h
   trunk/moon/plugin/plugin-class.cpp
   trunk/moon/plugin/plugin.cpp
Log:
change the DEBUG_WARN_NOTIMPLEMENTED macro to take a string, and pass a semi 
useful string everywhere we use the macro

Modified: trunk/moon/plugin/moonlight.h
===================================================================
--- trunk/moon/plugin/moonlight.h       2007-07-20 17:48:34 UTC (rev 82379)
+++ trunk/moon/plugin/moonlight.h       2007-07-20 17:55:18 UTC (rev 82380)
@@ -50,10 +50,10 @@
 #endif
 #define G_LOG_DOMAIN "Moonlight"
 #define DEBUGMSG(x...) g_message (x)
-#define DEBUG_WARN_NOTIMPLEMENTED() g_warning ("functionality not yet 
implemented:" G_STRLOC)
+#define DEBUG_WARN_NOTIMPLEMENTED(msg) g_warning ("functionality not yet 
implemented (%s):" G_STRLOC, msg)
 #else
 #define DEBUGMSG(x...)
-#define DEBUG_WARN_NOTIMPLEMENTED()
+#define DEBUG_WARN_NOTIMPLEMENTED(msg)
 #endif
 
 #endif /* PLUGIN_CONFIG */

Modified: trunk/moon/plugin/plugin-class.cpp
===================================================================
--- trunk/moon/plugin/plugin-class.cpp  2007-07-20 17:48:34 UTC (rev 82379)
+++ trunk/moon/plugin/plugin-class.cpp  2007-07-20 17:55:18 UTC (rev 82380)
@@ -230,10 +230,10 @@
 {
        switch (v->type) {
        case NPVariantType_Void:
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("void variant type");
                break;
        case NPVariantType_Null:
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("null variant type");
                *result = Value (Type::DEPENDENCY_OBJECT);
                break;
        case NPVariantType_Bool:
@@ -249,7 +249,7 @@
                *result = Value (NPVARIANT_TO_STRING(*v).utf8characters);
                break;
        case NPVariantType_Object:
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("object variant type");
                break;
        }
 }
@@ -436,12 +436,12 @@
 {
        MoonlightRect *r = (MoonlightRect*)npobj;
        if (name_matches (name, "shift")) {
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("shift MouseEvent property");
                BOOLEAN_TO_NPVARIANT (false, *result);
                return true;
        }
        else if (name_matches (name, "ctrl")) {
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("ctrl MouseEvent property");
                BOOLEAN_TO_NPVARIANT (false, *result);
                return true;
        }
@@ -829,7 +829,7 @@
 
        // not implemented yet.
        if (name_matches (name, "maxFrameRate")) {
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("maxFrameRate property");
                return true;
        }
 
@@ -870,7 +870,7 @@
        MoonlightContentObject *content = (MoonlightContentObject*)npobj;
 
        /* XXX free the registered_scriptable_objects hash */
-       DEBUG_WARN_NOTIMPLEMENTED ();
+       DEBUG_WARN_NOTIMPLEMENTED ("need to free registered scriptable 
objects");
 
        if (content->resizeProxy)
                delete content->resizeProxy;
@@ -904,8 +904,6 @@
        gpointer p = g_hash_table_lookup 
(content->registered_scriptable_objects,
                                          name);
 
-       NPUTF8 *strname = NPN_UTF8FromIdentifier (name);
-       DEBUGMSG ("******** OBJECT %s AT %p", strname, p);
        return p != NULL;
 }
 
@@ -971,7 +969,7 @@
 
                // XXX store the proxy someplace in this object
 #endif
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("content onResize");
                return true;
        }
        return false;
@@ -1000,7 +998,7 @@
        }
        else if (name_matches (name, "createObject")) {
                // not implemented yet
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("content.createObject");
                return true;
        }
        else if (name_matches (name, "createFromXaml")) {
@@ -1024,7 +1022,7 @@
        }
        else if (name_matches (name, "createFromXamlDownloader")) {
                // not implemented yet
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("content.createFromXamlDownloader");
                return true;
        }
 
@@ -1171,7 +1169,7 @@
                        strvalue = g_strdup_printf ("%g", NPVARIANT_TO_DOUBLE 
(*value));
                }
                else if (!NPVARIANT_IS_STRING (*value)) {
-                       DEBUG_WARN_NOTIMPLEMENTED ();
+                       DEBUG_WARN_NOTIMPLEMENTED ("unhandled variant type in 
do.set_property");
                        return true;
                }
 
@@ -1220,6 +1218,8 @@
                PluginInstance *plugin = (PluginInstance*) 
((MoonlightObject*)npobj)->instance->pdata;
 
                OBJECT_TO_NPVARIANT ((NPObject*)plugin->getRootObject(), 
*result);
+
+               return true;
        }
        else if (name_matches (name, "addEventListener")) {
                if (argCount != 2)
@@ -1246,7 +1246,7 @@
        }
        else if (name_matches (name, "removeEventlistener")) {
                // not yet implemented
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("do.removeEventListener");
                return true;
        }
        // XXX these next two methods should live in a UIElement
@@ -1519,7 +1519,7 @@
        }
        else if (name_matches (name, "seek")) {
                // not yet implemented
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("storyboard.seek");
 #if notyet
                if (argCount != 1)
                        return true;
@@ -1785,7 +1785,7 @@
        DEBUGMSG ("***************** getting scriptable object property %s", 
strname);
        NPN_MemFree (strname);
 
-       DEBUG_WARN_NOTIMPLEMENTED ();
+       DEBUG_WARN_NOTIMPLEMENTED ("scriptableobject.get_property");
        return true;
 }
 
@@ -1801,7 +1801,7 @@
                DEBUGMSG ("***************** setting scriptable object property 
%s", strname);
                NPN_MemFree (strname);
 
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("scriptableobject.set_property");
                return true;
        }
        // if that fails, look for the event of that name
@@ -1811,7 +1811,7 @@
                DEBUGMSG ("***************** adding scriptable object event 
%s", strname);
                NPN_MemFree (strname);
 
-               DEBUG_WARN_NOTIMPLEMENTED ();
+               DEBUG_WARN_NOTIMPLEMENTED ("scriptableobject.register_event");
                return true;
        }
 }

Modified: trunk/moon/plugin/plugin.cpp
===================================================================
--- trunk/moon/plugin/plugin.cpp        2007-07-20 17:48:34 UTC (rev 82379)
+++ trunk/moon/plugin/plugin.cpp        2007-07-20 17:55:18 UTC (rev 82380)
@@ -564,7 +564,7 @@
                                       bool *cookieEnabled)
 {
        *userAgent = (char*)NPN_UserAgent (instance);
-       DEBUG_WARN_NOTIMPLEMENTED ();
+       DEBUG_WARN_NOTIMPLEMENTED ("pluginInstance.getBrowserInformation");
 
        *name = "Foo!";
        *version = "Foo!";

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to