[Monodevelop-patches-list] r546 - trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jan 18 14:53:10 EST 2004
Author: tberman
Date: 2004-01-18 14:53:09 -0500 (Sun, 18 Jan 2004)
New Revision: 546
Modified:
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/COMReferencePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
Log:
now you can add references, still having treeview issues, will tell pedro
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs 2004-01-18 19:39:20 UTC (rev 545)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs 2004-01-18 19:53:09 UTC (rev 546)
@@ -18,7 +18,7 @@
namespace ICSharpCode.SharpDevelop.Gui.Dialogs
{
- public class AssemblyReferencePanel : Panel, IReferencePanel
+ public class AssemblyReferencePanel : Panel//, IReferencePanel
{
SelectReferenceDialog selectDialog;
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/COMReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/COMReferencePanel.cs 2004-01-18 19:39:20 UTC (rev 545)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/COMReferencePanel.cs 2004-01-18 19:53:09 UTC (rev 546)
@@ -20,7 +20,7 @@
namespace ICSharpCode.SharpDevelop.Gui.Dialogs
{
- public class COMReferencePanel : ListView, IReferencePanel
+ public class COMReferencePanel : ListView//, IReferencePanel
{
private enum RegKind
{
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs 2004-01-18 19:39:20 UTC (rev 545)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs 2004-01-18 19:53:09 UTC (rev 546)
@@ -31,12 +31,13 @@
{
this.selectDialog = selectDialog;
- store = new TreeStore (typeof (string), typeof (string), typeof(string), typeof(bool));
+ store = new TreeStore (typeof (string), typeof (string), typeof(string), typeof(bool), typeof(string));
treeView = new TreeView (store);
TreeViewColumn firstColumn = new TreeViewColumn ();
firstColumn.Title = resourceService.GetString ("Dialog.SelectReferenceDialog.GacReferencePanel.ReferenceHeader");
CellRendererToggle tog_render = new CellRendererToggle ();
+ tog_render.Toggled += new GtkSharp.ToggledHandler (AddReference);
firstColumn.PackStart (tog_render, false);
firstColumn.AddAttribute (tog_render, "active", 3);
@@ -56,13 +57,23 @@
Shadow = ShadowType.None;
}
- public void AddReference(object sender, EventArgs e)
+ public void AddReference(object sender, GtkSharp.ToggledArgs e)
{
- // foreach (ListViewItem item in SelectedItems) {
- // selectDialog.AddReference(ReferenceType.Gac,
- // item.Text,
- // item.Tag.ToString());
- // }
+ //foreach (ListViewItem item in SelectedItems) {
+ Gtk.TreeIter iter;
+ store.GetIterFromString (out iter, e.Path);
+ if ((bool)store.GetValue (iter, 3) == false) {
+ store.SetValue (iter, 3, true);
+ selectDialog.AddReference(ReferenceType.Gac,
+ (string)store.GetValue (iter, 0),
+ (string)store.GetValue (iter, 2));
+
+ } else {
+ store.SetValue (iter, 3, false);
+ selectDialog.RemoveReference (ReferenceType.Gac,
+ (string)store.GetValue (iter, 0),
+ (string)store.GetValue (iter, 2));
+ }
}
void PrintCache()
@@ -110,7 +121,7 @@
string name = an.Name;
string ver = an.Version.ToString ();
- store.AppendValues (name, ver, assembly, false);
+ store.AppendValues (name, ver, assembly, false, an.FullName);
} catch {
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs 2004-01-18 19:39:20 UTC (rev 545)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs 2004-01-18 19:53:09 UTC (rev 546)
@@ -16,7 +16,7 @@
namespace ICSharpCode.SharpDevelop.Gui.Dialogs
{
- public class ProjectReferencePanel : ListView, IReferencePanel
+ public class ProjectReferencePanel : ListView//, IReferencePanel
{
SelectReferenceDialog selectDialog;
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs 2004-01-18 19:39:20 UTC (rev 545)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs 2004-01-18 19:53:09 UTC (rev 546)
@@ -20,7 +20,7 @@
{
public interface IReferencePanel
{
- void AddReference(object sender, EventArgs e);
+ void AddReference(object sender, GtkSharp.ToggledArgs e);
}
/// <summary>
@@ -116,6 +116,18 @@
AddReferenceDialog.ShowAll ();
}
+ public void RemoveReference (ReferenceType referenceType, string referenceName, string referenceLocation)
+ {
+ Gtk.TreeIter looping_iter;
+ refTreeStore.GetIterFirst (out looping_iter);
+ do {
+ if (referenceLocation == (string)refTreeStore.GetValue (looping_iter, 2) && referenceName == (string)refTreeStore.GetValue (looping_iter, 0)) {
+ refTreeStore.Remove (ref looping_iter);
+ return;
+ }
+ } while (refTreeStore.IterNext (out looping_iter));
+ }
+
public void AddReference(ReferenceType referenceType, string referenceName, string referenceLocation)
{
Gtk.TreeIter looping_iter;
More information about the Monodevelop-patches-list
mailing list