Author: lluis Date: 2008-02-20 09:31:51 -0500 (Wed, 20 Feb 2008) New Revision: 96249
Modified: trunk/stetic/ChangeLog trunk/stetic/libstetic/editor/ActionMenuItem.cs trunk/stetic/libstetic/editor/ActionToolItem.cs trunk/stetic/libstetic/wrapper/Action.cs trunk/stetic/libsteticui/ActionComponent.cs Log: * 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: trunk/stetic/ChangeLog =================================================================== --- trunk/stetic/ChangeLog 2008-02-20 13:47:07 UTC (rev 96248) +++ trunk/stetic/ChangeLog 2008-02-20 14:31:51 UTC (rev 96249) @@ -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: trunk/stetic/libstetic/editor/ActionMenuItem.cs =================================================================== --- trunk/stetic/libstetic/editor/ActionMenuItem.cs 2008-02-20 13:47:07 UTC (rev 96248) +++ trunk/stetic/libstetic/editor/ActionMenuItem.cs 2008-02-20 14:31:51 UTC (rev 96249) @@ -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: trunk/stetic/libstetic/editor/ActionToolItem.cs =================================================================== --- trunk/stetic/libstetic/editor/ActionToolItem.cs 2008-02-20 13:47:07 UTC (rev 96248) +++ trunk/stetic/libstetic/editor/ActionToolItem.cs 2008-02-20 14:31:51 UTC (rev 96249) @@ -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: trunk/stetic/libstetic/wrapper/Action.cs =================================================================== --- trunk/stetic/libstetic/wrapper/Action.cs 2008-02-20 13:47:07 UTC (rev 96248) +++ trunk/stetic/libstetic/wrapper/Action.cs 2008-02-20 14:31:51 UTC (rev 96249) @@ -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: trunk/stetic/libsteticui/ActionComponent.cs =================================================================== --- trunk/stetic/libsteticui/ActionComponent.cs 2008-02-20 13:47:07 UTC (rev 96248) +++ trunk/stetic/libsteticui/ActionComponent.cs 2008-02-20 14:31:51 UTC (rev 96249) @@ -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