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

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Mar 4 02:06:15 EST 2004


Author: dkor
Date: 2004-03-04 02:06:15 -0500 (Thu, 04 Mar 2004)
New Revision: 1105

Modified:
   trunk/MonoDevelop/ChangeLog
   trunk/MonoDevelop/data/resources/glade/CSharp.glade
   trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs
Log:
Gladed OutputOptionsPanel under project

Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog	2004-03-04 06:29:05 UTC (rev 1104)
+++ trunk/MonoDevelop/ChangeLog	2004-03-04 07:06:15 UTC (rev 1105)
@@ -1,3 +1,8 @@
+2004-03-04  Daniel Kornhauser <dkor at alum.mit.edu>
+
+	    * data/resources/glade/CSharp.glade : created glade file with OutputOptionsPanel UI
+	    * src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs: Gladed CodeGenerationPanel
+
 2004-03-04 John BouAntoun  <jba-mono at optusnet.com.au>
 	* src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs : enabled context menu's for project configurations
 	* src/Main/Base/Gui/Dialogs/TreeViewOptions.cs : made SelectNode virtual so ProjectOptionsDialog could override

Modified: trunk/MonoDevelop/data/resources/glade/CSharp.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/CSharp.glade	2004-03-04 06:29:05 UTC (rev 1104)
+++ trunk/MonoDevelop/data/resources/glade/CSharp.glade	2004-03-04 07:06:15 UTC (rev 1105)
@@ -469,4 +469,568 @@
   </child>
 </widget>
 
+<widget class="GtkWindow" id="OutputOptionsPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">OutputOptionsPanel</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="vbox66">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkVBox" id="vbox67">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label93">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Output&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="hbox57">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label91">
+		  <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="vbox69">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table10">
+		      <property name="visible">True</property>
+		      <property name="n_rows">3</property>
+		      <property name="n_columns">3</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">6</property>
+		      <property name="column_spacing">6</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label98">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Assembly _name</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">assemblyNameEntry</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="label99">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Output _path</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">outputDirectoryEntry</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="label100">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Paramet_ers</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">parametersEntry</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="outputDirectoryEntry">
+			  <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="GtkButton" id="browseButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</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="GtkEntry" id="assemblyNameEntry">
+			  <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">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="parametersEntry">
+			  <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">3</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="y_options"></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="pauseConsoleOutputCheckButton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Pause _console output</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>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox68">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label94">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Execute scripts &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="hbox58">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label92">
+		  <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="GtkTable" id="table9">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label95">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Execute Command</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</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</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="label96">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_After Build</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</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeAfterEntry</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="label97">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Before build</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</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">executeBeforeEntry</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="executeScriptEntry">
+		      <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">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="executeAfterEntry">
+		      <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="executeBeforeEntry">
+		      <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="GtkButton" id="browseButton2">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</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="GtkButton" id="browseButton3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</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="GtkButton" id="browseButton4">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</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>
+		</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>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>

Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs	2004-03-04 06:29:05 UTC (rev 1104)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/OutputOptionsPanel.cs	2004-03-04 07:06:15 UTC (rev 1105)
@@ -17,115 +17,145 @@
 using ICSharpCode.Core.AddIns.Codons;
 
 using Gtk;
