[Monodevelop-patches-list] r586 - trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jan 19 22:03:18 EST 2004


Author: jluke
Date: 2004-01-19 22:03:18 -0500 (Mon, 19 Jan 2004)
New Revision: 586

Modified:
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
Log:
use Gnome.FileEntry
fix mnemmonics


Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs	2004-01-20 03:03:07 UTC (rev 585)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs	2004-01-20 03:03:18 UTC (rev 586)
@@ -28,14 +28,13 @@
 		//
 		// Gtk controls
 		//
-		Gtk.Entry projectLocationTextBox;
+		Gnome.FileEntry projectLocationTextBox;
 		Gtk.RadioButton saveChangesRadioButton;
 		Gtk.RadioButton promptChangesRadioButton;
 		Gtk.RadioButton noSaveRadioButton;
 		Gtk.CheckButton loadPrevProjectCheckBox;
 		Gtk.CheckButton showTaskListCheckBox;
 		Gtk.CheckButton showOutputCheckBox;
-		Gtk.Button selectProjectLocationButton;
 		
 		// service instances needed
 		StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
@@ -49,7 +48,7 @@
 			SetupPanelInstance();
 			
 			// read properties
-			projectLocationTextBox.Text = PropertyService.GetProperty("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SharpDevelop Projects")).ToString();
+			projectLocationTextBox.GtkEntry.Text = PropertyService.GetProperty("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SharpDevelop Projects")).ToString();
 			
 			BeforeCompileAction action = (BeforeCompileAction)PropertyService.GetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", BeforeCompileAction.SaveAllFiles);
 			
@@ -67,13 +66,12 @@
 			showTaskListCheckBox.Active = (bool)PropertyService.GetProperty("SharpDevelop.ShowTaskListAfterBuild", true);
 			showOutputCheckBox.Active = (bool)PropertyService.GetProperty("SharpDevelop.ShowOutputWindowAtBuild", true);
 			
-			selectProjectLocationButton.Clicked += new EventHandler(SelectProjectLocationButtonClicked);
 		}
 		
 		public override bool StorePanelContents()
 		{
 			// check for correct settings
-			string projectPath = projectLocationTextBox.Text;
+			string projectPath = projectLocationTextBox.GtkEntry.Text;
 			if (projectPath.Length > 0) {
 				if (!FileUtilityService.IsValidFileName(projectPath)) {
 					MessageService.ShowError("Invalid project path specified");
@@ -112,13 +110,10 @@
 			Gtk.Label label1 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ProjectLocationLabel}"));
 				// make the location text box and button
 				Gtk.HBox hBox1 = new Gtk.HBox(false,2);
-				projectLocationTextBox = new Gtk.Entry();
-				selectProjectLocationButton = Button.NewWithLabel("...");
+				projectLocationTextBox = new Gnome.FileEntry ("", "Choose Location");
 				// FIXME:: make this button sensitive again when the FOlderDialog is implemented
-				selectProjectLocationButton.Sensitive = false;
 				hBox1.PackStart(projectLocationTextBox, true, true, 2);
-				hBox1.PackStart(selectProjectLocationButton, false, false, 2);
-			loadPrevProjectCheckBox = Gtk.CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.LoadPrevProjectCheckBox}"));
+			loadPrevProjectCheckBox = new Gtk.CheckButton (StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.LoadPrevProjectCheckBox}"));
 			// pack them all
 			vBox1.PackStart(label1, false, false, 2);
 			vBox1.PackStart(hBox1, false, false, 2);
@@ -133,9 +128,9 @@
 			Gtk.VBox vBox2 = new Gtk.VBox(false, 2);
 			saveChangesRadioButton = new RadioButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.SaveChangesRadioButton}"));
 			promptChangesRadioButton = new RadioButton(saveChangesRadioButton, StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.PromptToSaveRadioButton}"));
-			noSaveRadioButton = new RadioButton(promptChangesRadioButton, StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.DontSaveRadioButton}"));
-			showOutputCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowOutputPadCheckBox}"));;
-			showTaskListCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowTaskListPadCheckBox}"));
+			noSaveRadioButton = new RadioButton (promptChangesRadioButton, StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.DontSaveRadioButton}"));
+			showOutputCheckBox = new CheckButton (StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowOutputPadCheckBox}"));;
+			showTaskListCheckBox = new CheckButton (StringParserService.Parse("${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowTaskListPadCheckBox}"));
 			// pack them all
 			vBox2.PackStart(saveChangesRadioButton, false, false, 2);
 			vBox2.PackStart(promptChangesRadioButton, false, false, 2);
@@ -151,14 +146,5 @@
 			
 			this.Add(mainBox);		
 		}		
-		
-		void SelectProjectLocationButtonClicked(object sender, EventArgs e)
-		{
-// FIXME: fix the FolderDialog control first so that we could then use it here
-//			FolderDialog fdiag = new  FolderDialog();
-//			if (fdiag.DisplayDialog("Select default combile location") == DialogResult.OK) {
-//				projectLocationTextBox.Text = fdiag.Path;
-//			}
-		}
 	}
 }




More information about the Monodevelop-patches-list mailing list