[Monodevelop-patches-list] r596 - trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Jan 20 02:25:03 EST 2004
Author: jluke
Date: 2004-01-20 02:25:03 -0500 (Tue, 20 Jan 2004)
New Revision: 596
Modified:
trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
Log:
use Gnome.FileEntry
Modified: trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs 2004-01-20 06:50:07 UTC (rev 595)
+++ trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs 2004-01-20 07:25:03 UTC (rev 596)
@@ -8,7 +8,6 @@
using System;
using System.IO;
using Gtk;
-using MonoDevelop.Gui;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.Core.Properties;
@@ -26,7 +25,7 @@
Button browseButton;
RadioButton specifyLocationRadioButton;
RadioButton sharpDevelopDirRadioButton;
- Entry locationTextBox = new Entry ();
+ Gnome.FileEntry locationTextBox = new Gnome.FileEntry ("locationTextBox", "Choose the location in which you want the code completion files to be generated");
public override bool ReceiveDialogMessage(DialogMessage message)
{
@@ -36,7 +35,7 @@
} else if (message == DialogMessage.Next || message == DialogMessage.OK) {
string path = null;
if (specifyLocationRadioButton.Active) {
- path = locationTextBox.Text.TrimEnd (System.IO.Path.DirectorySeparatorChar);
+ path = locationTextBox.GtkEntry.Text.TrimEnd (System.IO.Path.DirectorySeparatorChar);
} else if (sharpDevelopDirRadioButton.Active) {
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
@@ -73,24 +72,14 @@
SetFinishedState(sender, e);
}
- void BrowseLocationEvent(object sender, EventArgs e)
- {
- FolderDialog fd = new FolderDialog ("choose the location in which you want the code completion files to be generated");
- int response = fd.Run ();
- fd.Hide ();
- if (response == (int) ResponseType.Ok) {
- locationTextBox.Text = fd.Filename;
- }
- }
-
void SetFinishedState(object sender, EventArgs e)
{
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
try
{
EnableFinish = EnableNext = !specifyLocationRadioButton.Active ||
- (fileUtilityService.IsValidFileName(locationTextBox.Text) &&
- Directory.Exists(locationTextBox.Text));
+ (fileUtilityService.IsValidFileName(locationTextBox.GtkEntry.Text) &&
+ Directory.Exists(locationTextBox.GtkEntry.Text));
}
catch
{
@@ -109,9 +98,9 @@
VBox mainVBox = new VBox (false, 0);
NextWizardPanelID = "CreateDatabasePanel";
- browseButton = new Button ("...");
- browseButton.Clicked += new EventHandler (BrowseLocationEvent);
-
+ locationTextBox.DirectoryEntry = true;
+ locationTextBox.Modal = true;
+ locationTextBox.GtkEntry.WidthChars = 50;
locationTextBox.Changed += new EventHandler (SetFinishedState);
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
@@ -132,7 +121,6 @@
HBox hbox = new HBox (false, 0);
hbox.PackStart (locationTextBox);
- hbox.PackStart (browseButton, false, false, 3);
mainVBox.PackStart (t, true, true, 0);
mainVBox.PackStart (specifyLocationRadioButton, false, true, 6);
Modified: trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs 2004-01-20 06:50:07 UTC (rev 595)
+++ trunk/MonoDevelop/src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs 2004-01-20 07:25:03 UTC (rev 596)
@@ -13,7 +13,6 @@
using ICSharpCode.Core.Properties;
using ICSharpCode.Core.Services;
-using MonoDevelop.Gui;
using ICSharpCode.Core.AddIns.Codons;
namespace ICSharpCode.SharpDevelop.Gui.Dialogs.OptionPanels.CompletionDatabaseWizard
@@ -22,7 +21,7 @@
{
static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
IProperties properties;
- Entry locationTextBox;
+ Gnome.FileEntry locationTextBox;
public override bool ReceiveDialogMessage(DialogMessage message)
{
@@ -40,7 +39,7 @@
void SetFinishedState(object sender, EventArgs e)
{
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- string path = locationTextBox.Text;
+ string path = locationTextBox.GtkEntry.Text;
EnableFinish = fileUtilityService.IsValidFileName(path) &&
Directory.Exists(path) &&
File.Exists(fileUtilityService.GetDirectoryNameWithSeparator(path) + "CodeCompletionProxyDataV02.bin");
@@ -55,17 +54,6 @@
properties = (IProperties)CustomizationObject;
}
- void BrowseLocationEvent(object sender, EventArgs e)
- {
- FolderDialog fd = new FolderDialog ("choose the location in which you want the code completion files to be generated");
- int response = fd.Run ();
- fd.Hide ();
-
- if (response == (int) ResponseType.Ok) {
- locationTextBox.Text = fd.Filename;
- }
- }
-
static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
public UseExistingFilePanel()
{
@@ -80,14 +68,13 @@
mainVBox.PackStart (textBox, false, true, 0);
mainVBox.PackStart (new Label ("Specify location of existing code completion database."));
- locationTextBox = new Entry ();
- locationTextBox.WidthChars = 50;
+ locationTextBox = new Gnome.FileEntry ("locationTextBox", "choose the location in which you want the code completion files to be generated");
+ locationTextBox.DirectoryEntry = true;
+ locationTextBox.Modal = true;
+ locationTextBox.GtkEntry.WidthChars = 50;
locationTextBox.Changed += new EventHandler(SetFinishedState);
- 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);
More information about the Monodevelop-patches-list
mailing list