Author: lluis
Date: 2006-01-18 10:49:11 -0500 (Wed, 18 Jan 2006)
New Revision: 55730
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components/IconView.cs
Log:
2006-01-18 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Components.mdp: Added some assembly references.
* MonoDevelop.Components/IconView.cs: Converted CurrentlySelected
into a property. The setter now property selects the item corresponding
with the provided value.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog 2006-01-18
15:46:39 UTC (rev 55729)
+++ trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog 2006-01-18
15:49:11 UTC (rev 55730)
@@ -1,3 +1,10 @@
+2006-01-18 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Components.mdp: Added some assembly references.
+ * MonoDevelop.Components/IconView.cs: Converted CurrentlySelected
+ into a property. The setter now property selects the item corresponding
+ with the provided value.
+
2006-01-13 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Components/TabLabel.cs: Added support for tooltips.
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components/IconView.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components/IconView.cs
2006-01-18 15:46:39 UTC (rev 55729)
+++
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components/IconView.cs
2006-01-18 15:49:11 UTC (rev 55730)
@@ -10,7 +10,7 @@
Hashtable userData = new Hashtable ();
- public object CurrentlySelected;
+ object currentlySelected;
public event EventHandler IconSelected;
public event EventHandler IconDoubleClicked;
@@ -38,9 +38,23 @@
userData.Add (itm, obj);
}
+ public object CurrentlySelected {
+ get {
+ return currentlySelected;
+ }
+ set {
+ foreach (DictionaryEntry de in userData) {
+ if (de.Value == value) {
+ iconList.SelectIcon
((int)de.Key);
+ return;
+ }
+ }
+ }
+ }
+
void HandleKeyPressed (object o, KeyPressEventArgs args)
{
- if (CurrentlySelected == null)
+ if (currentlySelected == null)
return;
if (args.Event.Key == Gdk.Key.Return &&
IconDoubleClicked != null)
@@ -49,7 +63,7 @@
void HandleIconSelected (object o, IconSelectedArgs args)
{
- CurrentlySelected = userData [args.Num];
+ currentlySelected = userData [args.Num];
if (IconSelected != null)
IconSelected (this, EventArgs.Empty);
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
2006-01-18 15:46:39 UTC (rev 55729)
+++
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
2006-01-18 15:49:11 UTC (rev 55730)
@@ -95,5 +95,9 @@
<File name="./icons/MonoDevelop.Close.png" subtype="Code"
buildaction="Nothing" />
<File name="./MonoDevelop.Components.Commands/CommandInfoSet.cs"
subtype="Code" buildaction="Compile" />
</Contents>
- <References />
+ <References>
+ <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp,
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp,
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp,
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ </References>
</Project>
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches