[Monodevelop-patches-list] r617 - in trunk/MonoDevelop/src: AddIns/BackendBindings/CSharpBinding/Gui Main/Base/Commands/ProjectBrowserCommands
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Jan 22 17:14:03 EST 2004
Author: jluke
Date: 2004-01-22 17:14:02 -0500 (Thu, 22 Jan 2004)
New Revision: 617
Modified:
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/ChooseRuntimePanel.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
Log:
enable so it can be gladeified
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/ChooseRuntimePanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/ChooseRuntimePanel.cs 2004-01-22 09:47:51 UTC (rev 616)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/ChooseRuntimePanel.cs 2004-01-22 22:14:02 UTC (rev 617)
@@ -7,50 +7,52 @@
using System;
using System.IO;
-using System.Drawing;
using System.Collections;
-using System.ComponentModel;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.Core.Properties;
-
using ICSharpCode.Core.AddIns.Codons;
-//using ICSharpCode.SharpDevelop.Gui.Dialogs;
+using ICSharpCode.SharpDevelop.Gui.Dialogs;
using ICSharpCode.Core.Services;
+using Gtk;
+
namespace CSharpBinding
{
- public class ChooseRuntimePanel //: AbstractOptionPanel
- {/*
+ public class ChooseRuntimePanel : AbstractOptionPanel
+ {
CSharpCompilerParameters config = null;
+ // FIXME: set the right rb groups
+ RadioButton msnetRadioButton = new RadioButton ("Msnet");
+ RadioButton monoRadioButton = new RadioButton ("Mono");
+ RadioButton mintRadioButton = new RadioButton ("Mint");
+ RadioButton cscRadioButton = new RadioButton ("CSC");
+ RadioButton mcsRadioButton = new RadioButton ("MCS");
public override void LoadPanelContents()
{
- SetupFromXml(Path.Combine(PropertyService.DataDirectory,
- @"resources\panels\ChooseRuntimePanel.xfrm"));
-
this.config = (CSharpCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
- ((RadioButton)ControlDictionary["msnetRadioButton"]).Checked = config.NetRuntime == NetRuntime.MsNet;
- ((RadioButton)ControlDictionary["monoRadioButton"]).Checked = config.NetRuntime == NetRuntime.Mono;
- ((RadioButton)ControlDictionary["mintRadioButton"]).Checked = config.NetRuntime == NetRuntime.MonoInterpreter;
+ msnetRadioButton.Active = config.NetRuntime == NetRuntime.MsNet;
+ monoRadioButton.Active = config.NetRuntime == NetRuntime.Mono;
+ mintRadioButton.Active = config.NetRuntime == NetRuntime.MonoInterpreter;
- ((RadioButton)ControlDictionary["cscRadioButton"]).Checked = config.CsharpCompiler == CsharpCompiler.Csc;
- ((RadioButton)ControlDictionary["mcsRadioButton"]).Checked = config.CsharpCompiler == CsharpCompiler.Mcs;
+ cscRadioButton.Active = config.CsharpCompiler == CsharpCompiler.Csc;
+ mcsRadioButton.Active = config.CsharpCompiler == CsharpCompiler.Mcs;
}
public override bool StorePanelContents()
{
- if (((RadioButton)ControlDictionary["msnetRadioButton"]).Checked) {
+ if (msnetRadioButton.Active) {
config.NetRuntime = NetRuntime.MsNet;
- } else if (((RadioButton)ControlDictionary["monoRadioButton"]).Checked) {
+ } else if (monoRadioButton.Active) {
config.NetRuntime = NetRuntime.Mono;
} else {
config.NetRuntime = NetRuntime.MonoInterpreter;
}
- config.CsharpCompiler = ((RadioButton)ControlDictionary["cscRadioButton"]).Checked ? CsharpCompiler.Csc : CsharpCompiler.Mcs;
+ config.CsharpCompiler = cscRadioButton.Active ? CsharpCompiler.Csc : CsharpCompiler.Mcs;
return true;
- }*/
+ }
}
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs 2004-01-22 09:47:51 UTC (rev 616)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs 2004-01-22 22:14:02 UTC (rev 617)
@@ -16,106 +16,116 @@
using ICSharpCode.Core.Properties;
using ICSharpCode.Core.AddIns.Codons;
+using Gtk;
+
namespace CSharpBinding
{
- public class OutputOptionsPanel //: AbstractOptionPanel
- {/*
+ public class OutputOptionsPanel : AbstractOptionPanel
+ {
CSharpCompilerParameters compilerParameters;
+ Entry assemblyNameTextBox = new Entry ();
+ Entry outputDirectoryTextBox = new Entry ();
+ Entry parametersTextBox = new Entry ();
+ Entry executeBeforeTextBox = new Entry ();
+ Entry executeScriptTextBox = new Entry ();
+ Entry executeAfterTextBox = new Entry ();
+ CheckButton pauseConsoleOutputCheckBox = new CheckButton ();
public override void LoadPanelContents()
{
- SetupFromXml(Path.Combine(PropertyService.DataDirectory,
- @"resources\panels\ProjectOptions\OutputPanel.xfrm"));
+ Button browseButton = new Button ();
+ Button browseButton2 = new Button ();
+ Button browseButton3 = new Button ();
+ Button browseButton4 = new Button ();
+ browseButton.Clicked += new EventHandler (SelectFolder);
+ browseButton2.Clicked += new EventHandler (SelectFile2);
+ browseButton3.Clicked += new EventHandler (SelectFile3);
+ browseButton4.Clicked += new EventHandler (SelectFile4);
- ControlDictionary["browseButton"].Click += new EventHandler(SelectFolder);
- ControlDictionary["browseButton2"].Click += new EventHandler(SelectFile2);
- ControlDictionary["browseButton3"].Click += new EventHandler(SelectFile3);
- ControlDictionary["browseButton4"].Click += new EventHandler(SelectFile4);
-
this.compilerParameters = (CSharpCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
- Console.WriteLine("SET BLABLUB");
- ControlDictionary["assemblyNameTextBox"].Text = compilerParameters.OutputAssembly;
- ControlDictionary["outputDirectoryTextBox"].Text = compilerParameters.OutputDirectory;
- ControlDictionary["parametersTextBox"].Text = compilerParameters.CommandLineParameters;
- ControlDictionary["executeScriptTextBox"].Text = compilerParameters.ExecuteScript;
- ControlDictionary["executeBeforeTextBox"].Text = compilerParameters.ExecuteBeforeBuild;
- ControlDictionary["executeAfterTextBox"].Text = compilerParameters.ExecuteAfterBuild;
+ //Console.WriteLine("SET BLABLUB");
+ assemblyNameTextBox.Text = compilerParameters.OutputAssembly;
+ outputDirectoryTextBox.Text = compilerParameters.OutputDirectory;
+ parametersTextBox.Text = compilerParameters.CommandLineParameters;
+ executeScriptTextBox.Text = compilerParameters.ExecuteScript;
+ executeBeforeTextBox.Text = compilerParameters.ExecuteBeforeBuild;
+ executeAfterTextBox.Text = compilerParameters.ExecuteAfterBuild;
- ((CheckBox)ControlDictionary["pauseConsoleOutputCheckBox"]).Checked = compilerParameters.PauseConsoleOutput;
+ pauseConsoleOutputCheckBox.Active = compilerParameters.PauseConsoleOutput;
}
public override bool StorePanelContents()
{
- Console.WriteLine("store contents");
+ //Console.WriteLine("store contents");
if (compilerParameters == null) {
return true;
}
- Console.WriteLine("1");
+ //Console.WriteLine("1");
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- if (!fileUtilityService.IsValidFileName(ControlDictionary["assemblyNameTextBox"].Text)) {
- MessageService.ShowError("Invalid assembly name specified");
+ if (!fileUtilityService.IsValidFileName(assemblyNameTextBox.Text)) {
+ //MessageService.ShowError("Invalid assembly name specified");
return false;
}
- if (!fileUtilityService.IsValidFileName(ControlDictionary["outputDirectoryTextBox"].Text)) {
- MessageService.ShowError("Invalid output directory specified");
+ if (!fileUtilityService.IsValidFileName (outputDirectoryTextBox.Text)) {
+ //MessageService.ShowError("Invalid output directory specified");
return false;
}
- Console.WriteLine("2");
- compilerParameters.OutputAssembly = ControlDictionary["assemblyNameTextBox"].Text;
- compilerParameters.OutputDirectory = ControlDictionary["outputDirectoryTextBox"].Text;
- compilerParameters.CommandLineParameters = ControlDictionary["parametersTextBox"].Text;
- compilerParameters.ExecuteBeforeBuild = ControlDictionary["executeBeforeTextBox"].Text;
- compilerParameters.ExecuteAfterBuild = ControlDictionary["executeAfterTextBox"].Text;
- compilerParameters.ExecuteScript = ControlDictionary["executeScriptTextBox"].Text;
+ //Console.WriteLine("2");
+ compilerParameters.OutputAssembly = assemblyNameTextBox.Text;
+ compilerParameters.OutputDirectory = outputDirectoryTextBox.Text;
+ compilerParameters.CommandLineParameters = parametersTextBox.Text;
+ compilerParameters.ExecuteBeforeBuild = executeBeforeTextBox.Text;
+ compilerParameters.ExecuteAfterBuild = executeAfterTextBox.Text;
+ compilerParameters.ExecuteScript = executeScriptTextBox.Text;
- compilerParameters.PauseConsoleOutput = ((CheckBox)ControlDictionary["pauseConsoleOutputCheckBox"]).Checked;
+ compilerParameters.PauseConsoleOutput = pauseConsoleOutputCheckBox.Active;
return true;
}
void SelectFolder(object sender, EventArgs e)
{
- FolderDialog fdiag = new FolderDialog();
+ FileSelection fdiag = new FileSelection ("${res:Dialog.Options.PrjOptions.Con figuration.FolderBrowserDescription}");
- if (fdiag.DisplayDialog("${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}") == DialogResult.OK) {
- ControlDictionary["outputDirectoryTextBox"].Text = fdiag.Path;
+ if (fdiag.Run () == (int) ResponseType.Ok) {
+ outputDirectoryTextBox.Text = fdiag.Filename;
}
}
void SelectFile2(object sender, EventArgs e)
{
- OpenFileDialog fdiag = new OpenFileDialog();
- fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
- fdiag.Multiselect = false;
+ FileSelection fdiag = new FileSelection ("");
+ //fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+ fdiag.SelectMultiple = false;
- if(fdiag.ShowDialog() == DialogResult.OK) {
- ControlDictionary["executeBeforeTextBox"].Text = fdiag.FileName;
+ if(fdiag.Run () == (int) ResponseType.Ok) {
+ executeBeforeTextBox.Text = fdiag.Filename;
}
}
void SelectFile3(object sender, EventArgs e)
{
- OpenFileDialog fdiag = new OpenFileDialog();
- fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
- fdiag.Multiselect = false;
+ FileSelection fdiag = new FileSelection ("");
+ //fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+ fdiag.SelectMultiple = false;
- if(fdiag.ShowDialog() == DialogResult.OK) {
- ControlDictionary["executeAfterTextBox"].Text = fdiag.FileName;
+ if(fdiag.Run () == (int) ResponseType.Ok) {
+ executeAfterTextBox.Text = fdiag.Filename;
}
}
void SelectFile4(object sender, EventArgs e)
{
- OpenFileDialog fdiag = new OpenFileDialog();
- fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
- fdiag.Multiselect = false;
+ FileSelection fdiag = new FileSelection ("");
+ //fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+ fdiag.SelectMultiple = false;
- if(fdiag.ShowDialog() == DialogResult.OK) {
- ControlDictionary["executeScriptTextBox"].Text = fdiag.FileName;
+ if(fdiag.Run () == (int) ResponseType.Ok) {
+ executeScriptTextBox.Text = fdiag.Filename;
}
- }*/
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs 2004-01-22 09:47:51 UTC (rev 616)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs 2004-01-22 22:14:02 UTC (rev 617)
@@ -133,18 +133,18 @@
CombineBrowserNode node = browser.SelectedNode as CombineBrowserNode;
if (node != null) {
- // DefaultProperties defaultProperties = new DefaultProperties();
- // defaultProperties.SetProperty("Combine", node.Combine);
- // using (TreeViewOptions optionsDialog = new TreeViewOptions(defaultProperties,
- // AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/CombineOptions"))) {
-// // optionsDialog.Size = new Size(700, 450);
+ DefaultProperties defaultProperties = new DefaultProperties();
+ defaultProperties.SetProperty("Combine", node.Combine);
+ TreeViewOptions optionsDialog = new TreeViewOptions(defaultProperties,
+ AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/CombineOptions"));
+ // optionsDialog.SetDefaultSize = new Size(700, 450);
// optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog;
//
- // optionsDialog.Owner = (Form)WorkbenchSingleton.Workbench;
- // optionsDialog.ShowDialog();
- // projectService.SaveCombine();
- // }
+ // optionsDialog.TransientFor = (Gtk.Window)WorkbenchSingleton.Workbench;
+ optionsDialog.Run ();
+ // optionsDialog.Hide ();
+ projectService.SaveCombine();
+ }
}
- }
}
}
More information about the Monodevelop-patches-list
mailing list