From: Jean-Philippe Bruyère Date: Fri, 7 Dec 2018 03:24:53 +0000 (+0100) Subject: wip X-Git-Tag: v0.8.7~29^2~3 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=268ef18fd37492060988a3b3fe3224ce8c798112;p=jp%2Fcrow.git wip --- diff --git a/CrowIDE/CrowIDE.csproj b/CrowIDE/CrowIDE.csproj index 7f23c32a..bf02c662 100644 --- a/CrowIDE/CrowIDE.csproj +++ b/CrowIDE/CrowIDE.csproj @@ -124,6 +124,7 @@ + diff --git a/CrowIDE/src/CrowIDE.cs b/CrowIDE/src/CrowIDE.cs index 5db4af6d..55ea1570 100644 --- a/CrowIDE/src/CrowIDE.cs +++ b/CrowIDE/src/CrowIDE.cs @@ -36,8 +36,6 @@ namespace Crow.Coding { class CrowIDE : Interface { - static bool running = true; - public Command CMDNew, CMDOpen, CMDSave, CMDSaveAs, cmdCloseSolution, CMDQuit, CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp, CMDAbout, CMDOptions, @@ -50,7 +48,7 @@ namespace Crow.Coding CMDOpen = new Command(new Action(() => openFileDialog())) { Caption = "Open...", Icon = new SvgPicture("#Crow.Coding.icons.open.svg")}; CMDSave = new Command(new Action(() => saveFileDialog())) { Caption = "Save", Icon = new SvgPicture("#Crow.Coding.icons.save.svg"), CanExecute = false}; CMDSaveAs = new Command(new Action(() => saveFileDialog())) { Caption = "Save As...", Icon = new SvgPicture("#Crow.Coding.icons.save.svg"), CanExecute = false}; - CMDQuit = new Command(new Action(() => running = false)) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")}; + CMDQuit = new Command(new Action(() => app.running = false)) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")}; CMDUndo = new Command(new Action(() => undo())) { Caption = "Undo", Icon = new SvgPicture("#Crow.Coding.icons.undo.svg"), CanExecute = false}; CMDRedo = new Command(new Action(() => redo())) { Caption = "Redo", Icon = new SvgPicture("#Crow.Coding.icons.redo.svg"), CanExecute = false}; //CMDCut = new Command(new Action(() => Quit (null, null))) { Caption = "Cut", Icon = new SvgPicture("#Crow.Coding.icons.scissors.svg"), CanExecute = false}; @@ -105,6 +103,7 @@ namespace Crow.Coding public void saveWinConfigs() { Configuration.Global.Set ("WinConfigs", mainDock.ExportConfig ()); + Configuration.Global.Save (); } public void reloadWinConfigs() { string conf = Configuration.Global.Get("WinConfigs"); @@ -125,13 +124,9 @@ namespace Crow.Coding app.reloadWinConfigs (); - while (running) { - app.ProcessEvents (); - //Thread.Sleep(1); - } + app.Run (); app.saveWinConfigs (); - Thread.Sleep (500); } } diff --git a/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs b/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs index d5d9240a..feef6b41 100644 --- a/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs +++ b/CrowIDE/src/Editors/CodeBuffer/TextEditor.cs @@ -230,7 +230,7 @@ namespace Crow.Text } } } - [DefaultValue("BlueGrey")] + [DefaultValue("Blue")] public virtual Color SelectionBackground { get { return selBackground; } set { diff --git a/CrowIDE/src/ProjectTree/ProjectFile.cs b/CrowIDE/src/ProjectTree/ProjectFile.cs index 2fab8ec4..7218c1d1 100644 --- a/CrowIDE/src/ProjectTree/ProjectFile.cs +++ b/CrowIDE/src/ProjectTree/ProjectFile.cs @@ -56,7 +56,7 @@ namespace Crow.Coding { Caption = "Save As ..", Icon = new SvgPicture ("#Crow.Coding.icons.save.svg"), CanExecute = false }; cmdOpen = new Crow.Command (new Action (() => Open ())) { Caption = "Open", Icon = new SvgPicture ("#Crow.Coding.icons.open.svg"), CanExecute = true }; - cmdClose = new Crow.Command (new Action (() => Close ())) + cmdClose = new Crow.Command (new Action (() => OnQueryClose (this,null))) { Caption = "Close", Icon = new SvgPicture ("#Crow.Coding.icons.open.svg"), CanExecute = false }; cmdUndo = new Crow.Command (new Action (() => Undo (null))) { Caption = "Undo", Icon = new SvgPicture ("#Crow.Coding.icons.undo.svg"), CanExecute = false }; @@ -110,6 +110,7 @@ namespace Crow.Coding NotifyValueChanged ("IsOpened", isOpened); } } + public void UnregisterEditor (object editor){ lock(RegisteredEditors){ RegisteredEditors.Remove (editor); diff --git a/CrowIDE/ui/IDE.style b/CrowIDE/ui/IDE.style index 9f01cc2d..3ba5ed42 100644 --- a/CrowIDE/ui/IDE.style +++ b/CrowIDE/ui/IDE.style @@ -39,7 +39,7 @@ TabItem { TreeItemBorder { CornerRadius="2"; Margin="0"; - Focusable="true"; + //Focusable="true"; Height="Fit"; Width="Stretched"; Foreground="Transparent"; diff --git a/CrowIDE/ui/ProjectTree.template b/CrowIDE/ui/ProjectTree.template index 1b4b0543..a18b67dc 100644 --- a/CrowIDE/ui/ProjectTree.template +++ b/CrowIDE/ui/ProjectTree.template @@ -12,10 +12,10 @@ - +