[Monodevelop-patches-list] r1143 - in trunk/MonoDevelop: build/AddIns data/resources/glade src/Main/Base src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Mar 11 14:56:58 EST 2004


Author: dkor
Date: 2004-03-11 14:56:58 -0500 (Thu, 11 Mar 2004)
New Revision: 1143

Added:
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs
Modified:
   trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
   trunk/MonoDevelop/data/resources/glade/Base.glade
   trunk/MonoDevelop/src/Main/Base/Makefile.am
Log:
Finishing Bug 53845: Changed ProjectAndCombinePanel names to BuildPanel names

Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-03-11 18:44:37 UTC (rev 1142)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-03-11 19:56:58 UTC (rev 1143)
@@ -419,9 +419,10 @@
 			<DialogPanel id = "LoadSave"
 			             label = "${res:Dialog.Options.IDEOptions.LoadSaveOptions.PanelName}"
 			             class = "MonoDevelop.Gui.Dialogs.OptionPanels.LoadSavePanel"/>
-			<DialogPanel id = "ProjectAndCombine"
-			             label = "${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.PanelName}"
-			             class = "MonoDevelop.Gui.Dialogs.OptionPanels.ProjectAndCombinePanel"/>
+			<!--  i8n the file -->
+			<DialogPanel id = "Build"
+			             label = "Build"
+			             class = "MonoDevelop.Gui.Dialogs.OptionPanels.BuildPanel"/>
 		</DialogPanel>
 		<DialogPanel id    = "CodingOptions"
 		             label = "${res:Dialog.Options.IDEOptions.CodingOptionsText}">

Modified: trunk/MonoDevelop/data/resources/glade/Base.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/Base.glade	2004-03-11 18:44:37 UTC (rev 1142)
+++ trunk/MonoDevelop/data/resources/glade/Base.glade	2004-03-11 19:56:58 UTC (rev 1143)
@@ -2099,9 +2099,9 @@
   </child>
 </widget>
 
-<widget class="GtkWindow" id="ProjectAndCombinePanel">
+<widget class="GtkWindow" id="BuildPanel">
   <property name="visible">True</property>
-  <property name="title" translatable="yes">ProjectAndCombinePanel</property>
+  <property name="title" translatable="yes">BuildPanel</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -2109,36 +2109,111 @@
   <property name="destroy_with_parent">False</property>
 
   <child>
-    <widget class="GtkVBox" id="vbox23">
+    <widget class="GtkVBox" id="vbox66">
       <property name="visible">True</property>
       <property name="homogeneous">False</property>
       <property name="spacing">6</property>
 
       <child>
-	<widget class="GtkVBox" id="vbox27">
+	<widget class="GtkCheckButton" id="showOutputCheckBox">
 	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Show _output pad when build starts-</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="showTaskListCheckBox">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Show _task list pad if build finished with 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="GtkLabel" id="buildAndRunOptionsLabel">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Build and run options</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="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox44">
+	  <property name="visible">True</property>
 	  <property name="homogeneous">False</property>
 	  <property name="spacing">6</property>
 
 	  <child>
-	    <widget class="GtkVBox" id="vbox28">
+	    <widget class="GtkLabel" id="label71">
 	      <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="vbox67">
+	      <property name="visible">True</property>
 	      <property name="homogeneous">False</property>
 	      <property name="spacing">6</property>
 
 	      <child>
-		<widget class="GtkLabel" id="onBuildRequest">
+		<widget class="GtkRadioButton" id="saveChangesRadioButton">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;On build request&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>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Save Changes to open documents-</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>
@@ -2148,188 +2223,40 @@
 	      </child>
 
 	      <child>
-		<widget class="GtkHBox" id="hbox43">
+		<widget class="GtkRadioButton" id="promptChangesRadioButton">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Prompt to save changes to open documents-</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>
+		  <property name="group">saveChangesRadioButton</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-		  <child>
-		    <widget class="GtkLabel" id="label69">
-		      <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="vbox66">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">6</property>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox17">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">6</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="label32">
-			      <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="vbox29">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">6</property>
-
-			      <child>
-				<widget class="GtkRadioButton" id="saveChangesRadioButton">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="label" translatable="yes">_Save Changes to open documents-</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="GtkRadioButton" id="promptChangesRadioButton">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="label" translatable="yes">_Prompt to save changes to open documents-</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>
-				  <property name="group">saveChangesRadioButton</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioButton" id="noSaveRadioButton">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="label" translatable="yes">_Don't save changes to open documents -</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>
-				  <property name="group">saveChangesRadioButton</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">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="GtkCheckButton" id="showOutputCheckBox">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Show _task list pad if build finished with 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="showTaskListCheckBox">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Show _output pad when build starts-</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>
+	      <child>
+		<widget class="GtkRadioButton" id="noSaveRadioButton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Don't save changes to open documents -</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>
+		  <property name="group">saveChangesRadioButton</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
 		</packing>
 	      </child>
 	    </widget>
