[Monodevelop-patches-list] r449 - in trunk/MonoDevelop: . src/AddIns/DisplayBindings/TextEditor/Gui/OptionPanels src/Main/Base/Commands src/Main/Base/Commands/ProjectBrowserCommands src/Main/Base/Gui/Dialogs

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 11 17:20:26 EST 2004


Author: tberman
Date: 2004-01-11 17:20:26 -0500 (Sun, 11 Jan 2004)
New Revision: 449

Modified:
   trunk/MonoDevelop/RELEASE_REQUIREMENTS
   trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs
   trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
   trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
   trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
Log:
some project browser context menu implementations

updating release requirements

jba's new OptionPanel


Modified: trunk/MonoDevelop/RELEASE_REQUIREMENTS
===================================================================
--- trunk/MonoDevelop/RELEASE_REQUIREMENTS	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/RELEASE_REQUIREMENTS	2004-01-11 22:20:26 UTC (rev 449)
@@ -12,3 +12,4 @@
   around)
 ~ Fix HtmlControl cause its busted
 ~ Why the hell is new file showing up as Ctrl+O?!?
+~ Context menu items inside a submenu require a right click to activate, why?

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -1,86 +1,174 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Collections;
-
-using ICSharpCode.SharpDevelop.Internal.ExternalTool;
-using ICSharpCode.SharpDevelop.Internal.Templates;
-using ICSharpCode.Core.Properties;
-using ICSharpCode.Core.AddIns.Codons;
-
-using ICSharpCode.Core.Services;
-
-using ICSharpCode.TextEditor;
-using ICSharpCode.TextEditor.Document;
-using ICSharpCode.SharpDevelop.Gui.Dialogs;
-
-namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
-{
-	/// <summary>
-	/// Summary description for Form8.
-	/// </summary>
-	public class BehaviorTextEditorPanel : AbstractOptionPanel
-	{/*
-		public override void LoadPanelContents()
-		{
-			SetupFromXml(Path.Combine(PropertyService.DataDirectory, 
-			                          @"resources\panels\BehaviorTextEditorPanel.xfrm"));
-			
-			((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked = ((IProperties)CustomizationObject).GetProperty("AutoInsertCurlyBracket", true);
-			((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked      = ((IProperties)CustomizationObject).GetProperty("HideMouseCursor", true);
-			((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked       = ((IProperties)CustomizationObject).GetProperty("CursorBehindEOL", false);
-			((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked  = ((IProperties)CustomizationObject).GetProperty("AutoInsertTemplates", true);
-			
-			((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked  = ((IProperties)CustomizationObject).GetProperty("TabsToSpaces", false);
-			
-			ControlDictionary["tabSizeTextBox"].Text    = ((IProperties)CustomizationObject).GetProperty("TabIndent", 4).ToString();
-			ControlDictionary["indentSizeTextBox"].Text = ((IProperties)CustomizationObject).GetProperty("IndentationSize", 4).ToString();
-			
-			((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.None}"));
-			((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Automatic}"));
-			((ComboBox)ControlDictionary["indentStyleComboBox"]).Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Smart}"));
-			
-			((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex = (int)(IndentStyle)((IProperties)CustomizationObject).GetProperty("IndentStyle", IndentStyle.Smart);
-		
-			((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.NormalMouseDirectionRadioButton}"));
-			((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).Items.Add(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.ReverseMouseDirectionRadioButton}"));
-			((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex = ((IProperties)CustomizationObject).GetProperty("MouseWheelScrollDown", true) ? 0 : 1;
-		}
-		
-		public override bool StorePanelContents()
-		{
-			((IProperties)CustomizationObject).SetProperty("TabsToSpaces",         ((CheckBox)ControlDictionary["convertTabsToSpacesCheckBox"]).Checked);
-			((IProperties)CustomizationObject).SetProperty("MouseWheelScrollDown", ((ComboBox)ControlDictionary["mouseWhellDirectionComboBox"]).SelectedIndex == 0);
-			
-			((IProperties)CustomizationObject).SetProperty("AutoInsertCurlyBracket", ((CheckBox)ControlDictionary["autoinsertCurlyBraceCheckBox"]).Checked);
-			((IProperties)CustomizationObject).SetProperty("HideMouseCursor",        ((CheckBox)ControlDictionary["hideMouseCursorCheckBox"]).Checked);
-			((IProperties)CustomizationObject).SetProperty("CursorBehindEOL",        ((CheckBox)ControlDictionary["caretBehindEOLCheckBox"]).Checked);
-			((IProperties)CustomizationObject).SetProperty("AutoInsertTemplates",    ((CheckBox)ControlDictionary["auotInsertTemplatesCheckBox"]).Checked);
-			
-			((IProperties)CustomizationObject).SetProperty("IndentStyle", ((ComboBox)ControlDictionary["indentStyleComboBox"]).SelectedIndex);
-			
-			try {
-				int tabSize = Int32.Parse(ControlDictionary["tabSizeTextBox"].Text);
-				
-				// FIX: don't allow to set tab size to zero as this will cause divide by zero exceptions in the text control.
-				// Zero isn't a setting that makes sense, anyway.
-				if (tabSize > 0) {
-					((IProperties)CustomizationObject).SetProperty("TabIndent", tabSize);
-				}
-			} catch (Exception) {
-			}
-			
-			try {
-				((IProperties)CustomizationObject).SetProperty("IndentationSize", Int32.Parse(ControlDictionary["indentSizeTextBox"].Text));
-			} catch (Exception) {
-			}
-			return true;
-		}*/
-	}
-}
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Collections;
+
+using ICSharpCode.SharpDevelop.Internal.ExternalTool;
+using ICSharpCode.SharpDevelop.Internal.Templates;
+using ICSharpCode.Core.Properties;
+using ICSharpCode.Core.AddIns.Codons;
+
+using ICSharpCode.Core.Services;
+
+using ICSharpCode.TextEditor;
+using ICSharpCode.TextEditor.Document;
+using ICSharpCode.SharpDevelop.Gui.Dialogs;
+
+using Gtk;
+
+namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
+{
+	/// <summary>
+	/// Summary description for Form8.
+	/// </summary>
+	public class BehaviorTextEditorPanel : AbstractOptionPanel
+	{
+		// GTK controls
+		CheckButton		autoinsertCurlyBraceCheckBox;
+		CheckButton		hideMouseCursorCheckBox;
+		CheckButton		caretBehindEOLCheckBox;
+		CheckButton		auotInsertTemplatesCheckBox;
+		CheckButton		convertTabsToSpacesCheckBox;
+		Entry			tabSizeTextBox;
+		Entry			indentSizeTextBox;
+		Gtk.Menu		indentStyleComboBoxMenu;
+		Gtk.OptionMenu	indentStyleComboBox;
+		Gtk.Menu		mouseWhellDirectionComboBoxMenu;
+		Gtk.OptionMenu	mouseWhellDirectionComboBox;
+		
+		// Services
+		StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
+		
+		public override void LoadPanelContents()
+		{
+			// set up the form controls instance
+			SetupPanelInstance();			
+			
+			autoinsertCurlyBraceCheckBox.Active = ((IProperties)CustomizationObject).GetProperty("AutoInsertCurlyBracket", true);
+			hideMouseCursorCheckBox.Active      = ((IProperties)CustomizationObject).GetProperty("HideMouseCursor", true);
+			caretBehindEOLCheckBox.Active       = ((IProperties)CustomizationObject).GetProperty("CursorBehindEOL", false);
+			auotInsertTemplatesCheckBox.Active  = ((IProperties)CustomizationObject).GetProperty("AutoInsertTemplates", true);
+			
+			convertTabsToSpacesCheckBox.Active  = ((IProperties)CustomizationObject).GetProperty("TabsToSpaces", false);
+			
+			tabSizeTextBox.Text    = ((IProperties)CustomizationObject).GetProperty("TabIndent", 4).ToString();
+			indentSizeTextBox.Text = ((IProperties)CustomizationObject).GetProperty("IndentationSize", 4).ToString();
+			
+			indentStyleComboBoxMenu.Append(MenuItem.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.None}")));
+			indentStyleComboBoxMenu.Append(MenuItem.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Automatic}")));
+			indentStyleComboBoxMenu.Append(MenuItem.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentStyle.Smart}")));
+			
+			indentStyleComboBox.SetHistory((uint)(IndentStyle)((IProperties)CustomizationObject).GetProperty("IndentStyle", IndentStyle.Smart));
+		
+			mouseWhellDirectionComboBoxMenu.Append(MenuItem.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.NormalMouseDirectionRadioButton}")));
+			mouseWhellDirectionComboBoxMenu.Append(MenuItem.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.ReverseMouseDirectionRadioButton}")));
+			int selectedIndex = ((IProperties)CustomizationObject).GetProperty("MouseWheelScrollDown", true) ? 0 : 1;
+			mouseWhellDirectionComboBox.SetHistory((uint)selectedIndex);
+		}
+		
+		public override bool StorePanelContents()
+		{
+			((IProperties)CustomizationObject).SetProperty("TabsToSpaces",         convertTabsToSpacesCheckBox.Active);
+			((IProperties)CustomizationObject).SetProperty("MouseWheelScrollDown", mouseWhellDirectionComboBox.History == 0);
+			
+			((IProperties)CustomizationObject).SetProperty("AutoInsertCurlyBracket", autoinsertCurlyBraceCheckBox.Active);
+			((IProperties)CustomizationObject).SetProperty("HideMouseCursor",        hideMouseCursorCheckBox.Active);
+			((IProperties)CustomizationObject).SetProperty("CursorBehindEOL",        caretBehindEOLCheckBox.Active);
+			((IProperties)CustomizationObject).SetProperty("AutoInsertTemplates",    auotInsertTemplatesCheckBox.Active);
+			
+			((IProperties)CustomizationObject).SetProperty("IndentStyle", indentStyleComboBox.History);
+			
+			try {
+				int tabSize = Int32.Parse(tabSizeTextBox.Text);
+				
+				// FIX: don't allow to set tab size to zero as this will cause divide by zero exceptions in the text control.
+				// Zero isn't a setting that makes sense, anyway.
+				if (tabSize > 0) {
+					((IProperties)CustomizationObject).SetProperty("TabIndent", tabSize);
+				}
+			} catch (Exception) {
+			}
+			
+			try {
+				((IProperties)CustomizationObject).SetProperty("IndentationSize", Int32.Parse(indentSizeTextBox.Text));
+			} catch (Exception) {
+			}
+			return true;
+		}
+		
+		#region jba added methods
+		
+		private void SetupPanelInstance()
+		{
+			Gtk.Frame frame1 = new Gtk.Frame(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.TabsGroupBox}"));
+			//
+			// set up the Tab
+			//
+			// instantiate all the controls
+			Gtk.VBox vBox1 = new Gtk.VBox(false,2);
+			Gtk.Label label1 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.TabSizeLabel}"));
+			Gtk.Label label2 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentSizeLabel}"));
+			Gtk.Label label3 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentLabel}"));
+			tabSizeTextBox = new Entry();
+			indentSizeTextBox = new Entry();
+			indentStyleComboBoxMenu = new Menu();
+			indentStyleComboBox = new OptionMenu();
+			indentStyleComboBox.Menu = indentStyleComboBoxMenu;
+			convertTabsToSpacesCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.ConvertTabsToSpacesCheckBox}"));
+				// table to pack the tab settings options 
+				Table table1 = new Table(4, 2, false);
+				//pack the table
+				table1.Attach(label1, 0, 1, 0, 1);
+				table1.Attach(tabSizeTextBox, 1, 2, 0, 1);
+				table1.Attach(label2, 0, 1, 1, 2);
+				table1.Attach(indentSizeTextBox, 1, 2, 1, 2);
+				table1.Attach(label3, 2, 4, 0, 1);
+				table1.Attach(indentStyleComboBox, 2, 4, 1, 2);
+				
+			// pack them all
+			vBox1.PackStart(table1, false, false, 2);
+			vBox1.PackStart(convertTabsToSpacesCheckBox, false, false, 2);
+			frame1.Add(vBox1);
+			
+			//
+			// setup the behaviour options
+			//
+			//instantiate all the controls			
+			Gtk.Frame frame2 = new Gtk.Frame(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.BehaviourGroupBox}"));
+			Gtk.VBox vBox2 = new Gtk.VBox(false, 2);
+			
+			
+			autoinsertCurlyBraceCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.CurlyBracketCheckBox}"));
+			hideMouseCursorCheckBox  = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.HideMouseCheckBox}"));
+			caretBehindEOLCheckBox  = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.BehindEOLCheckBox}"));
+			auotInsertTemplatesCheckBox  = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.TemplateInsertCheckBox}"));			
+			Label label4 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.MouseWhellGroupBox}"));
+			mouseWhellDirectionComboBoxMenu = new Menu();
+			mouseWhellDirectionComboBox = new OptionMenu();
+			mouseWhellDirectionComboBox.Menu = mouseWhellDirectionComboBoxMenu;
+			// pack them all
+			vBox2.PackStart(caretBehindEOLCheckBox, false, false, 2);
+			vBox2.PackStart(auotInsertTemplatesCheckBox, false, false, 2);
+			vBox2.PackStart(autoinsertCurlyBraceCheckBox, false, false, 2);
+			vBox2.PackStart(hideMouseCursorCheckBox, false, false, 2);
+			vBox2.PackStart(label4, false, false, 2);
+			vBox2.PackStart(mouseWhellDirectionComboBox, false, false, 2);
+			frame2.Add(vBox2);
+			
+			// create the main box
+			Gtk.VBox mainBox = new Gtk.VBox(false, 2);
+			mainBox.PackStart(frame1, false, false, 2);
+			mainBox.PackStart(frame2, false, false, 2);
+			
+			this.Add(mainBox);
+		}
+		
+		#endregion
+	}
+}