+using MonoDevelop.Gui.Widgets;
 
 namespace CSharpBinding
 {
+	
+	//FIXME: i8n 
+
 	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()
+
+		class OutputOptionsPanelWidget : GladeWidgetExtract 
 		{
-			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);
+			//
+			// Gtk Controls	
+			//
+			[Glade.Widget] Entry assemblyNameEntry;
+			[Glade.Widget] Entry outputDirectoryEntry;
+			[Glade.Widget] Entry parametersEntry;
+			[Glade.Widget] Entry executeBeforeEntry;
+			[Glade.Widget] Entry executeScriptEntry;
+			[Glade.Widget] Entry executeAfterEntry;
+			[Glade.Widget] CheckButton pauseConsoleOutputCheckButton;			
+			[Glade.Widget] Button browseButton;
+			[Glade.Widget] Button browseButton2;
+			[Glade.Widget] Button browseButton3;
+			[Glade.Widget] Button browseButton4;
 			
-			this.compilerParameters = (CSharpCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
-			
-			//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;
-			
-			pauseConsoleOutputCheckBox.Active = compilerParameters.PauseConsoleOutput;
-		}
-		
-		public override bool StorePanelContents()
-		{
-			//Console.WriteLine("store contents");
-			
-			if (compilerParameters == null) {
+			CSharpCompilerParameters compilerParameters;
+
+			public  OutputOptionsPanelWidget(IProperties CustomizationObject) : base ("CSharp.glade", "OutputOptionsPanel")
+ 			{			
+				this.compilerParameters = (CSharpCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+				browseButton.Clicked += new EventHandler (SelectFolder);
+				browseButton2.Clicked += new EventHandler (SelectFile4);
+				browseButton3.Clicked += new EventHandler (SelectFile3);
+				browseButton4.Clicked += new EventHandler (SelectFile2);
+				
+				assemblyNameEntry.Text = compilerParameters.OutputAssembly;
+				outputDirectoryEntry.Text = compilerParameters.OutputDirectory;
+				parametersEntry.Text      = compilerParameters.CommandLineParameters;
+				executeScriptEntry.Text   = compilerParameters.ExecuteScript;
+ 				executeBeforeEntry.Text   = compilerParameters.ExecuteBeforeBuild;
+ 				executeAfterEntry.Text    = compilerParameters.ExecuteAfterBuild;
+				
+ 				pauseConsoleOutputCheckButton.Active = compilerParameters.PauseConsoleOutput;
+			}
+
+			public bool Store ()
+			{	
+				if (compilerParameters == null) {
+					return true;
+				}
+				
+				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(
+					typeof(FileUtilityService));
+				if (!fileUtilityService.IsValidFileName(assemblyNameEntry.Text)) {
+					//MessageService.ShowError("Invalid assembly name specified");
+					return false;
+				}
+				if (!fileUtilityService.IsValidFileName (outputDirectoryEntry.Text)) {
+					//MessageService.ShowError("Invalid output directory specified");
+					return false;
+				}
+				
+				compilerParameters.OutputAssembly = assemblyNameEntry.Text;
+				compilerParameters.OutputDirectory = outputDirectoryEntry.Text;
+				compilerParameters.CommandLineParameters = parametersEntry.Text;
+				compilerParameters.ExecuteBeforeBuild = executeBeforeEntry.Text;
+				compilerParameters.ExecuteAfterBuild = executeAfterEntry.Text;
+				compilerParameters.ExecuteScript = executeScriptEntry.Text;
+				
+				compilerParameters.PauseConsoleOutput = pauseConsoleOutputCheckButton.Active;
 				return true;
 			}
 			
-			//Console.WriteLine("1");
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-			if (!fileUtilityService.IsValidFileName(assemblyNameTextBox.Text)) {
-				//MessageService.ShowError("Invalid assembly name specified");
-				return false;
+			void SelectFolder(object sender, EventArgs e)
+			{
+				FileSelection fdiag = new FileSelection (
+					"${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}");
+				
+				if (fdiag.Run () == (int) ResponseType.Ok) {
+				outputDirectoryEntry.Text = fdiag.Filename;				
+				}
+				fdiag.Hide ();
+				fdiag.Dispose ();
 			}
-			if (!fileUtilityService.IsValidFileName (outputDirectoryTextBox.Text)) {
-				//MessageService.ShowError("Invalid output directory specified");
-				return false;
+		
+			void SelectFile2(object sender, EventArgs e)
+			{
+				FileSelection fdiag = new FileSelection ("");
+				//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+				fdiag.SelectMultiple = false;
+				
+				if(fdiag.Run () == (int) ResponseType.Ok) {
+					executeBeforeEntry.Text = fdiag.Filename;
+				}
+				fdiag.Hide ();
+				fdiag.Dispose ();			
 			}
 			
-			//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 = pauseConsoleOutputCheckBox.Active;
-			return true;
-		}
-		
-		void SelectFolder(object sender, EventArgs e)
-		{
-			FileSelection fdiag = new FileSelection ("${res:Dialog.Options.PrjOptions.Con        figuration.FolderBrowserDescription}");
-			
-			if (fdiag.Run () == (int) ResponseType.Ok) {
-				outputDirectoryTextBox.Text = fdiag.Filename;				
+			void SelectFile3(object sender, EventArgs e)
+			{
+				FileSelection fdiag = new FileSelection ("");
+				//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+				fdiag.SelectMultiple = false;
+				
+				if(fdiag.Run () == (int) ResponseType.Ok) {
+					executeAfterEntry.Text = fdiag.Filename;
+				}
+				fdiag.Hide ();
+				fdiag.Dispose ();
 			}
-		}
 		
-		void SelectFile2(object sender, EventArgs e)
-		{
-			FileSelection fdiag = new FileSelection ("");
-			//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-			fdiag.SelectMultiple = false;
-			
-			if(fdiag.Run () == (int) ResponseType.Ok) {
-				executeBeforeTextBox.Text = fdiag.Filename;
+			void SelectFile4(object sender, EventArgs e)
+			{
+				FileSelection fdiag = new FileSelection ("");
+				//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+				fdiag.SelectMultiple = false;
+				
+				if(fdiag.Run () == (int) ResponseType.Ok) {
+					executeScriptEntry.Text = fdiag.Filename;
+				}
+				fdiag.Hide ();
+				fdiag.Dispose ();
 			}
 		}
-		
-		void SelectFile3(object sender, EventArgs e)
+
+		OutputOptionsPanelWidget  widget;
+
+		public override void LoadPanelContents()
 		{
-			FileSelection fdiag = new FileSelection ("");
-			//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-			fdiag.SelectMultiple = false;
-			
-			if(fdiag.Run () == (int) ResponseType.Ok) {
-				executeAfterTextBox.Text = fdiag.Filename;
-			}
+			Add (widget = new  OutputOptionsPanelWidget ((IProperties) CustomizationObject));
 		}
 		
-		void SelectFile4(object sender, EventArgs e)
+		public override bool StorePanelContents()
 		{
-			FileSelection fdiag = new FileSelection ("");
-			//fdiag.Filter = StringParserService.Parse("${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-			fdiag.SelectMultiple = false;
-			
-			if(fdiag.Run () == (int) ResponseType.Ok) {
-				executeScriptTextBox.Text = fdiag.Filename;
-			}
+			bool result = true;
+			result = widget.Store ();
+ 			return result;
 		}
 	}
 }




More information about the Monodevelop-patches-list mailing list