From 926ecb0cd88d3e0f8035382daf91de1515f9c866 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Wed, 28 Jan 2015 17:17:56 +0300 Subject: [PATCH] fixes --- src/dlangide.d | 8 ++++---- src/dlangide/ui/frame.d | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/dlangide.d b/src/dlangide.d index 078e22f..f9bd162 100644 --- a/src/dlangide.d +++ b/src/dlangide.d @@ -20,13 +20,13 @@ extern (C) int UIAppMain(string[] args) { FontManager.hintingMode = HintingMode.Normal; // you can override antialiasing setting here FontManager.minAnitialiasedFontSize = 0; - version (USE_OPENGL) { + //version (USE_OPENGL) { // you can turn on subpixel font rendering (ClearType) here FontManager.subpixelRenderingMode = SubpixelRenderingMode.None; // - } else { + //} else { // you can turn on subpixel font rendering (ClearType) here - FontManager.subpixelRenderingMode = SubpixelRenderingMode.BGR; //SubpixelRenderingMode.None; // - } + //FontManager.subpixelRenderingMode = SubpixelRenderingMode.BGR; //SubpixelRenderingMode.None; // + //} // create window Window window = Platform.instance.createWindow("Dlang IDE", null); diff --git a/src/dlangide/ui/frame.d b/src/dlangide/ui/frame.d index dc1c281..a0fa313 100644 --- a/src/dlangide/ui/frame.d +++ b/src/dlangide/ui/frame.d @@ -33,6 +33,24 @@ bool isSupportedSourceTextFileFormat(string filename) { || filename.endsWith(".html") || filename.endsWith(".css") || filename.endsWith(".log") || filename.endsWith(".hpp")); } +class BackgroundOperationWatcherTest : BackgroundOperationWatcher { + this(AppFrame frame) { + super(frame); + } + int _counter; + /// returns description of background operation to show in status line + override @property dstring description() { return "Test progress: "d ~ to!dstring(_counter); } + /// returns icon of background operation to show in status line + override @property string icon() { return "folder"; } + /// update background operation status + override void update() { + _counter++; + if (_counter >= 100) + _finished = true; + super.update(); + } +} + /// DIDE app frame class IDEFrame : AppFrame { @@ -358,6 +376,10 @@ class IDEFrame : AppFrame { }; dlg.show(); return true; + case IDEActions.BuildProject: + case IDEActions.BuildWorkspace: + setBackgroundOperation(new BackgroundOperationWatcherTest(this)); + return true; case IDEActions.WindowCloseAllDocuments: askForUnsavedEdits(delegate() { closeAllDocuments();