Author: miguel
Date: 2007-07-20 19:17:32 -0400 (Fri, 20 Jul 2007)
New Revision: 82397
Modified:
trunk/moon/demo-status.txt
trunk/moon/plugin/ChangeLog
trunk/moon/plugin/downloader.cpp
trunk/moon/src/ChangeLog
trunk/moon/src/collection.cpp
trunk/moon/src/collection.h
Log:
2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
* collection.cpp: Add support for RemoveAt.
2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
* Fix a memory leak.
Modified: trunk/moon/demo-status.txt
===================================================================
--- trunk/moon/demo-status.txt 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/demo-status.txt 2007-07-20 23:17:32 UTC (rev 82397)
@@ -336,16 +336,19 @@
* Smalltalk in Silverlight (http://vistascript.net/vistascript/test)
- Depends on implicitly loaded assembly:
-
- ** (Gecko:25466): WARNING **: The following assembly referenced
from /home/toshok/.mozilla/firefox/79nl6cuy.default/Cache/71054617d01 could not
be loaded:
- Assembly: Desktop (assemblyref_index=2)
+ Implicit assembly loading seems to fail loading Smalltalk:
+ ** (Gecko:2397): WARNING **: The following assembly referenced
from
+
/home/miguel/.mozilla/firefox/faxlddi4.FireBug/Cache/8B67FFBEd01 could
+ not be loaded:
+ Assembly: Smalltalk (assemblyref_index=2)
Version: 1.0.0.0
Public Key: (none)
- The assembly was not found in the Global Assembly Cache, a path
listed in the MONO_PATH environment variable, or in the location of the
executing assembly (/home/toshok/.mozilla/firefox/79nl6cuy.default/Cache).
-
-* Sprawl (http://silverlight.net/samples/1.0/sprawl/default.html)
-
+ The assembly was not found in the Global Assembly Cache, a path
listed
+ in the MONO_PATH environment variable, or in the location of the
+ executing assembly
+ (/home/miguel/.mozilla/firefox/faxlddi4.FireBug/Cache).
+
+
javascript: delegate hookup failures.
attempting to hookup delegate javascript:handleLoad to event
Loaded on object of type System.Windows.Controls.Canvas
@@ -436,3 +439,12 @@
It looks like it's doing the same
WebApplication.RegisterScriptable object stuff that
bubblemark is doing.
+
+* Lutz Roeder Monotone,
http://www.aisto.com/Roeder/Silverlight/Monotone/Default.aspx
+
+ http://www.aisto.com/Roeder/Silverlight/
+
+ Starts up but it does not play back the audio, nor does it show the
+ actual expected animation, the animation flashes in the screen and then
+ vanishes
+
Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/plugin/ChangeLog 2007-07-20 23:17:32 UTC (rev 82397)
@@ -1,3 +1,7 @@
+2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * Fix a memory leak.
+
2007-07-19 Chris Toshok <[EMAIL PROTECTED]>
* plugin-class.h, plugin-class.cpp: factor out the
Modified: trunk/moon/plugin/downloader.cpp
===================================================================
--- trunk/moon/plugin/downloader.cpp 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/plugin/downloader.cpp 2007-07-20 23:17:32 UTC (rev 82397)
@@ -54,6 +54,11 @@
{
PluginDownloader *pd = (PluginDownloader *) state;
+ if (pd->verb)
+ g_free (pd->verb);
+ if (pd->uri)
+ g_free (pd->uri);
+
pd->verb = g_strdup (verb);
pd->uri = g_strdup (uri);
}
@@ -63,6 +68,7 @@
{
PluginDownloader *pd = (PluginDownloader *) state;
+ fprintf (stderr, "PluginDownloaderSend: Starting downloader again for
(%s %s)\n", pd->verb, pd->uri);
//
// This is a hack: we need the p_downloader_create_state to provide us
// with the pointer to this plugin. Currently we do not track this
@@ -94,6 +100,7 @@
static void
p_downloader_abort (gpointer state)
{
+ fprintf (stderr, "moonlight-pluging: implement downloader abort\n");
DEBUGMSG ("downloader_abort");
}
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/src/ChangeLog 2007-07-20 23:17:32 UTC (rev 82397)
@@ -1,5 +1,7 @@
2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
+ * collection.cpp: Add support for RemoveAt.
+
* runtime.cpp (html_timer_timeout_add): Added helper routine to
setup Html timeouts.
Modified: trunk/moon/src/collection.cpp
===================================================================
--- trunk/moon/src/collection.cpp 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/src/collection.cpp 2007-07-20 23:17:32 UTC (rev 82397)
@@ -150,6 +150,24 @@
return true;
}
+bool
+Collection::RemoveAt (int index)
+{
+ Collection::Node *n = (Collection::Node *) list->Index (index);
+
+ generation++;
+ if (n == NULL)
+ return false;
+
+ n->Unlink ();
+ n->obj->Detach (NULL, this);
+ if (closure)
+ closure->OnCollectionChanged (this,
CollectionChangeTypeItemRemoved, n->obj, NULL);
+
+ delete n;
+ return true;
+}
+
void
Collection::Clear ()
{
@@ -207,6 +225,16 @@
return collection->Remove (data);
}
+bool
+collection_remove_at (Collection *collection, int index)
+{
+ if (index > collection->list->Length ())
+ return false;
+
+ collection->RemoveAt (index);
+ return true;
+}
+
void
collection_insert (Collection *collection, int index, DependencyObject *data)
{
@@ -428,6 +456,25 @@
return b;
}
+bool
+VisualCollection::RemoveAt (int index)
+{
+ Panel *panel = (Panel *) closure;
+
+ Collection::Node *n = (Collection::Node *) list->Index (index);
+ if (n == NULL)
+ return false;
+ UIElement *item = (UIElement *) n->obj;
+
+ item->Invalidate ();
+ bool b = Collection::RemoveAt (index);
+ z_sorted_list->Remove (UIElementNodeFinder, n->obj);
+ if (panel)
+ panel->UpdateBounds ();
+
+ return b;
+}
+
void
VisualCollection::Clear ()
{
@@ -503,6 +550,22 @@
return b;
}
+bool
+TriggerCollection::RemoveAt (int index)
+{
+ FrameworkElement *fwe = (FrameworkElement *) closure;
+ Collection::Node *n = (Collection::Node *) list->Index (index);
+ if (n == NULL)
+ return false;
+
+ EventTrigger *trigger = (EventTrigger *) n->obj;
+
+ bool b = Collection::RemoveAt (index);
+
+ trigger->RemoveTarget (fwe);
+ return b;
+}
+
Collection *
collection_new (Type::Kind kind)
{
Modified: trunk/moon/src/collection.h
===================================================================
--- trunk/moon/src/collection.h 2007-07-20 23:16:46 UTC (rev 82396)
+++ trunk/moon/src/collection.h 2007-07-20 23:17:32 UTC (rev 82397)
@@ -41,6 +41,7 @@
virtual void Add (DependencyObject *data);
virtual bool Remove (DependencyObject *data);
+ virtual bool RemoveAt (int index);
virtual void Insert (int index, DependencyObject *data);
virtual void Clear ();
@@ -81,6 +82,7 @@
virtual void Add (DependencyObject *data);
virtual bool Remove (DependencyObject *data);
+ virtual bool RemoveAt (int index);
virtual void Insert (int index, DependencyObject *data);
virtual void Clear ();
virtual DependencyObject *SetVal (int index, DependencyObject *data);
@@ -100,6 +102,7 @@
virtual void Add (DependencyObject *data);
virtual bool Remove (DependencyObject *data);
+ virtual bool RemoveAt (int index);
virtual void Insert (int index, DependencyObject *data);
virtual DependencyObject *SetVal (int index, DependencyObject *data);
};
@@ -158,6 +161,7 @@
void collection_add (Collection *collection, DependencyObject *data);
bool collection_remove (Collection *collection, DependencyObject *data);
+bool collection_remove_at (Collection *collection, int index);
void collection_insert (Collection *collection, int index, DependencyObject
*data);
void collection_clear (Collection *collection);
int collection_count (Collection *collection);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches