From 96a251ab02b5a698922b6bd52a9fd6ea37d57a73 Mon Sep 17 00:00:00 2001 From: Emil Nicolaie Perhinschi Date: Tue, 16 Jun 2020 00:37:34 +0300 Subject: [PATCH] fixed examples including missing import std.conv; fixed deprecation warnings in examples --- examples/d3d/src/d3d.d | 3 +-- .../src/dlangui/widgets/spreadsheet.d | 2 ++ examples/spreadsheet/src/spreadsheetapp.d | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/examples/d3d/src/d3d.d b/examples/d3d/src/d3d.d index d7ee9aa3..8fc3f00f 100644 --- a/examples/d3d/src/d3d.d +++ b/examples/d3d/src/d3d.d @@ -13,8 +13,7 @@ import dlangui.graphics.scene.objimport; import dlangui.graphics.scene.fbximport; import dlangui.graphics.glsupport; import dlangui.graphics.gldrawbuf; -import derelict.opengl3.gl3; -import derelict.opengl3.gl; +import derelict.opengl.gl; mixin APP_ENTRY_POINT; diff --git a/examples/spreadsheet/src/dlangui/widgets/spreadsheet.d b/examples/spreadsheet/src/dlangui/widgets/spreadsheet.d index 69e138a3..1dcd5e54 100644 --- a/examples/spreadsheet/src/dlangui/widgets/spreadsheet.d +++ b/examples/spreadsheet/src/dlangui/widgets/spreadsheet.d @@ -43,6 +43,8 @@ class SheetEditControl : HorizontalLayout { } class SpreadSheetView : StringGridWidget { + import std.conv: to; + this(string ID = null) { super(ID); layoutWidth = FILL_PARENT; diff --git a/examples/spreadsheet/src/spreadsheetapp.d b/examples/spreadsheet/src/spreadsheetapp.d index 66f24477..6e5582f4 100644 --- a/examples/spreadsheet/src/spreadsheetapp.d +++ b/examples/spreadsheet/src/spreadsheetapp.d @@ -130,15 +130,15 @@ class EditFrame : AppFrame { window.close(); return true; case IDEActions.HelpAbout: - window.showMessageBox(UIString("About DlangUI ML Editor"d), - UIString("DLangIDE\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple editor for DML code"d)); + window.showMessageBox(UIString.fromRaw("About DlangUI ML Editor"d), + UIString.fromRaw("DLangIDE\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple editor for DML code"d)); return true; case IDEActions.FileNew: UIString caption; caption = "Create new DML file"d; FileDialog dlg = createFileDialog(caption, false); - dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml")); - dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*")); dlg.dialogResult = delegate(Dialog dlg, const Action result) { if (result.id == ACTION_OPEN.id) { string filename = result.stringParam; @@ -156,8 +156,8 @@ class EditFrame : AppFrame { UIString caption; caption = "Save DML File as"d; FileDialog dlg = createFileDialog(caption, false); - dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml")); - dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*")); dlg.dialogResult = delegate(Dialog dlg, const Action result) { if (result.id == ACTION_OPEN.id) { string filename = result.stringParam; @@ -170,8 +170,8 @@ class EditFrame : AppFrame { UIString caption; caption = "Open DML File"d; FileDialog dlg = createFileDialog(caption); - dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml")); - dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml")); + dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*")); dlg.dialogResult = delegate(Dialog dlg, const Action result) { if (result.id == ACTION_OPEN.id) { string filename = result.stringParam;