[Monodevelop-patches-list] r990 - in trunk/MonoDevelop/src: AddIns/BackendBindings/CSharpBinding/Gui AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels Main/Base/Gui/Dialogs/OptionPanels/IDEOptions Main/Base/Gui/Workbench
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Feb 22 20:21:58 EST 2004
Author: tberman
Date: 2004-02-22 20:21:58 -0500 (Sun, 22 Feb 2004)
New Revision: 990
Modified:
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs
trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
Log:
ugh, lots of property fixes. closes bug #54723.
also fix another s/SharpDevelop/MonoDevelop/
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/Gui/CodeGenerationPanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -33,7 +33,7 @@
// Services
StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
- PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
+ PropertyService p = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
static readonly string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions";
public override void LoadPanelContents()
@@ -41,7 +41,6 @@
// set up the form controls instance
SetupPanelInstance();
- IProperties p = (IProperties)PropertyService.GetProperty(codeGenerationProperty, new DefaultProperties());
generateAdditonalCommentsCheckBox.Active = p.GetProperty("GenerateAdditionalComments", true);
generateDocCommentsCheckBox.Active = p.GetProperty("GenerateDocumentComments", true);
@@ -54,14 +53,12 @@
public override bool StorePanelContents()
{
- IProperties p = (IProperties)PropertyService.GetProperty(codeGenerationProperty, new DefaultProperties());
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);
- PropertyService.SetProperty(codeGenerationProperty, p);
return true;
}
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/BehaviorTextEditorPanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -35,12 +35,12 @@
public override void LoadPanelContents()
{
- Add (widget = new BehaviorTextEditorPanelWidget ((IProperties) CustomizationObject));
+ Add (widget = new BehaviorTextEditorPanelWidget ());
}
public override bool StorePanelContents()
{
- widget.Store ((IProperties) CustomizationObject);
+ widget.Store ();
return true;
}
@@ -65,8 +65,10 @@
[Glade.Widget] RadioButton automaticIndentStyle;
[Glade.Widget] RadioButton smartIndentStyle;
[Glade.Widget] SpinButton indentAndTabSizeSpinButton;
+
+ PropertyService CustomizationObject = (PropertyService) ServiceManager.Services.GetService (typeof (PropertyService));
- public BehaviorTextEditorPanelWidget (IProperties CustomizationObject) :
+ public BehaviorTextEditorPanelWidget () :
base ("EditorBindings.glade", "BehaviorTextEditorPanel")
{
// Set up Text
@@ -133,7 +135,7 @@
}
}
- public void Store (IProperties CustomizationObject)
+ public void Store ()
{
((IProperties)CustomizationObject).SetProperty(
"TabsToSpaces", convertTabsToSpacesCheckBox.Active);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -33,12 +33,12 @@
public override void LoadPanelContents()
{
- Add (widget = new GeneralTextEditorPanelWidget ((IProperties) CustomizationObject));
+ Add (widget = new GeneralTextEditorPanelWidget ());
}
public override bool StorePanelContents()
{
- widget.Store ((IProperties) CustomizationObject);
+ widget.Store ();
return true;
}
@@ -58,7 +58,9 @@
[Glade.Widget] VBox encodingBox;
[Glade.Widget] RadioButton use_monospace, use_sans, use_cust;
- public GeneralTextEditorPanelWidget (IProperties CustomizationObject) : base ("EditorBindings.glade", "GeneralTextEditorPanel")
+ PropertyService CustomizationObject = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
+
+ public GeneralTextEditorPanelWidget () : base ("EditorBindings.glade", "GeneralTextEditorPanel")
{
encodingBox.Destroy(); // this is a really dirty way of hiding encodingBox, but Hide() doesn't work
genOptions.Markup = "<b> " + StringParserService.Parse(
@@ -129,7 +131,7 @@
// textEncodingComboBox.Changed += new EventHandler (OnOptionChanged);
}
- public void Store (IProperties CustomizationObject)
+ public void Store ()
{
((IProperties) CustomizationObject).SetProperty (
"DoubleBuffer", enableDoublebufferingCheckBox.Active);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/MarkersTextEditorPanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -32,12 +32,12 @@
public override void LoadPanelContents()
{
// set up the form controls instance
- Add (widget = new MarkersTextEditorPanelWidget ((IProperties) CustomizationObject));
+ Add (widget = new MarkersTextEditorPanelWidget ());
}
public override bool StorePanelContents()
{
- widget.Store ((IProperties) CustomizationObject);
+ widget.Store ();
return true;
}
@@ -67,7 +67,9 @@
[Glade.Widget] CheckButton showSpaceCharsCheckBox;
[Glade.Widget] SpinButton vRulerRowTextBox;
- public MarkersTextEditorPanelWidget (IProperties CustomizationObject) :
+ PropertyService CustomizationObject = (PropertyService) ServiceManager.Services.GetService (typeof (PropertyService));
+
+ public MarkersTextEditorPanelWidget () :
base ("EditorBindings.glade", "MarkersTextEditorPanel")
{
// Load Text
@@ -123,7 +125,7 @@
}
- public void Store (IProperties CustomizationObject)
+ public void Store ()
{
((IProperties)CustomizationObject).SetProperty("ShowInvalidLines", showInvalidLinesCheckBox.Active);
((IProperties)CustomizationObject).SetProperty("ShowLineNumbers", showLineNumberCheckBox.Active);
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -24,6 +24,7 @@
public class CodeGenerationPanel : AbstractOptionPanel {
class CodeGenerationPanelWidget : GladeWidgetExtract {
+ PropertyService p = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
[Glade.Widget] Label hdr_code_generation_options;
@@ -40,7 +41,7 @@
chk_doc_comments,
chk_other_comments;
- public CodeGenerationPanelWidget (IProperties p) : base ("Base.glade", "CodeGenerationOptionsPanel")
+ public CodeGenerationPanelWidget () : base ("Base.glade", "CodeGenerationOptionsPanel")
{
i18nizeHeader (hdr_code_generation_options, "${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CodeGenerationOptionsGroupBox}");
i18nizeHeader (hdr_comment_generation_options, "${res:Dialog.Options.IDEOptions.CodeGenerationOptionsPanel.CommentGenerationOptionsGroupBox}");
@@ -62,7 +63,7 @@
chk_other_comments.Active = p.GetProperty("GenerateAdditionalComments", true);
}
- public void Store (IProperties p)
+ public void Store ()
{
p.SetProperty ("StartBlockOnSameLine", chk_blk_on_same_line.Active);
p.SetProperty ("ElseOnClosing", chk_else_on_same_line.Active);
@@ -94,17 +95,12 @@
public override void LoadPanelContents ()
{
- IProperties p = (IProperties) PropertyService.GetProperty (codeGenerationProperty, new DefaultProperties ());
- Add (widget = new CodeGenerationPanelWidget (p));
+ Add (widget = new CodeGenerationPanelWidget ());
}
public override bool StorePanelContents ()
{
- IProperties p = (IProperties) PropertyService.GetProperty (codeGenerationProperty, new DefaultProperties ());
-
- widget.Store (p);
-
- PropertyService.SetProperty(codeGenerationProperty, p);
+ widget.Store ();
return true;
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -37,13 +37,11 @@
public override void LoadPanelContents()
{
- IProperties p = (IProperties) PropertyService.GetProperty (projectAndCombineProperty, new DefaultProperties ());
- Add (widget = new ProjectAndCombinePanelWidget (p));
+ Add (widget = new ProjectAndCombinePanelWidget ());
}
public override bool StorePanelContents()
{
- IProperties p = (IProperties) PropertyService.GetProperty (projectAndCombineProperty, new DefaultProperties ());
// check for correct settings
string projectPath = widget.projectLocationTextBox.GtkEntry.Text;
@@ -53,10 +51,9 @@
return false;
}
}
- p.SetProperty("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath);
+ PropertyService.SetProperty("ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath);
- widget.Store (p);
- PropertyService.SetProperty(projectAndCombineProperty, p);
+ widget.Store ();
return true;
}
@@ -65,6 +62,7 @@
{
// service instances needed
StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
+ PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
//
// Gtk controls
@@ -74,7 +72,7 @@
[Glade.Widget] public Gtk.CheckButton loadPrevProjectCheckBox, showTaskListCheckBox, showOutputCheckBox;
[Glade.Widget] public Gtk.Label locationLabel, settingsLabel, buildAndRunOptionsLabel;
- public ProjectAndCombinePanelWidget (IProperties p) : base ("Base.glade", "ProjectAndCombinePanel")
+ public ProjectAndCombinePanelWidget () : base ("Base.glade", "ProjectAndCombinePanel")
{
settingsLabel.Markup = "<b> " + StringParserService.Parse(
@@ -104,41 +102,41 @@
showTaskListCheckBox.Label = StringParserService.Parse(
"${res:Dialog.Options.IDEOptions.ProjectAndCombineOptions.ShowTaskListPadCheckBox}");
// read properties
- projectLocationTextBox.GtkEntry.Text = p.GetProperty(
+ projectLocationTextBox.GtkEntry.Text = PropertyService.GetProperty(
"ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
"MonoDevelopProjects")).ToString();
- BeforeCompileAction action = (BeforeCompileAction) p.GetProperty(
+ 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);
- loadPrevProjectCheckBox.Active = (bool)p.GetProperty(
+ loadPrevProjectCheckBox.Active = (bool)PropertyService.GetProperty(
"SharpDevelop.LoadPrevProjectOnStartup", false);
- showTaskListCheckBox.Active = (bool)p.GetProperty(
+ showTaskListCheckBox.Active = (bool)PropertyService.GetProperty(
"SharpDevelop.ShowTaskListAfterBuild", true);
- showOutputCheckBox.Active = (bool)p.GetProperty(
+ showOutputCheckBox.Active = (bool)PropertyService.GetProperty(
"SharpDevelop.ShowOutputWindowAtBuild", true);
}
- public void Store (IProperties p)
+ public void Store ()
{
// set properties
if (saveChangesRadioButton.Active) {
- p.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
+ PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
BeforeCompileAction.SaveAllFiles);
} else if (promptChangesRadioButton.Active) {
- p.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
+ PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
BeforeCompileAction.PromptForSave);
} else if (noSaveRadioButton.Active) {
- p.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
+ PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction",
BeforeCompileAction.Nothing);
}
- p.SetProperty("SharpDevelop.LoadPrevProjectOnStartup", loadPrevProjectCheckBox.Active);
- p.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
- p.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
+ PropertyService.SetProperty("SharpDevelop.LoadPrevProjectOnStartup", loadPrevProjectCheckBox.Active);
+ PropertyService.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
+ PropertyService.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -28,21 +28,19 @@
public override void LoadPanelContents()
{
- IProperties p = (IProperties) PropertyService.GetProperty (selectStyleProperty, new DefaultProperties ());
- Add (widget = new SelectStylePanelWidget (p));
+ Add (widget = new SelectStylePanelWidget ());
}
public override bool StorePanelContents()
{
- IProperties p = (IProperties) PropertyService.GetProperty (selectStyleProperty, new DefaultProperties ());
- widget.Store (p);
- PropertyService.SetProperty(selectStyleProperty, p);
+ widget.Store ();
return true;
}
class SelectStylePanelWidget : GladeWidgetExtract
{
+ PropertyService p = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
//FIXME: Hashtables are wrong here.
//FIXME: Yes, this is a dirty hack.
//FIXME: Lets use something else.
@@ -53,7 +51,7 @@
[Glade.Widget] public Gtk.CheckButton hiddenButton;
[Glade.Widget] public Gtk.OptionMenu option;
- public SelectStylePanelWidget (IProperties p) : base ("Base.glade", "SelectStylePanel")
+ public SelectStylePanelWidget () : base ("Base.glade", "SelectStylePanel")
{
ambienceMenu = new Gtk.Menu ();
option.Menu = ambienceMenu;
@@ -67,17 +65,17 @@
foreach (IAddInTreeNode childNode in treeNode.ChildNodes.Values)
{
Gtk.MenuItem i = Gtk.MenuItem.NewWithLabel (childNode.Codon.ID);
- ambienceMenu.Append(i);
- MenuToValue[i] = childNode.Codon.ID;
- if (childNode.Codon.ID == active) {
- option.SetHistory (im);
+ ambienceMenu.Append(i);
+ MenuToValue[i] = childNode.Codon.ID;
+ if (childNode.Codon.ID == active) {
+ option.SetHistory (im);
+ }
+ im++;
}
- im++;
- }
}
- public void Store(IProperties p)
+ public void Store()
{
p.SetProperty("ICSharpCode.SharpDevelop.Gui.ProjectBrowser.ShowExtensions", extensionButton.Active);
p.SetProperty("ICSharpCode.SharpDevelop.Gui.FileScout.ShowHidden", hiddenButton.Active);
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs 2004-02-22 23:45:49 UTC (rev 989)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs 2004-02-23 01:21:58 UTC (rev 990)
@@ -515,9 +515,9 @@
UpdateMenu(null, null);
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
if (e.Project != null) {
- Title = String.Concat(e.Project.Name, " - ", resourceService.GetString("MainWindow.DialogName"));
+ Title = String.Concat(e.Project.Name, " - ", "MonoDevelop");
} else {
- Title = resourceService.GetString("MainWindow.DialogName");
+ Title = "MonoDevelop";
}
}
More information about the Monodevelop-patches-list
mailing list