diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 3dff825..e1ffd48 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -64,6 +64,13 @@ set(src_files add_definitions( -DDEBUG_LEVEL=3 ) add_definitions( -DDEBUG=1 ) add_definitions( -DPROJECT_NAME="edn" ) +if (APPLE) + add_definitions( -D__TARGET_OS__MacOs ) +elseif (UNIX) + add_definitions( -D__TARGET_OS__Linux ) +elseif (WIN32) + add_definitions( -D__TARGET_OS__Windows ) +endif () # read version : file (STRINGS "tag" BUILD_VERSION) add_definitions( -DAPPL_VERSION="${BUILD_VERSION}" ) @@ -86,7 +93,18 @@ include_directories(${ewol_SOURCE_DIR}) #target_link_libraries(edn ewol) target_link_libraries(edn ewol linearmath zlib etk freetype exml ejson egami edtaa3 date esvg png) + +if (APPLE) + target_link_libraries(edn + "-framework Cocoa" + "-framework OpenGL" + "-framework QuartzCore" + "-framework AppKit" + ) +elseif (UNIX) target_link_libraries(edn -lGL -lX11 -lpthread) +elseif (WIN32) + +endif () -add_definitions( -D__TARGET_OS__Linux ) diff --git a/sources/appl/Buffer.cpp b/sources/appl/Buffer.cpp index c749a34..b62a21a 100644 --- a/sources/appl/Buffer.cpp +++ b/sources/appl/Buffer.cpp @@ -619,8 +619,6 @@ bool appl::Buffer::copy(std::string& _data) { void appl::Buffer::copy(std::string& _data, const appl::Buffer::Iterator& _pos, const appl::Buffer::Iterator& _posEnd) { _data.clear(); - int64_t startPos = getStartSelectionPos(); - int64_t endPos = getStopSelectionPos(); for (Iterator it = _pos; it != _posEnd && (bool)it == true; diff --git a/sources/appl/Gui/MainWindows.cpp b/sources/appl/Gui/MainWindows.cpp index 85a4389..492acf5 100644 --- a/sources/appl/Gui/MainWindows.cpp +++ b/sources/appl/Gui/MainWindows.cpp @@ -395,22 +395,22 @@ void MainWindows::onReceiveMessage(const ewol::object::Message& _msg) { } else if (_msg.getMessage() == ednMsgGuiSave) { APPL_DEBUG("Request saving the file : " << _msg.getData()); if (std::tolower(_msg.getData()) == "current") { - appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", false); + new appl::WorkerSaveFile("", false); return; } else if (std::tolower(_msg.getData()) == "all") { - appl::WorkerSaveAllFile* tmpWorker = new appl::WorkerSaveAllFile(); + new appl::WorkerSaveAllFile(); return; } else { APPL_ERROR("UNKNOW request : " << _msg); } } else if (_msg.getMessage() == ednMsgGuiSaveAs) { - appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", true); + new appl::WorkerSaveFile("", true); } else if (_msg.getMessage() == ednMsgGuiClose) { // Get a ref on the buffer selected (if null, no buffer was selected ...) if (_msg.getData() == "current") { - appl::WorkerCloseFile* tmpWorker = new appl::WorkerCloseFile(""); + new appl::WorkerCloseFile(""); } else { - appl::WorkerCloseAllFile* tmpWorker = new appl::WorkerCloseAllFile(); + new appl::WorkerCloseAllFile(); } } else if (_msg.getMessage() == mainWindowsRequestSaveFile) { // return after a choice of close... if (m_bufferManager->exist(_msg.getData()) == false) { diff --git a/sources/appl/Gui/MainWindows.h b/sources/appl/Gui/MainWindows.h index 9105855..baca2cb 100644 --- a/sources/appl/Gui/MainWindows.h +++ b/sources/appl/Gui/MainWindows.h @@ -19,7 +19,6 @@ class MainWindows : public ewol::widget::Windows { private: - int32_t m_currentSavingAsIdBuffer; ewol::widget::Label* m_widgetLabelFileName; public: // Constructeur diff --git a/sources/appl/Gui/TagFileSelection.cpp b/sources/appl/Gui/TagFileSelection.cpp index 17e4c23..0e488ba 100644 --- a/sources/appl/Gui/TagFileSelection.cpp +++ b/sources/appl/Gui/TagFileSelection.cpp @@ -36,12 +36,8 @@ appl::TagFileSelection::TagFileSelection(void) { addEventId(applEventctagsCancel); ewol::widget::Label* myWidgetTitle = NULL; - ewol::widget::Button* myWidgetValidate = NULL; - ewol::widget::Button* myWidgetCancel = NULL; ewol::widget::Sizer * mySizerVert = NULL; - ewol::widget::Sizer * mySizerHori = NULL; - ewol::widget::Spacer * mySpacer = NULL; #if defined(__TARGET_OS__Android) setMinSize(ewol::Dimension(vec2(90,90),ewol::Dimension::Pourcent)); #elif defined(__TARGET_OS__Windows) diff --git a/sources/appl/Gui/TextViewer.cpp b/sources/appl/Gui/TextViewer.cpp index 09bfeb3..cc1441b 100644 --- a/sources/appl/Gui/TextViewer.cpp +++ b/sources/appl/Gui/TextViewer.cpp @@ -129,14 +129,11 @@ void appl::TextViewer::onRegenerateDisplay(void) { vec3 tmpCursorPosition(0, 0, -1); float tmpCursorLenght = -1.0; // real display ... - etk::Buffer& buf = m_buffer->getData(); m_displayText.setColor(etk::Color<>(0, 0, 0, 256)); float countNbLine = 1; int32_t countColomn = 0; // the siplay string : std::u32string stringToDisplay; - int64_t bufferElementSize = 0; - bool isSelect = false; appl::Buffer::Iterator selectPosStart = m_buffer->begin(); appl::Buffer::Iterator selectPosStop = m_buffer->begin(); if (m_buffer->hasTextSelected() == true) { @@ -352,7 +349,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) { m_buffer->setSelectMode(false); // normal adding char ... char output[5]; - int32_t nbElement = u32char::convertUtf8(localValue, output); if ( m_buffer->hasTextSelected() == false && _event.getSpecialKey().getInsert() == true) { appl::Buffer::Iterator pos = m_buffer->cursor(); @@ -368,7 +364,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) { } // move events ... if (_event.getStatus() == ewol::key::statusDown) { - bool needUpdatePosition = true; // selection when shift is set: m_buffer->setSelectMode(_event.getSpecialKey().getShift()); // check selection event ... diff --git a/sources/appl/Highlight.cpp b/sources/appl/Highlight.cpp index 0797e72..9410c12 100644 --- a/sources/appl/Highlight.cpp +++ b/sources/appl/Highlight.cpp @@ -100,7 +100,6 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _ } appl::Highlight::~Highlight(void) { - int32_t i; // clean all Element for (int32_t iii = 0; iii < m_listHighlightPass1.size(); ++iii) { if (m_listHighlightPass1[iii] != NULL) {