@@ -2342,7 +2269,7 @@
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
-	  <property name="expand">False</property>
+	  <property name="expand">True</property>
 	  <property name="fill">True</property>
 	</packing>
       </child>

Added: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs	2004-03-11 18:44:37 UTC (rev 1142)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs	2004-03-11 19:56:58 UTC (rev 1143)
@@ -0,0 +1,117 @@
+// <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 MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Gui.Components;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.AddIns;
+using MonoDevelop.Services;
+
+//using System.Windows.Forms;
+using Gtk;
+using MonoDevelop.Gui.Widgets;
+
+namespace MonoDevelop.Gui.Dialogs.OptionPanels
+{
+	public class BuildPanel : AbstractOptionPanel
+	{
+
+		// service instances needed
+		PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
+		
+		BuildPanelWidget widget;
+		const string projectAndCombineProperty = "SharpDevelop.UI.ProjectAndCombineOptions";
+
+		public override void LoadPanelContents()
+		{
+			Add (widget = new  BuildPanelWidget ());
+		}
+		
+		public override bool StorePanelContents()
+		{
+			widget.Store ();
+			return true;
+		}
+		
+		public class BuildPanelWidget :  GladeWidgetExtract 
+		{
+			//
+			// Gtk controls
+			//
+
+			[Glade.Widget] public Gtk.RadioButton saveChangesRadioButton;
+			[Glade.Widget] public Gtk.RadioButton promptChangesRadioButton; 
+			[Glade.Widget] public Gtk.RadioButton noSaveRadioButton;
+			[Glade.Widget] public Gtk.CheckButton showTaskListCheckBox;
+			[Glade.Widget] public Gtk.CheckButton showOutputCheckBox;
+			[Glade.Widget] public Gtk.Label buildAndRunOptionsLabel;   
+
+			// service instances needed
+			StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (
+				typeof (StringParserService));
+			PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (
+				typeof (PropertyService));
+
+			public  BuildPanelWidget () : base ("Base.glade", "BuildPanel")
+			{
+			        //
+			        // getting internationalized strings
+			        //
+				// FIXME i8n the following line
+				buildAndRunOptionsLabel.Text = "Build and run options";
+				saveChangesRadioButton.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.SaveChangesRadioButton}");
+				promptChangesRadioButton.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.PromptToSaveRadioButton}");
+				noSaveRadioButton.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.DontSaveRadioButton}");
+				showOutputCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowOutputPadCheckBox}");
+				showTaskListCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowTaskListPadCheckBox}");
+				//
+				// reading properties
+				//
+				BeforeCompileAction action = (BeforeCompileAction) PropertyService.GetProperty(
+					"SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					BeforeCompileAction.SaveAllFiles);
+				saveChangesRadioButton.Active = action.Equals(BeforeCompileAction.SaveAllFiles);
+				promptChangesRadioButton.Active = action.Equals(BeforeCompileAction.PromptForSave);
+				noSaveRadioButton.Active = action.Equals(BeforeCompileAction.Nothing);
+				showTaskListCheckBox.Active = (bool)PropertyService.GetProperty(
+					"SharpDevelop.ShowTaskListAfterBuild", true);
+				showOutputCheckBox.Active = (bool)PropertyService.GetProperty(
+					"SharpDevelop.ShowOutputWindowAtBuild", true);
+			}
+			
+			public void Store ()
+			{
+				// set properties
+				if (saveChangesRadioButton.Active) {
+					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+							BeforeCompileAction.SaveAllFiles);
+				} else if (promptChangesRadioButton.Active) {
+					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+							BeforeCompileAction.PromptForSave);
+				} else if (noSaveRadioButton.Active) {
+					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+							BeforeCompileAction.Nothing);
+				}
+				
+				PropertyService.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
+				PropertyService.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
+			}
+		}
+	}
+}

Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am	2004-03-11 18:44:37 UTC (rev 1142)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am	2004-03-11 19:56:58 UTC (rev 1143)
@@ -53,7 +53,7 @@
 ./Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs \
 ./Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs \
 ./Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs \
-./Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs \
+./Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs \
 ./Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs \
 ./Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs \
 ./Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs \




More information about the Monodevelop-patches-list mailing list