[Monodevelop-patches-list] r1077 - in trunk/MonoDevelop: data/resources/glade src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions src/Main/Base/Internal/Project/Project src/Main/Base/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Mar 2 01:22:04 EST 2004


Author: jba
Date: 2004-03-02 01:22:04 -0500 (Tue, 02 Mar 2004)
New Revision: 1077

Modified:
   trunk/MonoDevelop/data/resources/glade/Base.glade
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
   trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs
   trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs
   trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs
Log:
added IncludeFilesDialog to project load sequence

Modified: trunk/MonoDevelop/data/resources/glade/Base.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/Base.glade	2004-03-02 01:23:32 UTC (rev 1076)
+++ trunk/MonoDevelop/data/resources/glade/Base.glade	2004-03-02 06:22:04 UTC (rev 1077)
@@ -4218,4 +4218,292 @@
   </child>
 </widget>
 
+<widget class="GtkDialog" id="IncludeFilesDialogWidget">
+  <property name="title" translatable="yes">Include Found Files</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <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_area3">
+	  <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="has_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="vbox62">
+	  <property name="border_width">6</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="newFilesInProjectLabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">label68</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow9">
+	      <property name="width_request">100</property>
+	      <property name="height_request">100</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="IncludeFileListView">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="headers_visible">False</property>
+		  <property name="rules_hint">True</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="GtkHBox" id="hbox41">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox63">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="viewLabel">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">label70</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox42">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="labelSpacer1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">   </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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox64">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="newFilesOnlyRadioButton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">radiobutton1</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="allFilesRadioButton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">radiobutton2</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">newFilesOnlyRadioButton</property>
+			    </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>
+		    <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>
+
+	      <child>
+		<widget class="GtkVButtonBox" id="vbuttonbox2">
+		  <property name="border_width">6</property>
+		  <property name="visible">True</property>
+		  <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkButton" id="selectAllButton">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">button1</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="deselectAllButton">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">button3</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </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>
+  </child>
+</widget>
+
 </glade-interface>

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-03-02 01:23:32 UTC (rev 1076)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-03-02 06:22:04 UTC (rev 1077)
@@ -100,17 +100,11 @@
 			}			
 		void AutoLoadCheckBoxCheckedChangeEvent(object sender, EventArgs e)
 		{
-			autoInsertNewFilesCheckButton.Sensitive = false;
-			autoInsertNewFilesCheckButton.Active = newFilesOnLoadCheckButton.Active;
-			
-			// FIXME: leave this deselected and checked by default for 0.1 release, uncomment again after release
- 			/*
 			autoInsertNewFilesCheckButton.Sensitive = newFilesOnLoadCheckButton.Active;
 			if (newFilesOnLoadCheckButton.Active == false) 
 			{
 				autoInsertNewFilesCheckButton.Active = false;
-			}
-			*/
+			}			
 		}
 
 			

Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs	2004-03-02 01:23:32 UTC (rev 1076)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs	2004-03-02 06:22:04 UTC (rev 1077)
@@ -230,9 +230,11 @@
 						projectFiles.Add(newFile);
 					}
 				} else {
-				//	new IncludeFilesDialog(this, newFiles).ShowDialog();
-					Console.WriteLine ("UnportedDialog in Internal/Project/Project/AbstractProject"); 
+					new IncludeFilesDialog(this, newFiles).ShowDialog();
 				}
+				
+				// FIXME: need to find a way to do the following
+				// force the project pad to refresh - because it has already loaded before the new files were found
 			}
 		}
 		

Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs	2004-03-02 01:23:32 UTC (rev 1076)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs	2004-03-02 06:22:04 UTC (rev 1077)
@@ -4,13 +4,11 @@
 //     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
 //     <version value="$version"/>
 // </file>
-#if !LINUX
 using System;
 using System.Drawing;
 using System.Collections;
 using System.Collections.Specialized;
 using System.ComponentModel;
