[DEV] cmake file update

This commit is contained in:
Edouard DUPIN 2014-03-04 21:18:41 +01:00
parent def986ab82
commit 17101a38b0
7 changed files with 24 additions and 19 deletions

View File

@ -64,6 +64,13 @@ set(src_files
add_definitions( -DDEBUG_LEVEL=3 ) add_definitions( -DDEBUG_LEVEL=3 )
add_definitions( -DDEBUG=1 ) add_definitions( -DDEBUG=1 )
add_definitions( -DPROJECT_NAME="edn" ) 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 : # read version :
file (STRINGS "tag" BUILD_VERSION) file (STRINGS "tag" BUILD_VERSION)
add_definitions( -DAPPL_VERSION="${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)
target_link_libraries(edn ewol linearmath zlib etk freetype exml ejson egami edtaa3 date esvg png) 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) target_link_libraries(edn -lGL -lX11 -lpthread)
elseif (WIN32)
endif ()
add_definitions( -D__TARGET_OS__Linux )

View File

@ -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) { void appl::Buffer::copy(std::string& _data, const appl::Buffer::Iterator& _pos, const appl::Buffer::Iterator& _posEnd) {
_data.clear(); _data.clear();
int64_t startPos = getStartSelectionPos();
int64_t endPos = getStopSelectionPos();
for (Iterator it = _pos; for (Iterator it = _pos;
it != _posEnd && it != _posEnd &&
(bool)it == true; (bool)it == true;

View File

@ -395,22 +395,22 @@ void MainWindows::onReceiveMessage(const ewol::object::Message& _msg) {
} else if (_msg.getMessage() == ednMsgGuiSave) { } else if (_msg.getMessage() == ednMsgGuiSave) {
APPL_DEBUG("Request saving the file : " << _msg.getData()); APPL_DEBUG("Request saving the file : " << _msg.getData());
if (std::tolower(_msg.getData()) == "current") { if (std::tolower(_msg.getData()) == "current") {
appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", false); new appl::WorkerSaveFile("", false);
return; return;
} else if (std::tolower(_msg.getData()) == "all") { } else if (std::tolower(_msg.getData()) == "all") {
appl::WorkerSaveAllFile* tmpWorker = new appl::WorkerSaveAllFile(); new appl::WorkerSaveAllFile();
return; return;
} else { } else {
APPL_ERROR("UNKNOW request : " << _msg); APPL_ERROR("UNKNOW request : " << _msg);
} }
} else if (_msg.getMessage() == ednMsgGuiSaveAs) { } else if (_msg.getMessage() == ednMsgGuiSaveAs) {
appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", true); new appl::WorkerSaveFile("", true);
} else if (_msg.getMessage() == ednMsgGuiClose) { } else if (_msg.getMessage() == ednMsgGuiClose) {
// Get a ref on the buffer selected (if null, no buffer was selected ...) // Get a ref on the buffer selected (if null, no buffer was selected ...)
if (_msg.getData() == "current") { if (_msg.getData() == "current") {
appl::WorkerCloseFile* tmpWorker = new appl::WorkerCloseFile(""); new appl::WorkerCloseFile("");
} else { } else {
appl::WorkerCloseAllFile* tmpWorker = new appl::WorkerCloseAllFile(); new appl::WorkerCloseAllFile();
} }
} else if (_msg.getMessage() == mainWindowsRequestSaveFile) { // return after a choice of close... } else if (_msg.getMessage() == mainWindowsRequestSaveFile) { // return after a choice of close...
if (m_bufferManager->exist(_msg.getData()) == false) { if (m_bufferManager->exist(_msg.getData()) == false) {

View File

@ -19,7 +19,6 @@
class MainWindows : public ewol::widget::Windows { class MainWindows : public ewol::widget::Windows {
private: private:
int32_t m_currentSavingAsIdBuffer;
ewol::widget::Label* m_widgetLabelFileName; ewol::widget::Label* m_widgetLabelFileName;
public: public:
// Constructeur // Constructeur

View File

@ -36,12 +36,8 @@ appl::TagFileSelection::TagFileSelection(void) {
addEventId(applEventctagsCancel); addEventId(applEventctagsCancel);
ewol::widget::Label* myWidgetTitle = NULL; ewol::widget::Label* myWidgetTitle = NULL;
ewol::widget::Button* myWidgetValidate = NULL;
ewol::widget::Button* myWidgetCancel = NULL;
ewol::widget::Sizer * mySizerVert = NULL; ewol::widget::Sizer * mySizerVert = NULL;
ewol::widget::Sizer * mySizerHori = NULL;
ewol::widget::Spacer * mySpacer = NULL;
#if defined(__TARGET_OS__Android) #if defined(__TARGET_OS__Android)
setMinSize(ewol::Dimension(vec2(90,90),ewol::Dimension::Pourcent)); setMinSize(ewol::Dimension(vec2(90,90),ewol::Dimension::Pourcent));
#elif defined(__TARGET_OS__Windows) #elif defined(__TARGET_OS__Windows)

View File

@ -129,14 +129,11 @@ void appl::TextViewer::onRegenerateDisplay(void) {
vec3 tmpCursorPosition(0, 0, -1); vec3 tmpCursorPosition(0, 0, -1);
float tmpCursorLenght = -1.0; float tmpCursorLenght = -1.0;
// real display ... // real display ...
etk::Buffer& buf = m_buffer->getData();
m_displayText.setColor(etk::Color<>(0, 0, 0, 256)); m_displayText.setColor(etk::Color<>(0, 0, 0, 256));
float countNbLine = 1; float countNbLine = 1;
int32_t countColomn = 0; int32_t countColomn = 0;
// the siplay string : // the siplay string :
std::u32string stringToDisplay; std::u32string stringToDisplay;
int64_t bufferElementSize = 0;
bool isSelect = false;
appl::Buffer::Iterator selectPosStart = m_buffer->begin(); appl::Buffer::Iterator selectPosStart = m_buffer->begin();
appl::Buffer::Iterator selectPosStop = m_buffer->begin(); appl::Buffer::Iterator selectPosStop = m_buffer->begin();
if (m_buffer->hasTextSelected() == true) { if (m_buffer->hasTextSelected() == true) {
@ -352,7 +349,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) {
m_buffer->setSelectMode(false); m_buffer->setSelectMode(false);
// normal adding char ... // normal adding char ...
char output[5]; char output[5];
int32_t nbElement = u32char::convertUtf8(localValue, output);
if ( m_buffer->hasTextSelected() == false if ( m_buffer->hasTextSelected() == false
&& _event.getSpecialKey().getInsert() == true) { && _event.getSpecialKey().getInsert() == true) {
appl::Buffer::Iterator pos = m_buffer->cursor(); appl::Buffer::Iterator pos = m_buffer->cursor();
@ -368,7 +364,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) {
} }
// move events ... // move events ...
if (_event.getStatus() == ewol::key::statusDown) { if (_event.getStatus() == ewol::key::statusDown) {
bool needUpdatePosition = true;
// selection when shift is set: // selection when shift is set:
m_buffer->setSelectMode(_event.getSpecialKey().getShift()); m_buffer->setSelectMode(_event.getSpecialKey().getShift());
// check selection event ... // check selection event ...

View File

@ -100,7 +100,6 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
} }
appl::Highlight::~Highlight(void) { appl::Highlight::~Highlight(void) {
int32_t i;
// clean all Element // clean all Element
for (int32_t iii = 0; iii < m_listHighlightPass1.size(); ++iii) { for (int32_t iii = 0; iii < m_listHighlightPass1.size(); ++iii) {
if (m_listHighlightPass1[iii] != NULL) { if (m_listHighlightPass1[iii] != NULL) {