~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/BehaviorPanel.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
// THE SOFTWARE.
25
25
 
26
26
using System;
27
 
using MonoDevelop.Core.Gui.Dialogs;
28
 
using MonoDevelop.Core.Gui;
29
27
using MonoDevelop.Core;
 
28
using MonoDevelop.Ide.Gui.Dialogs;
30
29
 
31
30
namespace MonoDevelop.SourceEditor.OptionPanels
32
31
{
42
41
                        controlLeftRightCombobox.InsertText (0, GettextCatalog.GetString ("MonoDevelop"));
43
42
                        controlLeftRightCombobox.InsertText (1, GettextCatalog.GetString ("Emacs"));
44
43
                        controlLeftRightCombobox.InsertText (2, GettextCatalog.GetString ("SharpDevelop"));
 
44
                        
 
45
                        autoInsertBraceCheckbutton.Toggled += HandleAutoInsertBraceCheckbuttonToggled;
45
46
                }
46
47
                
47
48
                public virtual Gtk.Widget CreatePanelWidget ()
48
49
                {
49
50
                        //                      this.autoInsertTemplateCheckbutton.Active  = DefaultSourceEditorOptions.Options.AutoInsertTemplates;
50
51
                        this.autoInsertBraceCheckbutton.Active = DefaultSourceEditorOptions.Instance.AutoInsertMatchingBracket;
 
52
                        this.smartSemicolonPlaceCheckbutton.Active = DefaultSourceEditorOptions.Instance.SmartSemicolonPlacement;
 
53
                        
51
54
                        this.tabAsReindentCheckbutton.Active = DefaultSourceEditorOptions.Instance.TabIsReindent;
52
55
                        this.indentationCombobox.Active = (int)DefaultSourceEditorOptions.Instance.IndentStyle;
53
56
                        this.controlLeftRightCombobox.Active = (int)DefaultSourceEditorOptions.Instance.ControlLeftRightMode;
54
57
                        this.useViModesCheck.Active = DefaultSourceEditorOptions.Instance.UseViModes;
55
58
                        this.checkbuttonOnTheFlyFormatting.Active = DefaultSourceEditorOptions.Instance.OnTheFlyFormatting;
 
59
                        
 
60
                        checkbuttonAutoSetSearchPatternCasing.Active = PropertyService.Get ("AutoSetPatternCasing", true);
 
61
                        HandleAutoInsertBraceCheckbuttonToggled (null, null);
56
62
                        return this;
57
63
                }
 
64
 
 
65
                void HandleAutoInsertBraceCheckbuttonToggled (object sender, EventArgs e)
 
66
                {
 
67
                        this.smartSemicolonPlaceCheckbutton.Sensitive = this.autoInsertBraceCheckbutton.Active;
 
68
                }
58
69
                
59
70
                public virtual void ApplyChanges ()
60
71
                {
61
72
                        //DefaultSourceEditorOptions.Options.AutoInsertTemplates = this.autoInsertTemplateCheckbutton.Active;
62
73
                        DefaultSourceEditorOptions.Instance.AutoInsertMatchingBracket = this.autoInsertBraceCheckbutton.Active;
 
74
                        DefaultSourceEditorOptions.Instance.SmartSemicolonPlacement = this.smartSemicolonPlaceCheckbutton.Active;
63
75
                        DefaultSourceEditorOptions.Instance.IndentStyle = (MonoDevelop.Ide.Gui.Content.IndentStyle)this.indentationCombobox.Active;
64
76
                        DefaultSourceEditorOptions.Instance.TabIsReindent = this.tabAsReindentCheckbutton.Active;
65
77
                        DefaultSourceEditorOptions.Instance.ControlLeftRightMode = (ControlLeftRightMode)this.controlLeftRightCombobox.Active;
66
78
                        DefaultSourceEditorOptions.Instance.UseViModes = this.useViModesCheck.Active;
67
79
                        DefaultSourceEditorOptions.Instance.OnTheFlyFormatting = this.checkbuttonOnTheFlyFormatting.Active;
 
80
                        PropertyService.Set ("AutoSetPatternCasing", checkbuttonAutoSetSearchPatternCasing.Active);
68
81
                }
69
82
 
70
83
                public void Initialize (OptionsDialog dialog, object dataObject)