-using System.Windows.Forms;
 using ICSharpCode.Core.Properties;
 
 using ICSharpCode.Core.Services;
@@ -18,239 +16,170 @@
 using ICSharpCode.SharpDevelop.Gui;
 using ICSharpCode.SharpDevelop.Internal.Project;
 
+using Gtk;
+
 namespace ICSharpCode.SharpDevelop.Internal.Project
 {
 	/// <summary>
 	/// Summary description for Form1.
 	/// </summary>
-	public class IncludeFilesDialog : System.Windows.Forms.Form
+	public class IncludeFilesDialog
 	{
-		GroupBox    GroupBox1;
-		RadioButton RadiookButton;
-		RadioButton RadioButton1;
-		CheckedListBox CheckedListBox1;
-		Button okButton;
-		Button selectAllButton;
-		Button cancelButton;
-		Label Label1;
-		Label Label2;
-		Button deselectAllButton;
+		// gtk widgets
+		[Glade.Widget] Button okbutton;
+		[Glade.Widget] Button cancelbutton;
+		[Glade.Widget] Button selectAllButton;
+		[Glade.Widget] Button deselectAllButton;
+		[Glade.Widget] RadioButton newFilesOnlyRadioButton;
+		[Glade.Widget] RadioButton allFilesRadioButton;
+		[Glade.Widget] Label newFilesInProjectLabel;
+		[Glade.Widget] Label viewLabel;
+		[Glade.Widget] TreeView IncludeFileListView;
+		[Glade.Widget] Dialog IncludeFilesDialogWidget;
+		public ListStore store;
 		
+		// regular members
 		StringCollection newFiles;
 		IProject         project;
 		IResourceService resourceService = (IResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+		FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
 		
 		public IncludeFilesDialog(IProject project, StringCollection newFiles)
 		{
-			//
-			// Required for Windows Form Designer support
-			//
-			InitializeComponent();
+			// we must do it from *here* otherwise, we get this assembly, not the caller
+			Glade.XML glade = new Glade.XML (null, "Base.glade", "IncludeFilesDialogWidget", null);
+			glade.Autoconnect (this);
+			InitDialog ();
 			
-			MinimizeBox = MaximizeBox = false;
+			// set up dialog title
 			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
-			Text = stringParserService.Parse(resourceService.GetString("Dialog.IncludeFilesDialog.DialogName"), 
-			                          new string[,] {{ "PROJECT",  project.Name}});
+			this.IncludeFilesDialogWidget.Title = 
+				stringParserService.Parse(resourceService.GetString("Dialog.IncludeFilesDialog.DialogName"), 
+			    new string[,] {{ "PROJECT",  project.Name}});
 			
-			Owner = (Form)WorkbenchSingleton.Workbench;
-			StartPosition = FormStartPosition.CenterParent;
-			Icon = null;
-			RadioButton1.Checked = true;
-			
+			newFilesOnlyRadioButton.Active = true;
 			this.newFiles = newFiles;
 			this.project  = project;
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+			
+			this.InitialiseIncludeFileList();
+			
+			// wire in event handlers
+			okbutton.Clicked += new EventHandler(AcceptEvent);
+			cancelbutton.Clicked += new EventHandler(CancelEvent);
+			selectAllButton.Clicked += new EventHandler(SelectAll);
+			deselectAllButton.Clicked += new EventHandler(DeselectAll);
+
+			// FIXME: I'm pretty sure that these radio buttons 
+			// don't actually work in SD 0.98 either, so disabling them
+			newFilesOnlyRadioButton.Sensitive = false;
+			allFilesRadioButton.Sensitive = false;
+		}
+		
+		#region includeFileListView methods and events 
+		
+		// initialises and populates the include file list tree view
+		private void InitialiseIncludeFileList()
+		{
+			// set up the list store and treeview
+			store = new ListStore (typeof(bool), typeof(string));
+			IncludeFileListView.Selection.Mode = SelectionMode.None;
+			IncludeFileListView.Model = store;
+			CellRendererToggle rendererToggle = new CellRendererToggle ();
+			rendererToggle.Activatable = true;
+			rendererToggle.Toggled += new ToggledHandler (ItemToggled);
+			IncludeFileListView.AppendColumn ("Choosen", rendererToggle, "active", 0);
+			IncludeFileListView.AppendColumn ("Name", new CellRendererText (), "text", 1);
+			TreeIter iter = new TreeIter ();
+			
+			// add the found files to the check list box						
 			foreach (string file in newFiles) {
-				CheckedListBox1.Items.Add(fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, file));
+				string name = fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, file);
+				iter = store.AppendValues (false, name);
 			}
+		}
+		
+		private void ItemToggled (object o, ToggledArgs args)
+		{
+			const int column = 0;
+			Gtk.TreeIter iter;
 			
-			okButton.Click += new EventHandler(AcceptEvent);
-			selectAllButton.Click += new EventHandler(SelectAll);
-			deselectAllButton.Click += new EventHandler(DeselectAll);
+			if (store.GetIterFromString(out iter, args.Path)) {
+				bool val = (bool) store.GetValue(iter, column);
+				store.SetValue(iter, column, !val);
+			}
 		}
 		
+		#endregion
+		
 		void AcceptEvent(object sender, EventArgs e)
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-			for (int i = 0; i < CheckedListBox1.Items.Count; ++i) {
-				string file = fileUtilityService.RelativeToAbsolutePath(project.BaseDirectory,CheckedListBox1.Items[i].ToString());
+			TreeIter first;	
+			store.GetIterFirst(out first);
+			TreeIter current = first;
+ 			for (int i = 0; i < store.IterNChildren() ; ++i) {
+				// get column raw values
+				bool isSelected = (bool) store.GetValue(current, 0);
+				string fileName = (string) store.GetValue(current, 1);
+			
+				// process raw values into actual project details
+				string file = fileUtilityService.RelativeToAbsolutePath(project.BaseDirectory,fileName);
 				ProjectFile finfo = new ProjectFile(file);
-				if (CheckedListBox1.GetItemChecked(i)) {
+				if (isSelected) {
 					finfo.BuildAction = project.IsCompileable(file) ? BuildAction.Compile : BuildAction.Nothing;
 				} else {
 					finfo.BuildAction = BuildAction.Exclude;
 				}
 				project.ProjectFiles.Add(finfo);
+				
+				store.IterNext(out current);
 			}
+			
+			IncludeFilesDialogWidget.Destroy();
 		}
 		
+		void CancelEvent(object sender, EventArgs e)
+		{
+			IncludeFilesDialogWidget.Destroy();
+		}
+		
 		void SelectAll(object sender, EventArgs e)
 		{
-			for (int i = 0; i < CheckedListBox1.Items.Count; ++i) {
-				CheckedListBox1.SetItemChecked(i, true);
-			}
+			SetAllCheckedValues(true);
 		}
 		
 		void DeselectAll(object sender, EventArgs e)
 		{
-			for (int i = 0; i < CheckedListBox1.Items.Count; ++i) {
-				CheckedListBox1.SetItemChecked(i, false);
+			SetAllCheckedValues(false);
+		}
+		
+		private void SetAllCheckedValues(bool value)
+		{
+			TreeIter first;	
+			store.GetIterFirst(out first);
+			TreeIter current = first;
+ 			for (int i = 0; i < store.IterNChildren() ; ++i) {
+				store.SetValue(current, 0, value);
+				
+				store.IterNext(out current);
 			}
 		}
-
-		/// <summary>
-		/// Required method for Designer support - do not modify
-		/// the contents of this method with the code editor.
-		/// </summary>
-		private void InitializeComponent()
+		
+		private void InitDialog()
 		{
-			PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-			this.GroupBox1 = new System.Windows.Forms.GroupBox();
-			this.RadiookButton = new System.Windows.Forms.RadioButton();
-			this.RadioButton1 = new System.Windows.Forms.RadioButton();
-			this.CheckedListBox1 = new System.Windows.Forms.CheckedListBox();
-			this.okButton = new System.Windows.Forms.Button();
-			this.selectAllButton = new System.Windows.Forms.Button();
-			this.cancelButton = new System.Windows.Forms.Button();
-			this.Label1 = new System.Windows.Forms.Label();
-			this.Label2 = new System.Windows.Forms.Label();
-			this.deselectAllButton = new System.Windows.Forms.Button();
-			this.GroupBox1.SuspendLayout();
-			this.SuspendLayout();
-			// 
-			// GroupBox1
-			// 
-			this.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-				| System.Windows.Forms.AnchorStyles.Left);
-			this.GroupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
-																					this.RadiookButton,
-																					this.RadioButton1});
-			this.GroupBox1.Location = new System.Drawing.Point(8, 232);
-			this.GroupBox1.Name = "GroupBox1";
-			this.GroupBox1.Size = new System.Drawing.Size(152, 98);
-			this.GroupBox1.TabIndex = 2;
-			this.GroupBox1.TabStop = false;
-			this.GroupBox1.Text = resourceService.GetString("Dialog.IncludeFilesDialog.ViewGroupBoxText");
-			GroupBox1.FlatStyle = FlatStyle.System;
-			
-			//
-			// RadiookButton
-			// 
-			this.RadiookButton.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right);
-			this.RadiookButton.Location = new System.Drawing.Point(8, 40);
-			this.RadiookButton.Name = "RadiookButton";
-			this.RadiookButton.Size = new System.Drawing.Size(136, 24);
-			this.RadiookButton.TabIndex = 4;
-			this.RadiookButton.Text = resourceService.GetString("Dialog.IncludeFilesDialog.AllFilesRadioButton");
-			RadiookButton.FlatStyle = FlatStyle.System;
-			
-			// 
-			// RadioButton1
-			// 
-			this.RadioButton1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right);
-			this.RadioButton1.Location = new System.Drawing.Point(8, 16);
-			this.RadioButton1.Name = "RadioButton1";
-			this.RadioButton1.Size = new System.Drawing.Size(136, 24);
-			this.RadioButton1.TabIndex = 3;
-			this.RadioButton1.Text = resourceService.GetString("Dialog.IncludeFilesDialog.NewFilesRadioButton");
-			RadioButton1.FlatStyle = FlatStyle.System;
-			
-			// 
-			// CheckedListBox1
-			// 
-			this.CheckedListBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right);
-			this.CheckedListBox1.Location = new System.Drawing.Point(8, 24);
-			this.CheckedListBox1.Name = "CheckedListBox1";
-			this.CheckedListBox1.Size = new System.Drawing.Size(316, 199);
-			this.CheckedListBox1.TabIndex = 1;
-			// 
-			// okButton
-			// 
-			this.okButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
-			this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-			this.okButton.Location = new System.Drawing.Point(172, 308);
-			this.okButton.Name = "okButton";
-			this.okButton.TabIndex = 5;
-			this.okButton.Text = resourceService.GetString("Global.OKButtonText");
-			this.okButton.DialogResult = DialogResult.OK;
-			okButton.FlatStyle = FlatStyle.System;
-			
-			// 
-			// selectAllButton
-			// 
-			this.selectAllButton.Location = new System.Drawing.Point(168, 232);
-			this.selectAllButton.Name = "selectAllButton";
-			this.selectAllButton.TabIndex = 2;
-			this.selectAllButton.Size = new Size(96, 23);
-			this.selectAllButton.Text = resourceService.GetString("Dialog.IncludeFilesDialog.SelectAllButton");
-			selectAllButton.FlatStyle = FlatStyle.System;
-			
-			// 
-			// cancelButton
-			// 
-			this.cancelButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
-			this.cancelButton.Location = new System.Drawing.Point(252, 308);
-			this.cancelButton.Name = "cancelButton";
-			this.cancelButton.TabIndex = 6;
-			this.cancelButton.Text = resourceService.GetString("Global.CancelButtonText");
-			this.cancelButton.DialogResult = DialogResult.Cancel;
-			cancelButton.FlatStyle = FlatStyle.System;
-			
-			// 
-			// Label1
-			// 
-			this.Label1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right);
-			this.Label1.Location = new System.Drawing.Point(8, 8);
-			this.Label1.Name = "Label1";
-			this.Label1.Size = new System.Drawing.Size(316, 16);
-			this.Label1.TabIndex = 0;
-			this.Label1.Text = resourceService.GetString("Dialog.IncludeFilesDialog.IncludeFilesLabel");
-			
-			// 
-			// Label2
-			// 
-			this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right);
-			this.Label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-			this.Label2.Location = new System.Drawing.Point(168, 298);
-			this.Label2.Name = "Label2";
-			this.Label2.Size = new System.Drawing.Size(154, 3);
-			this.Label2.TabIndex = 4;
-			// 
-			// deselectAllButton
-			// 
-			this.deselectAllButton.Location = new System.Drawing.Point(168, 264);
-			this.deselectAllButton.Name = "deselectAllButton";
-			this.deselectAllButton.TabIndex = 3;
-			this.deselectAllButton.Size = new Size(96, 23);
-			this.deselectAllButton.Text = resourceService.GetString("Dialog.IncludeFilesDialog.DeselectAllButton");
-			deselectAllButton.FlatStyle = FlatStyle.System;
-			
-			// 
-			// Form1
-			// 
-			this.AcceptButton = this.cancelButton;
-			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-			this.CancelButton = this.okButton;
-			this.ClientSize = new System.Drawing.Size(330, 335);
-			this.Controls.AddRange(new System.Windows.Forms.Control[] {this.GroupBox1,
-			                       this.CheckedListBox1,
-			                       this.okButton,
-			                       this.selectAllButton,
-			                       this.cancelButton,
-			                       this.Label1,
-			                       this.Label2,
-			                       this.deselectAllButton});
-			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-			this.Name = "Form1";
-			this.GroupBox1.ResumeLayout(false);
-			this.ResumeLayout(false);
-
+			// setup all the strings
+			this.deselectAllButton.Label = resourceService.GetString("Dialog.IncludeFilesDialog.DeselectAllButton");
+			this.newFilesOnlyRadioButton.Label = resourceService.GetString("Dialog.IncludeFilesDialog.NewFilesRadioButton");
+			this.allFilesRadioButton.Label = resourceService.GetString("Dialog.IncludeFilesDialog.AllFilesRadioButton");
+			this.newFilesInProjectLabel.Text = resourceService.GetString("Dialog.IncludeFilesDialog.IncludeFilesLabel");
+			this.selectAllButton.Label = resourceService.GetString("Dialog.IncludeFilesDialog.SelectAllButton");
+			this.viewLabel.Markup = "<b>" + resourceService.GetString("Dialog.IncludeFilesDialog.ViewGroupBoxText") + "</b>";
 		}
+		
+		public void ShowDialog()
+		{
+			this.IncludeFilesDialogWidget.ShowAll();
+		}
+
 	}
 }
-#endif
+

Modified: trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs	2004-03-02 01:23:32 UTC (rev 1076)
+++ trunk/MonoDevelop/src/Main/Base/Services/ResourceService.cs	2004-03-02 06:22:04 UTC (rev 1077)
@@ -231,7 +231,7 @@
 				throw new ResourceNotFoundException("string >" + name + "<");
 			}
 			
-			return s;
+			return s.Replace (@"\&", "||!|").Replace ("&", "_").Replace ("||!|", "&");;
 		}
 		
 		// use P/Invoke to be able to pass some NULL parameters




More information about the Monodevelop-patches-list mailing list