Author: lluis Date: 2008-02-20 09:34:36 -0500 (Wed, 20 Feb 2008) New Revision: 96252
Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/ChangeLog branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionMenuItem.cs branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionToolItem.cs branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/wrapper/Action.cs branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libsteticui/ActionComponent.cs Log: 2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> * libsteticui/ActionComponent.cs, libstetic/wrapper/Action.cs: Added wrapper properties for Label and StockId, since the notify event is not being fired for Gtk.Action. * libstetic/editor/ActionMenuItem.cs, libstetic/editor/ActionToolItem.cs: Use new Action wrapper properties to access to the label and stock id. Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/ChangeLog =================================================================== --- branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/ChangeLog 2008-02-20 14:33:15 UTC (rev 96251) +++ branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/ChangeLog 2008-02-20 14:34:36 UTC (rev 96252) @@ -1,3 +1,11 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * libsteticui/ActionComponent.cs, libstetic/wrapper/Action.cs: Added wrapper + properties for Label and StockId, since the notify event is not being + fired for Gtk.Action. + * libstetic/editor/ActionMenuItem.cs, libstetic/editor/ActionToolItem.cs: + Use new Action wrapper properties to access to the label and stock id. + 2008-02-06 Lluis Sanchez Gual <[EMAIL PROTECTED]> * libsteticui/SignalsEditorBackend.cs: TargetObject can't be set when no Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionMenuItem.cs =================================================================== --- branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionMenuItem.cs 2008-02-20 14:33:15 UTC (rev 96251) +++ branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionMenuItem.cs 2008-02-20 14:34:36 UTC (rev 96252) @@ -80,7 +80,7 @@ localUpdate = true; if (entry.Text.Length > 0 || node.Action.GtkAction.StockId != null) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.Label = entry.Text; + node.Action.Label = entry.Text; node.Action.NotifyChanged (); } } @@ -387,7 +387,7 @@ void OnStockSelected (object s, IconEventArgs args) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.StockId = args.IconId; + node.Action.StockId = args.IconId; node.Action.NotifyChanged (); } } @@ -419,7 +419,7 @@ void OnClearIcon (object on, EventArgs args) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.StockId = null; + node.Action.StockId = null; node.Action.NotifyChanged (); } } Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionToolItem.cs =================================================================== --- branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionToolItem.cs 2008-02-20 14:33:15 UTC (rev 96251) +++ branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/editor/ActionToolItem.cs 2008-02-20 14:34:36 UTC (rev 96252) @@ -200,7 +200,7 @@ Gtk.Entry entry = ob as Gtk.Entry; if (entry.Text.Length > 0 || node.Action.GtkAction.StockId != null) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.Label = entry.Text; + node.Action.Label = entry.Text; node.Action.NotifyChanged (); } } @@ -298,7 +298,7 @@ void OnStockSelected (object s, IconEventArgs args) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.StockId = args.IconId; + node.Action.StockId = args.IconId; node.Action.NotifyChanged (); } } @@ -306,7 +306,7 @@ void OnClearIcon (object on, EventArgs args) { using (node.Action.UndoManager.AtomicChange) { - node.Action.GtkAction.StockId = null; + node.Action.StockId = null; node.Action.NotifyChanged (); } } Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/wrapper/Action.cs =================================================================== --- branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/wrapper/Action.cs 2008-02-20 14:33:15 UTC (rev 96251) +++ branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libstetic/wrapper/Action.cs 2008-02-20 14:34:36 UTC (rev 96252) @@ -60,11 +60,16 @@ } } - public string ActionLabel { + public string Label { get { return GtkAction.Label; } - set { GtkAction.Label = value; } + set { GtkAction.Label = value; EmitNotify ("Label"); } } + public string StockId { + get { return GtkAction.StockId; } + set { GtkAction.StockId = value; EmitNotify ("StockId"); } + } + public override string WrappedTypeName { get { if (type == ActionType.Action) @@ -102,7 +107,7 @@ string s = GtkAction.StockId.Replace ("gtk-", ""); return GetIdentifier (s.Replace ("gnome-stock-", "")); } - return ""; + return "Action"; } public ActionType Type { @@ -378,7 +383,7 @@ } else sb.Append (c); } - return sb.ToString (); + return sb.ToString () + "Action"; } internal override UndoManager GetUndoManagerInternal () Modified: branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libsteticui/ActionComponent.cs =================================================================== --- branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libsteticui/ActionComponent.cs 2008-02-20 14:33:15 UTC (rev 96251) +++ branches/monodevelop/main/1.0/src/addins/MonoDevelop.GtkCore/lib/stetic/libsteticui/ActionComponent.cs 2008-02-20 14:34:36 UTC (rev 96252) @@ -34,12 +34,12 @@ public string Label { get { if (label == null) - label = ((Wrapper.Action)backend).ActionLabel; + label = ((Wrapper.Action)backend).Label; return label; } set { label = value; - ((Wrapper.Action)backend).ActionLabel = value; + ((Wrapper.Action)backend).Label = value; } } _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches