[Monodevelop-patches-list] r1086 - in trunk/MonoDevelop: . src/Main/Base/Commands src/Main/Base/Gui/Dialogs

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Mar 3 06:42:42 EST 2004


Author: jba
Date: 2004-03-03 06:42:42 -0500 (Wed, 03 Mar 2004)
New Revision: 1086

Modified:
   trunk/MonoDevelop/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Commands/ProjectOptionsCommands.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
Log:
added project configurations nodes to project options dialog

Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog	2004-03-03 06:29:43 UTC (rev 1085)
+++ trunk/MonoDevelop/ChangeLog	2004-03-03 11:42:42 UTC (rev 1086)
@@ -1,3 +1,9 @@
+2004-03-03 John BouAntoun  <jba-mono at optusnet.com.au>
+	* src/Main/Base/Commands/ProjectOptionsCommands.cs : enabled all the projections command actions
+	* src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs : added code to display the configuration options nodes
+	* src/Main/Base/Gui/Dialogs/TreeViewOptions.cs : made treeStore explicitely protected so ProjectOptionsDialogs could append configuration nodes
+
+
 2004-03-03  Todd Berman  <tberman at sevenl.net>
 
 	* bunch o' files: Added first pass debugger support.

Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectOptionsCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectOptionsCommands.cs	2004-03-03 06:29:43 UTC (rev 1085)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectOptionsCommands.cs	2004-03-03 11:42:42 UTC (rev 1086)
@@ -31,50 +31,47 @@
 	{
 		public override void Run()
 		{
-/*			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
+			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
 			
 			if (optionsDialog != null) {
 				optionsDialog.AddProjectConfiguration();
 			}
-*/		}
+		}
 	}
 	
 	public class RenameProjectConfiguration : AbstractMenuCommand
 	{
 		public override void Run()
 		{
-/*			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
+			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
 			
 			if (optionsDialog != null) {
 				optionsDialog.RenameProjectConfiguration();
 			}
-*/		}
+		}
 	}
 	
 	public class RemoveProjectConfiguration : AbstractMenuCommand
 	{
 		public override void Run()
 		{
-/*			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
+			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
 			
 			if (optionsDialog != null) {
 				optionsDialog.RemoveProjectConfiguration();
 			}
-*/		}
+		}
 	}
 	
 	public class SetActiveProjectConfiguration : AbstractMenuCommand
 	{
 		public override void Run()
 		{
-/*			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
+			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
 			
 			if (optionsDialog != null) {
 				optionsDialog.SetSelectedConfigurationAsStartup();
 			}
-*/		}
+		}
 	}
-	
-	
-	
 }

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-03-03 06:29:43 UTC (rev 1085)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-03-03 11:42:42 UTC (rev 1086)
@@ -25,7 +25,6 @@
 	public class ProjectOptionsDialog : TreeViewOptions
 	{
 		IProject  project;
-		//TreeNode configurationTreeNode;
 		
 		IAddInTreeNode configurationNode;
 	
@@ -45,27 +44,36 @@
 			properties = new DefaultProperties();
 			properties.SetProperty("Project", project);
 			
-			AddNodes(properties, Gtk.TreeIter.Zero, node.BuildChildItems(this));
+			AddNodes(properties, Gtk.TreeIter.Zero, node.BuildChildItems(this));			
 			
-			/*configurationTreeNode = new TreeNode(StringParserService.Parse("${res:Dialog.Options.ProjectOptions.ConfigurationsNodeName}"));
-			configurationTreeNode.NodeFont = plainFont;
+			//
+			// This code has to add treeview node items to the treeview. under a configuration node
+			//
+			AddConfigurationNodes();
 			
+			SelectFirstNode ();	
+		}
+		
+		void AddConfigurationNodes()
+		{
+			Gtk.TreeIter configurationTreeNode;
+			configurationTreeNode = treeStore.AppendValues (StringParserService.Parse("${res:Dialog.Options.ProjectOptions.ConfigurationsNodeName}"), null);
+			
 			foreach (IConfiguration config in project.Configurations) {
-				TreeNode newNode = new TreeNode(config.Name);
-				newNode.Tag = config;
+				Gtk.TreeIter newNode = treeStore.AppendValues (configurationTreeNode, config.Name, config);
+				// FIXME: how to set it bold in treeview ?
+				/*
 				if (config == project.ActiveConfiguration) {
 					newNode.NodeFont = boldFont;
 				} else {
 					newNode.NodeFont = plainFont;
 				}
+				*/
 				DefaultProperties configNodeProperties = new DefaultProperties();
 				configNodeProperties.SetProperty("Project", project);
 				configNodeProperties.SetProperty("Config", config);
-				AddNodes(configNodeProperties, newNode.Nodes, configurationNode.BuildChildItems(this));
-				configurationTreeNode.Nodes.Add(newNode);
-			} 
-			((TreeView)ControlDictionary["optionsTreeView"]).Nodes.Add(configurationTreeNode);*/
-			SelectFirstNode ();	
+				AddNodes(configNodeProperties, newNode, configurationNode.BuildChildItems(this));
+			}
 		}
 		
 		public void AddProjectConfiguration()

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-03-03 06:29:43 UTC (rev 1085)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-03-03 11:42:42 UTC (rev 1086)
@@ -26,7 +26,7 @@
 		protected ArrayList OptionPanels = new ArrayList ();
 		protected IProperties properties = null;
 
-		Gtk.TreeStore treeStore;
+		protected Gtk.TreeStore treeStore;
 		
 		[Glade.Widget] Gtk.TreeView  TreeView;
 		[Glade.Widget] Gtk.Label     optionTitle;




More information about the Monodevelop-patches-list mailing list