[Monodevelop-patches-list] r1101 - in trunk/MonoDevelop: data/resources/glade src/AddIns/BackendBindings/CSharpBinding src/AddIns/BackendBindings/CSharpBinding/Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Mar 3 23:59:48 EST 2004


Author: dkor
Date: 2004-03-03 23:59:48 -0500 (Wed, 03 Mar 2004)
New Revision: 1101

Added:
   trunk/MonoDevelop/data/resources/glade/CSharp.glade
Modified:
   trunk/MonoDevelop/data/resources/glade/Makefile.am
   trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs
   trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Makefile.am
Log:
Gladed/Ported CodeGenerationPanel under Project

Added: trunk/MonoDevelop/data/resources/glade/CSharp.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/CSharp.glade	2004-03-04 04:10:29 UTC (rev 1100)
+++ trunk/MonoDevelop/data/resources/glade/CSharp.glade	2004-03-04 04:59:48 UTC (rev 1101)
@@ -0,0 +1,472 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="CodeGenerationPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">CodeGenerationPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox62">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkLabel" id="label82">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Code Generation&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox56">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label81">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox65">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkTable" id="table7">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label86">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Compile _Target</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">CompileTargetOptionMenu</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label87">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Define S_ymbols</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">symbolsEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label88">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Main Class</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">mainClassEntry</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="symbolsEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="mainClassEntry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="CompileTargetOptionMenu">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">-1</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label90">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Warnings&lt;/b&gt;</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox47">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label72">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">    </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox64">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox55">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label80">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Warning Level</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">warningLevelSpinButton</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="warningLevelSpinButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 0 4 1 1 1</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateOverflowChecksCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Generate overflow checks</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="allowUnsafeCodeCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Allow '_unsafe' code</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="enableOptimizationCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Enable _optimizations</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="warningsAsErrorsCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Treat warnings as _errors</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateDebugInformationCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Emit _debugging information</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="generateXmlOutputCheckButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Generate _xml documentations</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Modified: trunk/MonoDevelop/data/resources/glade/Makefile.am
===================================================================
--- trunk/MonoDevelop/data/resources/glade/Makefile.am	2004-03-04 04:10:29 UTC (rev 1100)
+++ trunk/MonoDevelop/data/resources/glade/Makefile.am	2004-03-04 04:59:48 UTC (rev 1101)
@@ -1 +1 @@
-EXTRA_DIST = Base.glade EditorBindings.glade texteditoraddin.glade
+EXTRA_DIST = Base.glade EditorBindings.glade texteditoraddin.glade CSharp.glade

Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs	2004-03-04 04:10:29 UTC (rev 1100)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs	2004-03-04 04:59:48 UTC (rev 1101)
@@ -1,101 +1,123 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Drawing;
-using System.Collections;
-
-using ICSharpCode.SharpDevelop.Internal.ExternalTool;
-using ICSharpCode.Core.AddIns.Codons;
-using ICSharpCode.Core.Properties;
-using ICSharpCode.SharpDevelop.Gui.Components;
-using ICSharpCode.Core.Services;
-using ICSharpCode.Core.AddIns;
-
-using Gtk;
-
-namespace ICSharpCode.SharpDevelop.Gui.Dialogs.OptionPanels
-{
-	public class CodeGenerationPanel : AbstractOptionPanel
-	{
-		// Gtk Controls
-		CheckButton generateAdditonalCommentsCheckBox;
-		CheckButton generateDocCommentsCheckBox;
-		CheckButton useFullTypeNamesCheckBox; 
-		CheckButton blankLinesBetweenMemberCheckBox;
-		CheckButton elseOnClosingCheckBox;
-		CheckButton startBlockOnTheSameLineCheckBox; 
-		
-		// Services
-		StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
-		PropertyService p = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
-		static readonly string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions";
-		
-		public override void LoadPanelContents()
-		{
-			// set up the form controls instance
-			SetupPanelInstance();
-			
-			
-			generateAdditonalCommentsCheckBox.Active = p.GetProperty("GenerateAdditionalComments", true);
-			generateDocCommentsCheckBox.Active       = p.GetProperty("GenerateDocumentComments", true);
-			useFullTypeNamesCheckBox.Active          = p.GetProperty("UseFullyQualifiedNames", true);
-			
-			blankLinesBetweenMemberCheckBox.Active   = p.GetProperty("BlankLinesBetweenMembers", true);
-			elseOnClosingCheckBox.Active             = p.GetProperty("ElseOnClosing", true);
-			startBlockOnTheSameLineCheckBox.Active   = p.GetProperty("StartBlockOnSameLine", true);
-		}
-		
-		public override bool StorePanelContents()
-		{
-			p.SetProperty("GenerateAdditionalComments", generateAdditonalCommentsCheckBox.Active);
-			p.SetProperty("GenerateDocumentComments",   generateDocCommentsCheckBox.Active);
-			p.SetProperty("UseFullyQualifiedNames",     useFullTypeNamesCheckBox.Active);
-			p.SetProperty("BlankLinesBetweenMembers",   blankLinesBetweenMemberCheckBox.Active);
-			p.SetProperty("ElseOnClosing",              elseOnClosingCheckBox.Active);
-			p.SetProperty("StartBlockOnSameLine",       startBlockOnTheSameLineCheckBox.Active);
-			return true;
-		}
-		
-		private void SetupPanelInstance()
-		{
-			// instantiate all the controls in the first group
-			Gtk.Frame frame1 = new Gtk.Frame(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CodeGenerationOptionsGroupBox}"));
-			Gtk.VBox vBox1 = new Gtk.VBox(false,2);			
-			useFullTypeNamesCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.UseFullTypeNamesCheckBox}")); 
-			blankLinesBetweenMemberCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.BlankLinesBetweenMembersCheckBox}"));
-			elseOnClosingCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.ElseOnClosingCheckBox}"));
-			startBlockOnTheSameLineCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.StartBlockOnTheSameLineCheckBox}")); 
-			
-			// pack all controls in first group
-			vBox1.PackStart(startBlockOnTheSameLineCheckBox, false, false, 2);
-			vBox1.PackStart(elseOnClosingCheckBox, false, false, 2);
-			vBox1.PackStart(blankLinesBetweenMemberCheckBox, false, false, 2);
-			vBox1.PackStart(useFullTypeNamesCheckBox, false, false, 2);
-			frame1.Add(vBox1);
-			
-			// instantiate all the controls in the second group
-			Gtk.Frame frame2 = new Gtk.Frame(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CommentGenerationOptionsGroupBox}"));
-			Gtk.VBox vBox2 = new Gtk.VBox(false,2);			
-			generateAdditonalCommentsCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateAdditionalCommentsCheckBox}"));
-			generateDocCommentsCheckBox = CheckButton.NewWithLabel(StringParserService.Parse("${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.GenerateDocCommentsCheckBox}"));
-			
-			// pack all controls in second group
-			vBox2.PackStart(generateDocCommentsCheckBox, false, false, 2);
-			vBox2.PackStart(generateAdditonalCommentsCheckBox, false, false, 2);
-			frame2.Add(vBox2);
-			
-			// pack all the groups
-			Gtk.VBox mainBox = new Gtk.VBox(false,2);
-			mainBox.PackStart(frame1, false, false, 2);
-			mainBox.PackStart(frame2, false, false, 2);
-			this.Add(mainBox);
-		}
-
-	}
-}
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Drawing;
+
+using ICSharpCode.SharpDevelop.Internal.Project;
+using ICSharpCode.SharpDevelop.Internal.ExternalTool;
+using ICSharpCode.SharpDevelop.Gui.Dialogs;
+using ICSharpCode.Core.Services;
+using ICSharpCode.Core.Properties;
+using ICSharpCode.Core.AddIns.Codons;
+
+using Gtk;
+using MonoDevelop.Gui.Widgets;
+
+namespace CSharpBinding
+{
+
+	//FIXME  i8n 
+
+	public class CodeGenerationPanel : AbstractOptionPanel
+	{
+
+		class CodeGenerationPanelWidget : GladeWidgetExtract 
+		{
+			//
+			// Gtk Controls	
+			//
+ 			[Glade.Widget] Entry symbolsEntry;
+ 			[Glade.Widget] Entry mainClassEntry;
+			[Glade.Widget] OptionMenu CompileTargetOptionMenu;
+ 			[Glade.Widget] CheckButton generateOverflowChecksCheckButton;
+			[Glade.Widget] CheckButton allowUnsafeCodeCheckButton;
+ 			[Glade.Widget] CheckButton enableOptimizationCheckButton;
+ 			[Glade.Widget] CheckButton warningsAsErrorsCheckButton;
+ 			[Glade.Widget] CheckButton generateDebugInformationCheckButton;
+ 			[Glade.Widget] CheckButton generateXmlOutputCheckButton;
+ 			[Glade.Widget] SpinButton warningLevelSpinButton;
+
+			//
+			// services needed
+			//
+			StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (
+				typeof (StringParserService));
+
+			CSharpCompilerParameters compilerParameters = null;
+
+ 			public  CodeGenerationPanelWidget(IProperties CustomizationObject) : base ("CSharp.glade", "CodeGenerationPanel")
+ 			{	
+				this.compilerParameters = (CSharpCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+
+				Menu CompileTargetMenu = new Menu ();
+				CompileTargetMenu.Append(new MenuItem(
+								 StringParserService.Parse(
+									 "${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Exe}")));
+
+				CompileTargetMenu.Append(new MenuItem(
+								 StringParserService.Parse(
+									 "${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Library}")));
+				// FIXME commented until the Module capability is ported
+// 				CompileTargetMenu.Append(new MenuItem(
+// 								 StringParserService.Parse(
+// 									 "${res:Dialog.Options.PrjOptions.Configuration.CompileTarget.Module}")));
+
+				CompileTargetOptionMenu.Menu = CompileTargetMenu;
+				CompileTargetOptionMenu.SetHistory ( (uint) compilerParameters.CompileTarget);
+
+
+				symbolsEntry.Text = compilerParameters.DefineSymbols;
+				mainClassEntry.Text = compilerParameters.MainClass;
+
+				generateDebugInformationCheckButton.Active = compilerParameters.Debugmode;
+				generateXmlOutputCheckButton.Active        = compilerParameters.GenerateXmlDocumentation;
+				enableOptimizationCheckButton.Active       = compilerParameters.Optimize;
+				allowUnsafeCodeCheckButton.Active          = compilerParameters.UnsafeCode;
+				generateOverflowChecksCheckButton.Active   = compilerParameters.GenerateOverflowChecks;
+				warningsAsErrorsCheckButton.Active         = ! compilerParameters.RunWithWarnings;
+				warningLevelSpinButton.Value               = compilerParameters.WarningLevel;				
+ 			}
+
+			public bool Store ()
+			{	
+				if (compilerParameters == null) {
+					return true;
+				}
+				compilerParameters.CompileTarget =  (CompileTarget)  CompileTargetOptionMenu.History;
+				compilerParameters.DefineSymbols =  symbolsEntry.Text;
+				compilerParameters.MainClass     =  mainClassEntry.Text;
+
+				compilerParameters.Debugmode                = generateDebugInformationCheckButton.Active;
+				compilerParameters.GenerateXmlDocumentation = generateXmlOutputCheckButton.Active;
+				compilerParameters.Optimize                 = enableOptimizationCheckButton.Active;
+				compilerParameters.UnsafeCode               = allowUnsafeCodeCheckButton.Active;
+				compilerParameters.GenerateOverflowChecks   = generateOverflowChecksCheckButton.Active;
+				compilerParameters.RunWithWarnings          = ! warningsAsErrorsCheckButton.Active;
+
+				compilerParameters.WarningLevel = warningLevelSpinButton.ValueAsInt;
+
+				return true;
+			}
+		}
+
+		CodeGenerationPanelWidget widget;
+		
+		public override void LoadPanelContents()
+		{
+			Add (widget = new  CodeGenerationPanelWidget ((IProperties) CustomizationObject));
+		}
+		
+		public override bool StorePanelContents()
+		{
+			bool result = true;
+			result = widget.Store ();
+ 			return result;
+		}
+	}
+}

Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Makefile.am	2004-03-04 04:10:29 UTC (rev 1100)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Makefile.am	2004-03-04 04:59:48 UTC (rev 1101)
@@ -35,7 +35,10 @@
 		/r:../../../../build/bin/MonoDevelop.SourceEditor.dll \
 		/r:../../../../build/bin/MonoDevelop.Base.dll \
 		/r:../../../../build/bin/ICSharpCode.SharpRefactory.dll \
+		/r:../../../../build/bin/MonoDevelop.Gui.Widgets.dll  \
 		/r:gtk-sharp \
+		/r:glade-sharp \
+		/resource:../../../../data/resources/glade/CSharp.glade,CSharp.glade \
 		$(FILES) \
 	&& cp $(DLL) ../../../../build/AddIns/AddIns/BackendBindings/.
 




More information about the Monodevelop-patches-list mailing list