[Monodevelop-patches-list] r527 - in trunk/MonoDevelop: data/resources/glade src/Main/Base/Commands/ProjectBrowserCommands src/Main/Base/Gui/Dialogs/ReferenceDialog src/Main/Base/Gui/ErrorDialogs
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jan 17 18:29:02 EST 2004
Author: tberman
Date: 2004-01-17 18:29:02 -0500 (Sat, 17 Jan 2004)
New Revision: 527
Modified:
trunk/MonoDevelop/data/resources/glade/Base.glade
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
trunk/MonoDevelop/src/Main/Base/Gui/ErrorDialogs/LoadingError.cs
Log:
blah blah, need jluke too look at something
Modified: trunk/MonoDevelop/data/resources/glade/Base.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/Base.glade 2004-01-17 21:40:58 UTC (rev 526)
+++ trunk/MonoDevelop/data/resources/glade/Base.glade 2004-01-17 23:29:02 UTC (rev 527)
@@ -689,4 +689,197 @@
</child>
</widget>
+<widget class="GtkDialog" id="AddReferenceDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">dialog1</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">400</property>
+ <property name="default_height">400</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox5">
+ <property name="border_width">2</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label7</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label6</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="ReferencesTreeView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="RemoveReferenceButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <signal name="clicked" handler="RemoveReference" last_modification_time="Sat, 17 Jan 2004 22:02:58 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs 2004-01-17 21:40:58 UTC (rev 526)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs 2004-01-17 23:29:02 UTC (rev 527)
@@ -40,21 +40,20 @@
IProject project = ((ProjectBrowserNode)node.Parent).Project;
IParserService parserService = (IParserService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IParserService));
- using (SelectReferenceDialog selDialog = new SelectReferenceDialog(project)) {
- if (selDialog.ShowDialog() == DialogResult.OK) {
+ SelectReferenceDialog selDialog = new SelectReferenceDialog(project);
+ if (selDialog.Run() == (int)Gtk.ResponseType.Ok) {
- foreach (ProjectReference refInfo in selDialog.ReferenceInformations) {
- project.ProjectReferences.Add(refInfo);
- parserService.AddReferenceToCompletionLookup(project, refInfo);
- }
-
- DefaultDotNetNodeBuilder.InitializeReferences(node, project);
- IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
- projectService.SaveCombine();
+ foreach (ProjectReference refInfo in selDialog.ReferenceInformations) {
+ project.ProjectReferences.Add(refInfo);
+ parserService.AddReferenceToCompletionLookup(project, refInfo);
}
+
+ DefaultDotNetNodeBuilder.InitializeReferences(node, project);
+ IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
+ projectService.SaveCombine();
}
- node.Expand();
}
+ node.Expand();
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs 2004-01-17 21:40:58 UTC (rev 526)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs 2004-01-17 23:29:02 UTC (rev 527)
@@ -10,11 +10,11 @@
using System.Collections;
using System.Diagnostics;
using System.ComponentModel;
-using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.Core.Services;
+using Gtk;
namespace ICSharpCode.SharpDevelop.Gui.Dialogs
{
@@ -26,8 +26,9 @@
/// <summary>
/// Summary description for Form2.
/// </summary>
- public class SelectReferenceDialog : System.Windows.Forms.Form
+ public class SelectReferenceDialog
{
+#if false
private System.Windows.Forms.ListView referencesListView;
private System.Windows.Forms.Button selectButton;
private System.Windows.Forms.Button removeButton;
@@ -47,40 +48,71 @@
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
+#endif
+
+ Gtk.TreeStore refTreeStore;
+ [Glade.Widget] Gtk.Dialog AddReferenceDialog;
+ [Glade.Widget] Gtk.TreeView ReferencesTreeView;
+ [Glade.Widget] Gtk.Button okbutton;
+ [Glade.Widget] Gtk.Button cancelbutton;
+ [Glade.Widget] Gtk.Button RemoveReferencesButton;
+ [Glade.Widget] Gtk.Notebook mainBook;
+
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
IProject configureProject;
public ArrayList ReferenceInformations {
get {
ArrayList referenceInformations = new ArrayList();
- foreach (ListViewItem item in referencesListView.Items) {
- Debug.Assert(item.Tag != null);
- referenceInformations.Add(item.Tag);
- }
+ Gtk.TreeIter looping_iter;
+ refTreeStore.GetIterFirst (out looping_iter);
+ do {
+ //Debug.Assert(item.Tag != null);
+ referenceInformations.Add(refTreeStore.GetValue(looping_iter, 3));
+ } while (refTreeStore.IterNext (out looping_iter));
return referenceInformations;
}
}
+
+ public int Run ()
+ {
+ return AddReferenceDialog.Run ();
+ }
public SelectReferenceDialog(IProject configureProject)
{
this.configureProject = configureProject;
- InitializeComponent();
+ Glade.XML refXML = new Glade.XML (null, "Base.glade", "AddReferenceDialog", null);
+ refXML.Autoconnect (this);
- gacTabPage.Controls.Add(new GacReferencePanel(this));
- projectTabPage.Controls.Add(new ProjectReferencePanel(this));
- browserTabPage.Controls.Add(new AssemblyReferencePanel(this));
+ AddReferenceDialog.Title = resourceService.GetString("Dialog.SelectReferenceDialog.DialogName");
- comTabPage.Controls.Add(new COMReferencePanel(this));
+ refTreeStore = new Gtk.TreeStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference));
+ ReferencesTreeView.Model = refTreeStore;
+
+ ReferencesTreeView.AppendColumn (resourceService.GetString("Dialog.SelectReferenceDialog.ReferenceHeader"), new CellRendererText (), "text", 0);
+ ReferencesTreeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.TypeHeader"), new CellRendererText (), "text", 1);
+ ReferencesTreeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.LocationHeader"), new CellRendererText (), "text", 2);
+
+ //InitializeComponent();
+
+ //gacTabPage.Controls.Add(new GacReferencePanel(this));
+ //projectTabPage.Controls.Add(new ProjectReferencePanel(this));
+ //browserTabPage.Controls.Add(new AssemblyReferencePanel(this));
+
+ //comTabPage.Controls.Add(new COMReferencePanel(this));
}
public void AddReference(ReferenceType referenceType, string referenceName, string referenceLocation)
{
- foreach (ListViewItem item in referencesListView.Items) {
- if (referenceLocation == item.SubItems[2].Text && referenceName == item.Text ) {
+ 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)) {
return;
}
- }
+ } while (refTreeStore.IterNext (out looping_iter));
foreach (ProjectReference refInfo in configureProject.ProjectReferences) {
if (refInfo.ReferenceType == referenceType) {
@@ -103,42 +135,42 @@
}
}
}
- ListViewItem newItem = new ListViewItem(new string[] {referenceName, referenceType.ToString(), referenceLocation});
+ ProjectReference tag;
switch (referenceType) {
case ReferenceType.Typelib:
- newItem.Tag = new ProjectReference(referenceType, referenceName + "|" + referenceLocation);
+ tag = new ProjectReference(referenceType, referenceName + "|" + referenceLocation);
break;
case ReferenceType.Project:
- newItem.Tag = new ProjectReference(referenceType, referenceName);
+ tag = new ProjectReference(referenceType, referenceName);
break;
default:
- newItem.Tag = new ProjectReference(referenceType, referenceLocation);
+ tag = new ProjectReference(referenceType, referenceLocation);
break;
}
-
- referencesListView.Items.Add(newItem);
+ refTreeStore.AppendValues (referenceName, referenceType.ToString (), referenceLocation, tag);
}
void SelectReference(object sender, EventArgs e)
{
- IReferencePanel refPanel = (IReferencePanel)referenceTabControl.SelectedTab.Controls[0];
- refPanel.AddReference(null, null);
+ //IReferencePanel refPanel = (IReferencePanel)referenceTabControl.SelectedTab.Controls[0];
+ //refPanel.AddReference(null, null);
}
void RemoveReference(object sender, EventArgs e)
{
- ArrayList itemsToDelete = new ArrayList();
+ //ArrayList itemsToDelete = new ArrayList();
- foreach (ListViewItem item in referencesListView.SelectedItems) {
- itemsToDelete.Add(item);
- }
-
- foreach (ListViewItem item in itemsToDelete) {
- referencesListView.Items.Remove(item);
- }
+ //foreach (ListViewItem item in referencesListView.SelectedItems) {
+ // itemsToDelete.Add(item);
+ //}
+ //
+ //foreach (ListViewItem item in itemsToDelete) {
+ // referencesListView.Items.Remove(item);
+ //}
}
-
+
+#if false
/// <summary>
/// Clean up any resources being used.
/// </summary>
@@ -318,5 +350,6 @@
this.referenceTabControl.ResumeLayout(false);
this.ResumeLayout(false);
}
+#endif
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/ErrorDialogs/LoadingError.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/ErrorDialogs/LoadingError.cs 2004-01-17 21:40:58 UTC (rev 526)
+++ trunk/MonoDevelop/src/Main/Base/Gui/ErrorDialogs/LoadingError.cs 2004-01-17 23:29:02 UTC (rev 527)
@@ -6,11 +6,11 @@
// </file>
using System;
-using System.Windows.Forms;
+//using System.Windows.Forms;
namespace ICSharpCode.SharpDevelop.Gui.ErrorDialogs
{
- public class LoadingError : System.Windows.Forms.Form
+/* public class LoadingError : System.Windows.Forms.Form
{
private System.ComponentModel.Container components;
private System.Windows.Forms.Button button1;
@@ -82,5 +82,5 @@
this.Controls.Add(label3);
this.Controls.Add(label1);
}
- }
+ }*/
}
More information about the Monodevelop-patches-list
mailing list