Author: toshok Date: 2008-01-19 11:18:15 -0500 (Sat, 19 Jan 2008) New Revision: 93318
Modified: trunk/moon/src/ChangeLog trunk/moon/src/animation.cpp trunk/moon/src/animation.h trunk/moon/src/brush.cpp trunk/moon/src/brush.h trunk/moon/src/clock.cpp trunk/moon/src/clock.h trunk/moon/src/dependencyobject.cpp trunk/moon/src/geometry.cpp trunk/moon/src/geometry.h trunk/moon/src/media.cpp trunk/moon/src/media.h trunk/moon/src/panel.cpp trunk/moon/src/stylus.cpp trunk/moon/src/stylus.h trunk/moon/src/text.cpp trunk/moon/src/text.h trunk/moon/src/transform.cpp trunk/moon/src/trigger.cpp trunk/moon/src/trigger.h trunk/moon/src/uielement.cpp Log: 2008-01-19 Chris Toshok <[EMAIL PROTECTED]> * uielement.cpp (UIElement::OnPropertyChanged): remove the handling of TriggersProperty and ResourcesProperty's closure. * trigger.cpp, trigger.h: remove EventTrigger's OnPropertyChanged method. * transform.cpp (TransformGroup::OnPropertyChanged): remove handling of ChildrenProperty's closure. * text.cpp, text.h: remove Run::OnPropertyChanged, and also remove the handling of Inlines->closure from TextBlock. * stylus.cpp, stylus.h: remove a couple of OnPropertyChanged methods (InkPresenter and Stroke). * panel.cpp (Panel::OnPropertyChanged): remove handling of the ChildProperty's closure here. * media.cpp, media.h: remove the unnecessary MediaBase::OnPropertyChanged. * geometry.cpp, geometry.h: remove a few OnPropertyChanged methods (GeometryGroup, PathGeometry, and PathSegment.) * clock.cpp, clock.h: remove TimelineGroup::OnPropertyChanged. * brush.cpp, brush.h: remove the unnecessary Brush::OnPropertyChanged and GradientBrush::OnPropertyChanged. * animation.cpp, animation.h: remove all the *AnimationUsingKeyFrames::OnPropertyChanged methods, since all they did was deal with collection closures. * dependencyobject.cpp (DependencyObject::SetValue): factor out the "collection->closure" setting code from all the OnPropertyChanged methods sprinkled around and put it here. Also, set collection->closure to NULL on the old value (something the old code didn't do). Modified: trunk/moon/src/ChangeLog =================================================================== --- trunk/moon/src/ChangeLog 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/ChangeLog 2008-01-19 16:18:15 UTC (rev 93318) @@ -1,5 +1,46 @@ 2008-01-19 Chris Toshok <[EMAIL PROTECTED]> + * uielement.cpp (UIElement::OnPropertyChanged): remove the + handling of TriggersProperty and ResourcesProperty's closure. + + * trigger.cpp, trigger.h: remove EventTrigger's OnPropertyChanged + method. + + * transform.cpp (TransformGroup::OnPropertyChanged): remove + handling of ChildrenProperty's closure. + + * text.cpp, text.h: remove Run::OnPropertyChanged, and also remove + the handling of Inlines->closure from TextBlock. + + * stylus.cpp, stylus.h: remove a couple of OnPropertyChanged + methods (InkPresenter and Stroke). + + * panel.cpp (Panel::OnPropertyChanged): remove handling of the + ChildProperty's closure here. + + * media.cpp, media.h: remove the unnecessary + MediaBase::OnPropertyChanged. + + * geometry.cpp, geometry.h: remove a few OnPropertyChanged + methods (GeometryGroup, PathGeometry, and PathSegment.) + + * clock.cpp, clock.h: remove TimelineGroup::OnPropertyChanged. + + * brush.cpp, brush.h: remove the unnecessary + Brush::OnPropertyChanged and GradientBrush::OnPropertyChanged. + + * animation.cpp, animation.h: remove all the + *AnimationUsingKeyFrames::OnPropertyChanged methods, since all + they did was deal with collection closures. + + * dependencyobject.cpp (DependencyObject::SetValue): factor out + the "collection->closure" setting code from all the + OnPropertyChanged methods sprinkled around and put it here. Also, + set collection->closure to NULL on the old value (something the + old code didn't do). + +2008-01-19 Chris Toshok <[EMAIL PROTECTED]> + * animation.cpp: the remaining macros (SET_NULLABLE_FUNC and NULLABLE_{PRIM_}GETSET_IMPL) are moved here, right before their use. Modified: trunk/moon/src/animation.cpp =================================================================== --- trunk/moon/src/animation.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/animation.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -1325,27 +1325,6 @@ } void -DoubleAnimationUsingKeyFrames::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::DOUBLEANIMATIONUSINGKEYFRAMES) { - DoubleAnimation::OnPropertyChanged (prop); - return; - } - - if (prop == DoubleAnimationUsingKeyFrames::KeyFramesProperty) { - DoubleKeyFrameCollection *newcol = GetValue (prop)->AsDoubleKeyFrameCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void DoubleAnimationUsingKeyFrames::AddKeyFrame (DoubleKeyFrame *frame) { DoubleKeyFrameCollection *key_frames = GetValue (DoubleAnimationUsingKeyFrames::KeyFramesProperty)->AsDoubleKeyFrameCollection (); @@ -1454,27 +1433,6 @@ } void -ColorAnimationUsingKeyFrames::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::COLORANIMATIONUSINGKEYFRAMES) { - ColorAnimation::OnPropertyChanged (prop); - return; - } - - if (prop == ColorAnimationUsingKeyFrames::KeyFramesProperty) { - ColorKeyFrameCollection *newcol = GetValue (prop)->AsColorKeyFrameCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void ColorAnimationUsingKeyFrames::AddKeyFrame (ColorKeyFrame *frame) { ColorKeyFrameCollection *key_frames = GetValue (ColorAnimationUsingKeyFrames::KeyFramesProperty)->AsColorKeyFrameCollection (); @@ -1580,27 +1538,6 @@ } void -PointAnimationUsingKeyFrames::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::POINTANIMATIONUSINGKEYFRAMES) { - PointAnimation::OnPropertyChanged (prop); - return; - } - - if (prop == PointAnimationUsingKeyFrames::KeyFramesProperty) { - PointKeyFrameCollection *newcol = GetValue (prop)->AsPointKeyFrameCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void PointAnimationUsingKeyFrames::AddKeyFrame (PointKeyFrame *frame) { PointKeyFrameCollection *key_frames = GetValue (PointAnimationUsingKeyFrames::KeyFramesProperty)->AsPointKeyFrameCollection (); Modified: trunk/moon/src/animation.h =================================================================== --- trunk/moon/src/animation.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/animation.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -479,8 +479,6 @@ virtual Value *GetCurrentValue (Value *defaultOriginValue, Value *defaultDestinationValue, AnimationClock* animationClock); - virtual void OnPropertyChanged (DependencyProperty *prop); - virtual void Resolve (); virtual Duration GetNaturalDurationCore (Clock* clock); @@ -502,8 +500,6 @@ virtual Value *GetCurrentValue (Value *defaultOriginValue, Value *defaultDestinationValue, AnimationClock* animationClock); - virtual void OnPropertyChanged (DependencyProperty *prop); - virtual void Resolve (); virtual Duration GetNaturalDurationCore (Clock* clock); @@ -524,8 +520,6 @@ virtual Value *GetCurrentValue (Value *defaultOriginValue, Value *defaultDestinationValue, AnimationClock* animationClock); - virtual void OnPropertyChanged (DependencyProperty *prop); - virtual void Resolve (); virtual Duration GetNaturalDurationCore (Clock* clock); Modified: trunk/moon/src/brush.cpp =================================================================== --- trunk/moon/src/brush.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/brush.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -188,22 +188,6 @@ SetupBrush (cr, uielement, w, h); } -void -Brush::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::BRUSH) { - DependencyObject::OnPropertyChanged (prop); - return; - } - - // - // If any of our properties change, we have to notify our - // owners that they must repaint (all of our properties have - // a visible effect - // - NotifyAttachersOfPropertyChange (prop); -} - // // SolidColorBrush // @@ -340,27 +324,6 @@ } void -GradientBrush::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::GRADIENTBRUSH) { - Brush::OnPropertyChanged (prop); - return; - } - - if (prop == GradientBrush::GradientStopsProperty) { - GradientStopCollection *newcol = GetValue (prop)->AsGradientStopCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void GradientBrush::OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop) { // GeometryGroup only has one collection, so let's save the hash lookup Modified: trunk/moon/src/brush.h =================================================================== --- trunk/moon/src/brush.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/brush.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -62,7 +62,6 @@ virtual void SetupBrush (cairo_t *cr, UIElement *uielement); virtual void SetupBrush (cairo_t *cr, UIElement *uielement, double width, double height); - virtual void OnPropertyChanged (DependencyProperty *prop); double GetTotalOpacity (UIElement *uielement); }; @@ -110,7 +109,6 @@ virtual Type::Kind GetObjectType () { return Type::GRADIENTBRUSH; } - virtual void OnPropertyChanged (DependencyProperty *prop); virtual void OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop); virtual void SetupGradient (cairo_pattern_t *pattern, UIElement *uielement, bool single = false); }; Modified: trunk/moon/src/clock.cpp =================================================================== --- trunk/moon/src/clock.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/clock.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -1271,27 +1271,6 @@ { } -void -TimelineGroup::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::TIMELINEGROUP) { - Timeline::OnPropertyChanged (prop); - return; - } - - if (prop == TimelineGroup::ChildrenProperty) { - TimelineCollection *newcol = GetValue (prop)->AsTimelineCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - ClockGroup * TimelineGroup::CreateClock () { Modified: trunk/moon/src/clock.h =================================================================== --- trunk/moon/src/clock.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/clock.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -534,8 +534,6 @@ void AddChild (Timeline *child); void RemoveChild (Timeline *child); - - virtual void OnPropertyChanged (DependencyProperty *prop); }; TimelineGroup *timeline_group_new (void); Modified: trunk/moon/src/dependencyobject.cpp =================================================================== --- trunk/moon/src/dependencyobject.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/dependencyobject.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -413,22 +413,26 @@ (current_value != NULL && value == NULL) || (current_value != NULL && value != NULL && *current_value != *value)) { - if (current_value != NULL && current_value->GetKind () >= Type::DEPENDENCY_OBJECT){ - DependencyObject *dob = current_value->AsDependencyObject(); + // detach from the existing value if there is one + if (current_value) { + if (current_value->GetKind () >= Type::DEPENDENCY_OBJECT){ + DependencyObject *dob = current_value->AsDependencyObject(); - if (dob != NULL) - dob->Detach (property, this); - } + if (dob != NULL) + dob->Detach (property, this); + } - Value *store; - if (value == NULL) { - store = NULL; - } else { - store = new Value (*value); + if (Type::Find(current_value->GetKind())->IsSubclassOf (Type::COLLECTION)) { + Collection *col = current_value->AsCollection (); + if (col) + col->closure = NULL; + } } - g_hash_table_insert (current_values, property, store); + // store the new value in the hash + g_hash_table_insert (current_values, property, value ? new Value (*value) : NULL); + // and attach to the new value if (value) { if (value->GetKind () >= Type::DEPENDENCY_OBJECT){ DependencyObject *dob = value->AsDependencyObject(); @@ -436,6 +440,15 @@ if (dob != NULL) dob->Attach (property, this); } + + if (Type::Find(value->GetKind())->IsSubclassOf (Type::COLLECTION)) { + Collection *col = value->AsCollection (); + if (col) { + if (col->closure) + g_warning ("Collection added as property of more than 1 dependency object"); + col->closure = this; + } + } } attachers_notified = false; Modified: trunk/moon/src/geometry.cpp =================================================================== --- trunk/moon/src/geometry.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/geometry.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -226,27 +226,6 @@ } void -GeometryGroup::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::GEOMETRYGROUP) { - Geometry::OnPropertyChanged (prop); - return; - } - - if (prop == GeometryGroup::ChildrenProperty) { - GeometryCollection *newcol = GetValue (prop)->AsGeometryCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void GeometryGroup::OnSubPropertyChanged (DependencyProperty *prop, DependencyObject *obj, DependencyProperty *subprop) { NotifyAttachersOfPropertyChange (prop); @@ -527,27 +506,6 @@ } void -PathGeometry::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::PATHGEOMETRY) { - Geometry::OnPropertyChanged (prop); - return; - } - - if (prop == PathGeometry::FiguresProperty){ - PathFigureCollection *newcol = GetValue (prop)->AsPathFigureCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void PathGeometry::OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop) { // PathGeometry only has one collection, so let's save the hash lookup @@ -780,16 +738,6 @@ return; } - if (prop == PathFigure::SegmentsProperty){ - PathSegmentCollection *newcol = GetValue (prop)->AsPathSegmentCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - if (path) moon_path_clear (path); NotifyAttachersOfPropertyChange (prop); @@ -884,21 +832,6 @@ } // -// PathSegment -// - -void -PathSegment::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type == Type::DEPENDENCY_OBJECT) { - DependencyObject::OnPropertyChanged (prop); - return; - } - - NotifyAttachersOfPropertyChange (prop); -} - -// // ArcSegment // Modified: trunk/moon/src/geometry.h =================================================================== --- trunk/moon/src/geometry.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/geometry.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -85,7 +85,6 @@ GeometryGroup (); virtual Type::Kind GetObjectType () { return Type::GEOMETRYGROUP; }; - virtual void OnPropertyChanged (DependencyProperty *prop); virtual void OnSubPropertyChanged (DependencyProperty *prop, DependencyObject *obj, DependencyProperty *subprop); virtual void OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop); @@ -163,7 +162,6 @@ PathGeometry () {} virtual Type::Kind GetObjectType () { return Type::PATHGEOMETRY; }; - virtual void OnPropertyChanged (DependencyProperty *prop); virtual void OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop); virtual void Draw (Path *path, cairo_t *cr); virtual Rect ComputeBounds (Path *path); @@ -256,8 +254,6 @@ virtual void Append (moon_path *path) {} virtual int GetSize () { return 0; } - - virtual void OnPropertyChanged (DependencyProperty *prop); }; // Modified: trunk/moon/src/media.cpp =================================================================== --- trunk/moon/src/media.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/media.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -43,12 +43,6 @@ { } -void -MediaBase::OnPropertyChanged (DependencyProperty *prop) -{ - FrameworkElement::OnPropertyChanged (prop); -} - MediaBase * media_base_new (void) { Modified: trunk/moon/src/media.h =================================================================== --- trunk/moon/src/media.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/media.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -46,8 +46,6 @@ MediaBase (); virtual Type::Kind GetObjectType () { return Type::MEDIABASE; }; - - virtual void OnPropertyChanged (DependencyProperty *prop); }; MediaBase *media_base_new (void); Modified: trunk/moon/src/panel.cpp =================================================================== --- trunk/moon/src/panel.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/panel.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -435,15 +435,7 @@ return; } - if (prop == Panel::ChildrenProperty) { - VisualCollection *newcol = GetValue (prop)->AsVisualCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } else if (prop == Panel::BackgroundProperty) { + if (prop == Panel::BackgroundProperty) { if (background != NULL) { background->Detach (NULL, this); background->unref (); Modified: trunk/moon/src/stylus.cpp =================================================================== --- trunk/moon/src/stylus.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/stylus.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -204,27 +204,6 @@ NotifyAttachersOfPropertyChange (Stroke::StylusPointsProperty); } -void -Stroke::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::STROKE) { - DependencyObject::OnPropertyChanged (prop); - return; - } - - if (prop == Stroke::StylusPointsProperty) { - Collection *newcol = GetValue (prop)->AsCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - Stroke* stroke_new () { @@ -489,27 +468,6 @@ } void -InkPresenter::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::INKPRESENTER) { - Canvas::OnPropertyChanged (prop); - return; - } - - if (prop == InkPresenter::StrokesProperty) { - Collection *newcol = GetValue (prop)->AsCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void InkPresenter::OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop) { switch (type) { Modified: trunk/moon/src/stylus.h =================================================================== --- trunk/moon/src/stylus.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/stylus.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -111,7 +111,6 @@ Rect GetOldBounds (); bool HitTest (StylusPointCollection *stylusPoints); - virtual void OnPropertyChanged (DependencyProperty *prop); virtual void OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop); static DependencyProperty* DrawingAttributesProperty; @@ -156,7 +155,6 @@ virtual Type::Kind GetObjectType () { return Type::INKPRESENTER; }; virtual void RenderChildren (cairo_t *cr, Region *region); - virtual void OnPropertyChanged (DependencyProperty *prop); virtual void OnCollectionChanged (Collection *col, CollectionChangeType type, DependencyObject *obj, DependencyProperty *prop); static DependencyProperty* StrokesProperty; Modified: trunk/moon/src/text.cpp =================================================================== --- trunk/moon/src/text.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/text.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -309,17 +309,6 @@ DependencyProperty *Run::TextProperty; -void -Run::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop->type != Type::RUN) { - Inline::OnPropertyChanged (prop); - return; - } - - NotifyAttachersOfPropertyChange (prop); -} - Run * run_new (void) { @@ -874,14 +863,6 @@ // handled elsewhere dirty = true; } else if (prop == TextBlock::InlinesProperty) { - Inlines *newcol = GetValue (prop)->AsInlines (); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - dirty = true; } else if (prop == TextBlock::ForegroundProperty) { if (foreground != NULL) { Modified: trunk/moon/src/text.h =================================================================== --- trunk/moon/src/text.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/text.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -88,7 +88,6 @@ Run () { } virtual Type::Kind GetObjectType () { return Type::RUN; }; - virtual void OnPropertyChanged (DependencyProperty *prop); }; Run *run_new (void); Modified: trunk/moon/src/transform.cpp =================================================================== --- trunk/moon/src/transform.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/transform.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -555,14 +555,6 @@ } if (prop == TransformGroup::ChildrenProperty) { - TransformCollection *newcol = GetValue (prop)->AsTransformCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - need_update = true; } Modified: trunk/moon/src/trigger.cpp =================================================================== --- trunk/moon/src/trigger.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/trigger.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -21,27 +21,7 @@ this->SetValue (EventTrigger::ActionsProperty, Value::CreateUnref (new TriggerActionCollection ())); } -// -// Intercept any changes to the actions property and mirror that into our -// own variable -// void -EventTrigger::OnPropertyChanged (DependencyProperty *prop) -{ - if (prop == EventTrigger::ActionsProperty){ - TriggerActionCollection *newcol = GetValue (prop)->AsTriggerActionCollection(); - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - newcol->closure = this; - } - } - - NotifyAttachersOfPropertyChange (prop); -} - -void EventTrigger::SetTarget (DependencyObject *target) { g_assert (target); Modified: trunk/moon/src/trigger.h =================================================================== --- trunk/moon/src/trigger.h 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/trigger.h 2008-01-19 16:18:15 UTC (rev 93318) @@ -32,8 +32,6 @@ void SetTarget (DependencyObject *target); void RemoveTarget (DependencyObject *target); - virtual void OnPropertyChanged (DependencyProperty *prop); - static DependencyProperty* RoutedEventProperty; static DependencyProperty* ActionsProperty; Modified: trunk/moon/src/uielement.cpp =================================================================== --- trunk/moon/src/uielement.cpp 2008-01-19 15:37:45 UTC (rev 93317) +++ trunk/moon/src/uielement.cpp 2008-01-19 16:18:15 UTC (rev 93318) @@ -173,29 +173,7 @@ else if (prop == UIElement::RenderTransformProperty || prop == UIElement::RenderTransformOriginProperty) { UpdateTransform (); } - else if (prop == UIElement::TriggersProperty) { - Value *v = GetValue (prop); - TriggerCollection *newcol = v ? v->AsTriggerCollection() : NULL; - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - - newcol->closure = this; - } - } - else if (prop == UIElement::ResourcesProperty) { - Value *v = GetValue (prop); - ResourceDictionary *newcol = v ? v->AsResourceDictionary() : NULL; - - if (newcol) { - if (newcol->closure) - printf ("Warning we attached a property that was already attached\n"); - - newcol->closure = this; - } - } - NotifyAttachersOfPropertyChange (prop); } _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches