~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
                                return;
62
62
                        string name = (string)store.GetValue (iter, 0);
63
63
                        
64
 
                        var style = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle (this.Style, name);
 
64
                        var style = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle (name);
65
65
                        
66
66
                        style = style.Clone ();
67
67
                        style.Name = this.entryName.Text;
68
68
                        style.Description = this.entryDescription.Text;
69
 
                        
 
69
                        style.BaseScheme = name;
70
70
                        string path = SourceEditorDisplayBinding.SyntaxModePath;
71
71
                        string baseName = style.Name.Replace (" ", "_");
72
72
                        
73
 
                        while (File.Exists (System.IO.Path.Combine (path, baseName + "Style.xml"))) {
 
73
                        while (File.Exists (System.IO.Path.Combine (path, baseName + "Style.json"))) {
74
74
                                baseName = baseName + "_";
75
75
                        }
76
 
                        string fileName = System.IO.Path.Combine (path, baseName + "Style.xml");
 
76
                        string fileName = System.IO.Path.Combine (path, baseName + "Style.json");
77
77
                        try {
78
78
                                style.Save (fileName);
79
79
                                Mono.TextEditor.Highlighting.SyntaxModeService.AddStyle (fileName, style);