[Monodevelop-patches-list] r398 - in src/Main/Base/Gui: CompletionDatabaseWizard Dialogs/Wizard

commit-watcher at sevenl.net commit-watcher at sevenl.net
Tue Jan 6 20:53:45 EST 2004


Author: jluke
Date: 2004-01-06 20:53:44 -0500 (Tue, 06 Jan 2004)
New Revision: 398

Modified:
   src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
   src/Main/Base/Gui/CompletionDatabaseWizard/CreateDatabasePanel.cs
   src/Main/Base/Gui/CompletionDatabaseWizard/CreationFinishedPanel.cs
   src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
   src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs
Log:
fix some things
fast database creation should now work if you so choose


Modified: src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs	2004-01-07 00:22:33 UTC (rev 397)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs	2004-01-07 01:53:44 UTC (rev 398)
@@ -25,7 +25,7 @@
 		Button browseButton;
 		RadioButton specifyLocationRadioButton;
 		RadioButton sharpDevelopDirRadioButton;
-		Entry locationTextBox;
+		Entry locationTextBox = new Entry ();
 		
 		public override bool ReceiveDialogMessage(DialogMessage message)
 		{
@@ -60,8 +60,15 @@
 		}
 		
 		void SetEnableStatus(object sender, EventArgs e)
-		{
-			browseButton.Sensitive = locationTextBox.Sensitive = specifyLocationRadioButton.Active;
+		{
+			try
+			{
+				browseButton.Sensitive = locationTextBox.Sensitive = specifyLocationRadioButton.Active;
+			}
+			catch
+			{
+			}
+			
 			SetFinishedState(sender, e);
 		}
 		
@@ -75,10 +82,16 @@
 		
 		void SetFinishedState(object sender, EventArgs e)
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-			EnableFinish = EnableNext = !specifyLocationRadioButton.Active ||
+			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+			try
+			{
+				EnableFinish = EnableNext = !specifyLocationRadioButton.Active ||
   			                            (fileUtilityService.IsValidFileName(locationTextBox.Text) && 
-  			                            Directory.Exists(locationTextBox.Text));
+  			                            Directory.Exists(locationTextBox.Text));
+			}
+			catch
+			{
+			}
 		}
 		
 		void SetValues(object sender, EventArgs e)
@@ -95,8 +108,7 @@
 			
 			browseButton = new Button ("...");
 			browseButton.Clicked += new EventHandler (BrowseLocationEvent);
-			
-			locationTextBox = new Entry ();
+			
 			locationTextBox.Changed += new EventHandler (SetFinishedState);
 			
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
@@ -105,6 +117,7 @@
 			RadioButton appDirRadioButton = RadioButton.NewWithLabel (null, "Use current user's application directory");
 			appDirRadioButton.Toggled += new EventHandler (SetEnableStatus);
 			sharpDevelopDirRadioButton = new RadioButton (appDirRadioButton);
+			sharpDevelopDirRadioButton.Active = true;
 			sharpDevelopDirRadioButton.Label = "Use SharpDevelop application directory";
 			sharpDevelopDirRadioButton.Toggled += new EventHandler (SetEnableStatus);
 			specifyLocationRadioButton = new RadioButton (appDirRadioButton);

Modified: src/Main/Base/Gui/CompletionDatabaseWizard/CreateDatabasePanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/CreateDatabasePanel.cs	2004-01-07 00:22:33 UTC (rev 397)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/CreateDatabasePanel.cs	2004-01-07 01:53:44 UTC (rev 398)
@@ -44,11 +44,11 @@
 				SetProgressBarValue(0);
 				createButton.Label = resourceService.GetString("Dialog.Wizards.CodeCompletionDatabaseWizard.CreateDatabasePanel.StartCreationButton");
 				EnableCancel = EnablePrevious = true;