Modified: trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -40,7 +40,7 @@
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			
 			NewProjectDialog npdlg = new NewProjectDialog(true);
-			npdlg.ShowAll ();
+			npdlg.Run ();
 		}
 	}
 	

Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -34,16 +34,17 @@
 	{
 		public override void Run()
 		{
+			Console.WriteLine ("A");
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			
 			if (node != null) {
-		//		NewProjectDialog npdlg = new NewProjectDialog(false);
-		//		if (npdlg.ShowDialog() == DialogResult.OK) {
-		//			node.Nodes.Add(ProjectBrowserView.BuildProjectTreeNode((IProject)node.Combine.AddEntry(npdlg.NewProjectLocation)));
-		//			projectService.SaveCombine();
-		//		}
+				NewProjectDialog npdlg = new NewProjectDialog(false);
+				if (npdlg.Run() == (int)Gtk.ResponseType.Ok) {
+					node.Nodes.Add(ProjectBrowserView.BuildProjectTreeNode((IProject)node.Combine.AddEntry(npdlg.NewProjectLocation)));
+					projectService.SaveCombine();
+				}
 			}
 		}
 	}
@@ -52,16 +53,17 @@
 	{
 		public override void Run()
 		{
+			Console.WriteLine ("A");
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			
 			if (node != null) {
-			//	NewProjectDialog npdlg = new NewProjectDialog(false);
-			//	if (npdlg.ShowDialog() == DialogResult.OK) {
-			//		node.Nodes.Add(ProjectBrowserView.BuildCombineTreeNode((Combine)node.Combine.AddEntry(npdlg.NewCombineLocation)));
-			//		projectService.SaveCombine();
-			//	}
+				NewProjectDialog npdlg = new NewProjectDialog(false);
+				if (npdlg.Run() == (int)Gtk.ResponseType.Ok) {
+					node.Nodes.Add(ProjectBrowserView.BuildCombineTreeNode((Combine)node.Combine.AddEntry(npdlg.NewCombineLocation)));
+					projectService.SaveCombine();
+				}
 			}
 		}
 	}
