[Monodevelop-patches-list] r399 - in src: Libraries/MonoDevelop.Gui Libraries/MonoDevelop.Gui/FolderDialog Main/Base/Gui/CompletionDatabaseWizard
commit-watcher at sevenl.net
commit-watcher at sevenl.net
Tue Jan 6 21:17:18 EST 2004
Author: jluke
Date: 2004-01-06 21:17:17 -0500 (Tue, 06 Jan 2004)
New Revision: 399
Added:
src/Libraries/MonoDevelop.Gui/FolderDialog/
src/Libraries/MonoDevelop.Gui/FolderDialog/FolderDialog.cs
Modified:
src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
Log:
use a quick little FolderDialog widget
Added: src/Libraries/MonoDevelop.Gui/FolderDialog/FolderDialog.cs
===================================================================
--- src/Libraries/MonoDevelop.Gui/FolderDialog/FolderDialog.cs 2004-01-07 01:53:44 UTC (rev 398)
+++ src/Libraries/MonoDevelop.Gui/FolderDialog/FolderDialog.cs 2004-01-07 02:17:17 UTC (rev 399)
@@ -0,0 +1,24 @@
+using System;
+using Gtk;
+using GtkSharp;
+
+namespace MonoDevelop.Gui
+{
+ public class FolderDialog : FileSelection
+ {
+ static GLib.GType type;
+
+ static FolderDialog ()
+ {
+ type = RegisterGType (typeof (FolderDialog));
+ }
+
+ public FolderDialog (string title) : base (type)
+ {
+ this.Title = title;
+ this.SelectMultiple = false;
+ this.ShowFileops = false;
+ this.FileList.Sensitive = false;
+ }
+ }
+}
Modified: src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs 2004-01-07 01:53:44 UTC (rev 398)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs 2004-01-07 02:17:17 UTC (rev 399)
@@ -7,7 +7,8 @@
using System;
using System.IO;
-using Gtk;
+using Gtk;
+using MonoDevelop.Gui;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.Core.Properties;
@@ -73,11 +74,13 @@
}
void BrowseLocationEvent(object sender, EventArgs e)
- {/*
- FolderDialog fd = new FolderDialog();
- if (fd.DisplayDialog("choose the location in which you want the code completion files to be generated") == DialogResult.OK) {
- locationTextBox.Text = fd.Path;
- }*/
+ {
+ 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)
Modified: src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs
===================================================================
--- src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs 2004-01-07 01:53:44 UTC (rev 398)
+++ src/Main/Base/Gui/CompletionDatabaseWizard/UseExistingFilePanel.cs 2004-01-07 02:17:17 UTC (rev 399)
@@ -12,7 +12,8 @@
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.Core.Properties;
using ICSharpCode.Core.Services;
-
+
+
using MonoDevelop.Gui;
using ICSharpCode.Core.AddIns.Codons;
namespace ICSharpCode.SharpDevelop.Gui.Dialogs.OptionPanels.CompletionDatabaseWizard
@@ -56,10 +57,13 @@
void BrowseLocationEvent(object sender, EventArgs e)
{
- /*FolderDialog fd = new FolderDialog();
- if (fd.DisplayDialog("choose the location in which you want the code completion files to be generated") == DialogResult.OK) {
- ControlDictionary["locationTextBox"].Text = fd.Path;
- }*/
+ 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));
More information about the Monodevelop-patches-list
mailing list