-				fastCreationCheckBox.Active = true;
+				//fastCreationCheckBox.Active = true;
 			} else {
 				began = true;
 				EnableCancel = EnablePrevious = false;
-				fastCreationCheckBox.Active = false;
+				//fastCreationCheckBox.Active = false;
 				iterate = new GLib.IdleHandler (CreateDatabase);
 				GLib.Idle.Add (iterate);
 				
@@ -61,7 +61,7 @@
 			try {
 				DefaultParserService parserService  = (DefaultParserService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(DefaultParserService));
 				string path  = properties.GetProperty("SharpDevelop.CodeCompletion.DataDirectory", String.Empty);
-				Console.WriteLine (path);
+				//Console.WriteLine (path);
 				if (fastCreationCheckBox.Active) {
 					parserService.GenerateCodeCompletionDatabaseFast(path, this);
 				} else {
@@ -98,8 +98,7 @@
 			
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
 			Gtk.TextView t = new Gtk.TextView ();
-			t.Buffer.Text = "We only support the slow database creation for right now.\n\n";
-			t.Buffer.Text += resourceService.GetString("Dialog.Wizards.CodeCompletionDatabaseWizard.CreateDatabasePanel.PanelDescription");
+			t.Buffer.Text = resourceService.GetString("Dialog.Wizards.CodeCompletionDatabaseWizard.CreateDatabasePanel.PanelDescription");
 			t.WrapMode = Gtk.WrapMode.Word;
 			t.Editable = false;
 			t.CursorVisible = false;

Modified: src/Main/Base/Gui/CompletionDatabaseWizard/CreationFinishedPanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/CreationFinishedPanel.cs	2004-01-07 00:22:33 UTC (rev 397)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/CreationFinishedPanel.cs	2004-01-07 01:53:44 UTC (rev 398)
@@ -33,7 +33,9 @@
 			EnableNext        = false;
 			EnablePrevious    = false;
 			EnableCancel      = false;
-			IsLastPanel       = true;
+			IsLastPanel       = true;
+			
+			this.Add (new Label ("Creation Finished"));
 		}
 	}
 }

Modified: src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs	2004-01-07 00:22:33 UTC (rev 397)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs	2004-01-07 01:53:44 UTC (rev 398)
@@ -67,17 +67,23 @@
 		{
 			IsLastPanel       = true;
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+			
+			VBox mainVBox  = new VBox (false, 0);
 			
 			//textBox.Lines = resourceService.GetString ("Dialog.Wizards.CodeCompletionDatabaseWizard.UseExistingFilePanel.PanelDescription").Split('\n');
 			
 			locationTextBox = new Entry ();
 			locationTextBox.Changed += new EventHandler(SetFinishedState);
-			Button browseButton = new Button ("Browse");
+			Button browseButton = new Button ("...");
 			browseButton.Clicked += new EventHandler(BrowseLocationEvent);
-			
+			HBox hbox = new HBox (false, 0);
+			hbox.PackStart (locationTextBox, false, true, 0);
+			hbox.PackStart (browseButton, false, true, 0);
 			SetFinishedState(this, EventArgs.Empty);
 			CustomizationObjectChanged += new EventHandler(SetValues);
-			
+			
+			mainVBox.PackStart (hbox, false, true, 0);
+			this.Add (mainVBox);
 		}
 	}
 }

Modified: src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs
===================================================================
--- src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs	2004-01-07 00:22:33 UTC (rev 397)
+++ src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs	2004-01-07 01:53:44 UTC (rev 398)
@@ -30,7 +30,7 @@
 		
 		Gtk.Frame             dialogPanel  = new Gtk.Frame();
 
-		ResponseType ResponseType;
+		DialogMessage DialogMessage;
 		
 		/// <remarks>
 		/// On this stack the indices of the previous active wizard panels. This
@@ -149,7 +149,7 @@
 		{
 			EnableNextChanged(null, null);
 			finishButton.Sensitive = CanFinish;
-			//statusPanel.Refresh();
+			statusPanel.QueueDraw ();
 		}
 		
 		void ActivatePanel(int number)
@@ -236,14 +236,15 @@
 			Debug.Assert(nextID < wizardPanels.Count && nextID >= 0);
 
 			//Console.WriteLine ("Inside ShowNextPanelEvent");
-			//if (!CurrentWizardPane.ReceiveDialogMessage(ResponseType.Next)) {
-			//	return;
-			//}
-			//CurrentWizardPane.ReceiveDialogMessage (ResponseType.Next);
+			if (!CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Next)) {
+				return;
+			}
+			CurrentWizardPane.ReceiveDialogMessage (DialogMessage.Next);
 			Console.WriteLine ("Past ReceiveDialogMessage call");
 			idStack.Push(activePanelNumber);
-			ActivatePanel(nextID);
-			//CurrentWizardPane.ReceiveDialogMessage(ResponseType.Activated);
+			ActivatePanel(nextID);
+			Console.WriteLine ("Activating panel" + nextID);
+			CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Activated);
 		}
 		
 		void ShowPrevPanelEvent(object sender, EventArgs e)
@@ -262,7 +263,7 @@
 					return;
 				}
 			}
-			ResponseType = ResponseType.Ok;
+			DialogMessage = DialogMessage.OK;
 			//ShowMustRestart ();
 			//Application.Quit ();
 		}
@@ -274,7 +275,7 @@
 					return;
 				}
 			}
-			ResponseType = ResponseType.Cancel;
+			DialogMessage = DialogMessage.Cancel;
 			//ShowMustRestart ();
 			//Application.Quit ();
 		}




More information about the Monodevelop-patches-list mailing list