From 92b55c43f6caac5aaa6c7c92a0be0340504bc3a1 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 15 Dec 2021 22:59:51 +0100 Subject: [PATCH] update --- data/GUI-Search.egi | 83 +++++++++++++++++++++++++++++++++++++++++ sources/appl/Buffer.cpp | 5 ++- 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 data/GUI-Search.egi diff --git a/data/GUI-Search.egi b/data/GUI-Search.egi new file mode 100644 index 0000000..4199d5d --- /dev/null +++ b/data/GUI-Search.egi @@ -0,0 +1,83 @@ +sizer { + mode: "hori" + expand: "true,false" + fill: true + lock: true + button { + name: "[{ID}]SEARCH:close" + image { + src: "THEME_GUI:///Remove.svg" + fill: true + size: "7,7mm" + hover: "_T(Close search bar)" + } + } + entry { + name: "[{ID}]SEARCH:search-entry" + expand: true + fill: true + } + button { + name: "[{ID}]SEARCH:search" + image { + src: "THEME_GUI:///Search.svg" + fill: true + size: "7,7mm" + } + } + entry { + name: "[{ID}]SEARCH:replace-entry" + expand: true + fill: true + } + button { + name: "[{ID}]SEARCH:replace" + image { + src: "THEME_GUI:///Replace.svg?lib=ewol" + fill: true + size: "7,7mm" + } + } + button { + name: "[{ID}]SEARCH:case" + toggle: true + image { + src: "THEME_GUI:///CaseSensitive.svg?lib=ewol" + fill: true + size: "7,7mm" + } + image { + src: "THEME_GUI:///CaseSensitive.svg?lib=ewol" + fill: true + size: "7,7mm" + } + } + button { + name: "[{ID}]SEARCH:wrap" + toggle: true + image { + src: "THEME_GUI:///WrapAround.svg?lib=ewol" + fill: true + size: "7,7mm" + } + image { + src: "THEME_GUI:///WrapAround.svg?lib=ewol" + fill: true + size: "7,7mm" + } + } + button { + name: "[{ID}]SEARCH:up-down" + toggle: true + image { + src: "THEME_GUI:///Up.svg?lib=ewol" + fill: true + size: "7,7mm" + } + image { + src: "THEME_GUI:///Down.svg?lib=ewol" + fill: true + size: "7,7mm" + } + } +} \ No newline at end of file diff --git a/sources/appl/Buffer.cpp b/sources/appl/Buffer.cpp index d7cc813..454e267 100644 --- a/sources/appl/Buffer.cpp +++ b/sources/appl/Buffer.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -171,7 +172,7 @@ bool appl::Buffer::storeFile() { if (m_data.dumpIn(m_fileName) == true) { APPL_INFO("saving file : " << m_fileName); etk::String extention = m_fileName.getExtention(); - if (etk::isIn(extention, {"cpp", "hpp", "h", "hpp"}) { + if (etk::isIn(extention, etk::Vector{"cpp", "hpp", "h", "hpp"})) { etk::Path clangFile = etk::path::findInParent(m_fileName, ".clang-format"); if (etk::path::isFile(clangFile) == true) { etk::String output = etk::exec("clang-format " + m_fileName.getAbsolute());// + " -assume-filename=" + clangFile.getAbsolute() + " @@ -190,7 +191,7 @@ bool appl::Buffer::storeFile() { APPL_ERROR(" ==> data is differents"); m_fileIsModify = true; setModification(true); - signalFileIsModify(); + signalFileIsModify.emit(); return true; } }