@@ -70,6 +72,7 @@
 	{
 		public override void Run()
 		{
+			Console.WriteLine ("A");
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
@@ -99,6 +102,7 @@
 	{
 		public override void Run()
 		{
+			Console.WriteLine ("A");
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
@@ -128,6 +132,7 @@
 	{
 		public override void Run()
 		{
+			Console.WriteLine ("A");
 			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;

Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -109,8 +109,8 @@
 				return;
 			}
 			
-			/*using (NewFileDialog nfd = new NewFileDialog()) {
-				if (nfd.ShowDialog() == DialogResult.OK) {
+			using (NewFileDialog nfd = new NewFileDialog()) {
+				if (nfd.Run() == (int)Gtk.ResponseType.Ok) {
 					IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
 					
 					int count = 1;
@@ -154,7 +154,7 @@
 					IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 					projectService.SaveCombine();
 				}
-			}*/
+			}
 		}
 	}
 	

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -68,6 +68,7 @@
 			} catch (Exception e) {
 				Console.WriteLine(e.ToString());
 			}
+			ShowAll ();
 		}
 		
 		void InitializeView()
@@ -386,8 +387,8 @@
 			TemplateView.PopulateTable();
 			viewbox.PackStart(TemplateView, true, true,0);
 
-			this.ActionArea.Add (cancelButton);
-			this.ActionArea.Add (okButton);
+			this.AddActionWidget (cancelButton, (int)Gtk.ResponseType.Cancel);
+			this.AddActionWidget (okButton, (int)Gtk.ResponseType.Ok);
 
 			this.VBox.PackStart (viewbox);
 			this.VBox.PackStart (infoLabelFrame, false, false, 6);

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-01-11 21:00:42 UTC (rev 448)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-01-11 22:20:26 UTC (rev 449)
@@ -76,6 +76,7 @@
 			//((TreeView)ControlDictionary["categoryTreeView"]).Select();
 			pathEntry.Text = propertyService.GetProperty("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)) + "MonoDevelopProjects").ToString();
 			//Icon = null;
+			ShowAll ();
 		}
 		
 		void InitializeView()
@@ -426,8 +427,8 @@
 			TemplateView.PopulateTable();
 			viewbox.PackStart(TemplateView, true, true,0);
 
-			this.ActionArea.PackStart (cancelButton);
-			this.ActionArea.PackStart (okButton);
+			this.AddActionWidget (cancelButton, (int)Gtk.ResponseType.Cancel);
+			this.AddActionWidget (okButton, (int)Gtk.ResponseType.Ok);
 
 			Table entryTable = new Table (3, 3, false);
 			entryTable.RowSpacing = 6;			




More information about the Monodevelop-patches-list mailing list