[DEV] update to the new API, system start but not compleately work
This commit is contained in:
parent
08261def10
commit
cab0e6009d
@ -139,9 +139,7 @@ appl::Buffer::Buffer() :
|
||||
}
|
||||
|
||||
appl::Buffer::~Buffer() {
|
||||
if (m_highlight == NULL) {
|
||||
appl::Highlight::release(m_highlight);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool appl::Buffer::loadFile(const std::string& _name) {
|
||||
@ -694,9 +692,7 @@ void appl::Buffer::tryFindHighlightType() {
|
||||
void appl::Buffer::setHighlightType(const std::string& _type) {
|
||||
m_highlightType = "";
|
||||
cleanHighLight();
|
||||
if (m_highlight == NULL) {
|
||||
appl::Highlight::release(m_highlight);
|
||||
}
|
||||
m_highlight.reset();
|
||||
std::string resourceName = appl::highlightManager::getFileWithTypeType(_type);
|
||||
if (resourceName == "") {
|
||||
return;
|
||||
|
@ -588,7 +588,7 @@ namespace appl {
|
||||
protected:
|
||||
std::string m_highlightType; //!< Name of the highlight type
|
||||
|
||||
appl::Highlight* m_highlight; //!< internal link with the Highlight system
|
||||
ewol::object::Shared<appl::Highlight> m_highlight; //!< internal link with the Highlight system
|
||||
std::vector<appl::HighlightInfo> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
||||
public:
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@ namespace appl {
|
||||
public:
|
||||
~BufferManager();
|
||||
private:
|
||||
std::vector<ewol::object::Owner<appl::Buffer>> m_list; // list of all buffer curently open
|
||||
std::vector<ewol::object::Shared<appl::Buffer>> m_list; // list of all buffer curently open
|
||||
public:
|
||||
/**
|
||||
* @brief Get a specific buffer with his name (can create a new buffer).
|
||||
|
@ -29,7 +29,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() :
|
||||
}
|
||||
// List all current open file :
|
||||
for (int64_t iii=m_bufferManager->size()-1; iii>=0; --iii) {
|
||||
appl::Buffer* tmpBuffer = m_bufferManager->get(iii);
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(iii);
|
||||
if (tmpBuffer == NULL) {
|
||||
continue;
|
||||
}
|
||||
@ -45,7 +45,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() :
|
||||
return;
|
||||
}
|
||||
// create the worker :
|
||||
m_worker = new appl::WorkerCloseFile(m_bufferNameList.front());
|
||||
m_worker = ewol::object::makeShared(new appl::WorkerCloseFile(m_bufferNameList.front()));
|
||||
// remove first element :
|
||||
m_bufferNameList.erase(m_bufferNameList.begin());
|
||||
if (m_bufferNameList.size() == 0) {
|
||||
@ -56,7 +56,7 @@ appl::WorkerCloseAllFile::WorkerCloseAllFile() :
|
||||
}
|
||||
|
||||
appl::WorkerCloseAllFile::~WorkerCloseAllFile() {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
|
||||
}
|
||||
|
||||
void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
@ -70,7 +70,7 @@ void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::object::Message& _ms
|
||||
return;
|
||||
}
|
||||
// create the worker :
|
||||
m_worker = new appl::WorkerCloseFile(m_bufferNameList.front());
|
||||
m_worker = ewol::object::makeShared(new appl::WorkerCloseFile(m_bufferNameList.front()));
|
||||
// remove first element :
|
||||
m_bufferNameList.erase(m_bufferNameList.begin());
|
||||
if (m_bufferNameList.size() == 0) {
|
||||
|
@ -19,8 +19,8 @@ namespace appl {
|
||||
virtual ~WorkerCloseAllFile();
|
||||
private:
|
||||
std::vector<std::string> m_bufferNameList;
|
||||
appl::WorkerCloseFile* m_worker; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
ewol::object::Shared<appl::WorkerCloseFile> m_worker; //! pop-up element that is open...
|
||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
|
@ -38,7 +38,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
}
|
||||
if (m_bufferName == "") {
|
||||
// need to find the curent file ...
|
||||
appl::Buffer* tmpp = m_bufferManager->getBufferSelected();
|
||||
ewol::object::Shared<appl::Buffer> tmpp = m_bufferManager->getBufferSelected();
|
||||
if (tmpp == NULL) {
|
||||
APPL_ERROR("No selected buffer now ...");
|
||||
autoDestroy();
|
||||
@ -63,14 +63,14 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
return;
|
||||
}
|
||||
|
||||
ewol::widget::StdPopUp* tmpPopUp = new ewol::widget::StdPopUp();
|
||||
ewol::object::Shared<ewol::widget::StdPopUp> tmpPopUp = ewol::object::makeShared(new ewol::widget::StdPopUp());
|
||||
if (tmpPopUp == NULL) {
|
||||
APPL_ERROR("Can not create a simple pop-up");
|
||||
return;
|
||||
}
|
||||
tmpPopUp->setTitle("<bold>Close un-saved file:</bold>");
|
||||
tmpPopUp->setComment("The file named : <i>\"" + m_buffer->getFileName() + "\"</i> is curently modify. <br/>If you don't saves these modifications,<br/>they will be definitly lost...");
|
||||
ewol::Widget* bt = NULL;
|
||||
ewol::object::Shared<ewol::Widget> bt = NULL;
|
||||
if (m_buffer->hasFileName() == true) {
|
||||
bt = tmpPopUp->addButton("Save", true);
|
||||
if (bt != NULL) {
|
||||
@ -87,7 +87,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
}
|
||||
tmpPopUp->addButton("Cancel", true);
|
||||
tmpPopUp->setRemoveOnExternClick(true);
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
APPL_ERROR("Error to get the windows.");
|
||||
autoDestroy();
|
||||
@ -97,7 +97,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
}
|
||||
|
||||
appl::WorkerCloseFile::~WorkerCloseFile() {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
|
||||
}
|
||||
|
||||
void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
@ -107,7 +107,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg)
|
||||
}
|
||||
APPL_DEBUG("have message : " << _msg);
|
||||
if (_msg.getMessage() == s_saveAsValidate) {
|
||||
m_worker = new appl::WorkerSaveFile(m_bufferName);
|
||||
m_worker = ewol::object::makeShared(new appl::WorkerSaveFile(m_bufferName));
|
||||
if (m_worker != NULL) {
|
||||
m_worker->registerOnEvent(this, appl::WorkerSaveFile::eventSaveDone, s_saveAsDone);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg)
|
||||
return;
|
||||
}
|
||||
if (m_buffer->storeFile() == false) {
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -23,9 +23,9 @@ namespace appl {
|
||||
virtual ~WorkerCloseFile();
|
||||
private:
|
||||
std::string m_bufferName;
|
||||
appl::Buffer* m_buffer; //!< reference on the buffer (when rename, we have no more reference on the buffer
|
||||
appl::WorkerSaveFile* m_worker; //! sub-worker element...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
ewol::object::Shared<appl::Buffer> m_buffer; //!< reference on the buffer (when rename, we have no more reference on the buffer
|
||||
ewol::object::Shared<appl::WorkerSaveFile> m_worker; //! sub-worker element...
|
||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
|
@ -29,7 +29,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() :
|
||||
}
|
||||
// List all current open file :
|
||||
for (size_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
appl::Buffer* tmpBuffer = m_bufferManager->get(iii);
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(iii);
|
||||
if (tmpBuffer == NULL) {
|
||||
continue;
|
||||
}
|
||||
@ -48,7 +48,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() :
|
||||
return;
|
||||
}
|
||||
// create the worker :
|
||||
m_worker = new appl::WorkerSaveFile(m_bufferNameList.front());
|
||||
m_worker = ewol::object::makeShared(new appl::WorkerSaveFile(m_bufferNameList.front()));
|
||||
// remove first element :
|
||||
m_bufferNameList.erase(m_bufferNameList.begin());
|
||||
if (m_bufferNameList.size() == 0) {
|
||||
@ -59,7 +59,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() :
|
||||
}
|
||||
|
||||
appl::WorkerSaveAllFile::~WorkerSaveAllFile() {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
|
||||
}
|
||||
|
||||
void appl::WorkerSaveAllFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
|
@ -19,8 +19,8 @@ namespace appl {
|
||||
virtual ~WorkerSaveAllFile();
|
||||
private:
|
||||
std::vector<std::string> m_bufferNameList;
|
||||
appl::WorkerSaveFile* m_worker; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
ewol::object::Shared<appl::WorkerSaveFile> m_worker; //! pop-up element that is open...
|
||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
|
@ -33,7 +33,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
}
|
||||
if (m_bufferName == "") {
|
||||
// need to find the curent file ...
|
||||
appl::Buffer* tmpp = m_bufferManager->getBufferSelected();
|
||||
ewol::object::Shared<appl::Buffer> tmpp = m_bufferManager->getBufferSelected();
|
||||
if (tmpp == NULL) {
|
||||
APPL_ERROR("No selected buffer now ...");
|
||||
autoDestroy();
|
||||
@ -46,7 +46,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
autoDestroy();
|
||||
return;
|
||||
}
|
||||
appl::Buffer* tmpBuffer = m_bufferManager->get(m_bufferName);
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(m_bufferName);
|
||||
if (tmpBuffer == NULL) {
|
||||
APPL_ERROR("Error to get the buffer : " << m_bufferName);
|
||||
autoDestroy();
|
||||
@ -60,7 +60,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_chooser = new ewol::widget::FileChooser();
|
||||
m_chooser = ewol::object::makeShared(new ewol::widget::FileChooser());
|
||||
if (NULL == m_chooser) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
autoDestroy();
|
||||
@ -71,7 +71,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
etk::FSNode tmpName(m_bufferName);
|
||||
m_chooser->setFolder(tmpName.getNameFolder());
|
||||
m_chooser->setFileName(tmpName.getNameFile());
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
APPL_ERROR("Error to get the windows.");
|
||||
autoDestroy();
|
||||
@ -82,7 +82,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
}
|
||||
|
||||
appl::WorkerSaveFile::~WorkerSaveFile() {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
|
||||
}
|
||||
|
||||
void appl::WorkerSaveFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
@ -99,14 +99,14 @@ void appl::WorkerSaveFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
APPL_ERROR("Try to save an non-existant file :" << m_bufferName);
|
||||
return;
|
||||
}
|
||||
appl::Buffer* tmpBuffer = m_bufferManager->get(m_bufferName);
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(m_bufferName);
|
||||
if (tmpBuffer == NULL) {
|
||||
APPL_ERROR("Error to get the buffer : " << m_bufferName);
|
||||
return;
|
||||
}
|
||||
tmpBuffer->setFileName(_msg.getData());
|
||||
if (tmpBuffer->storeFile() == false) {
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace appl {
|
||||
private:
|
||||
std::string m_bufferName;
|
||||
ewol::object::Shared<ewol::widget::FileChooser> m_chooser; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
|
@ -260,29 +260,20 @@ void appl::Highlight::parse2(int64_t _start,
|
||||
}
|
||||
}
|
||||
|
||||
appl::Highlight* appl::Highlight::keep(const std::string& _filename) {
|
||||
ewol::object::Shared<appl::Highlight> appl::Highlight::keep(const std::string& _filename) {
|
||||
//EWOL_INFO("KEEP : appl::Highlight : file : \"" << _filename << "\"");
|
||||
appl::Highlight* object = static_cast<appl::Highlight*>(getManager().localKeep(_filename));
|
||||
ewol::object::Shared<appl::Highlight> object = ewol::dynamic_pointer_cast<appl::Highlight>(getManager().localKeep(_filename));
|
||||
if (NULL != object) {
|
||||
return object;
|
||||
}
|
||||
EWOL_INFO("CREATE : appl::Highlight : file : \"" << _filename << "\"");
|
||||
// this element create a new one every time ....
|
||||
object = new appl::Highlight(_filename, "THEME:COLOR:textViewer.json");
|
||||
object = ewol::object::makeShared(new appl::Highlight(_filename, "THEME:COLOR:textViewer.json"));
|
||||
if (NULL == object) {
|
||||
EWOL_ERROR("allocation error of a resource : ??Highlight??");
|
||||
return NULL;
|
||||
}
|
||||
getManager().localAdd(object);
|
||||
return object;
|
||||
|
||||
}
|
||||
|
||||
void appl::Highlight::release(appl::Highlight*& _object) {
|
||||
if (NULL == _object) {
|
||||
return;
|
||||
}
|
||||
ewol::Resource* object2 = static_cast<ewol::Resource*>(_object);
|
||||
getManager().release(object2);
|
||||
_object = NULL;
|
||||
}
|
||||
|
@ -34,10 +34,11 @@ namespace appl {
|
||||
namespace appl {
|
||||
class Highlight : public ewol::Resource {
|
||||
private:
|
||||
appl::GlyphPainting* m_paintingProperties;
|
||||
ewol::object::Shared<appl::GlyphPainting> m_paintingProperties;
|
||||
protected:
|
||||
// Constructeur
|
||||
Highlight(const std::string& _xmlFilename, const std::string& _colorFile);
|
||||
public:
|
||||
~Highlight();
|
||||
private:
|
||||
std::string m_typeName; //!< descriptive string type like "C/C++"
|
||||
@ -73,12 +74,7 @@ namespace appl {
|
||||
* @param[in] _filename Name of the configuration file.
|
||||
* @return pointer on the resource or NULL if an error occured.
|
||||
*/
|
||||
static appl::Highlight* keep(const std::string& _filename);
|
||||
/**
|
||||
* @brief release the keeped resources
|
||||
* @param[in,out] reference on the object pointer
|
||||
*/
|
||||
static void release(appl::Highlight*& _object);
|
||||
static ewol::object::Shared<appl::Highlight> keep(const std::string& _filename);
|
||||
public: // herited function :
|
||||
virtual void updateContext() {
|
||||
// no upfate to do ...
|
||||
|
@ -15,14 +15,14 @@
|
||||
#undef __class__
|
||||
#define __class__ "highlightManager"
|
||||
|
||||
static std::vector<appl::Highlight*>& s_list() {
|
||||
static std::vector<appl::Highlight*> list;
|
||||
static std::vector<ewol::object::Shared<appl::Highlight>>& s_list() {
|
||||
static std::vector<ewol::object::Shared<appl::Highlight>> list;
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
void appl::highlightManager::init() {
|
||||
std::vector<appl::Highlight*>& hlList = s_list();
|
||||
std::vector<ewol::object::Shared<appl::Highlight>>& hlList = s_list();
|
||||
if (hlList.size() != 0) {
|
||||
APPL_ERROR("HighlightManager == > already exist, just unlink the previous ...");
|
||||
hlList.clear();
|
||||
@ -40,7 +40,7 @@ void appl::highlightManager::init() {
|
||||
}
|
||||
std::string filename = list[iii]->getName() + "/highlight.xml";
|
||||
APPL_DEBUG("Load xml name : " << filename);
|
||||
appl::Highlight *myHightLine = appl::Highlight::keep(filename);
|
||||
ewol::object::Shared<appl::Highlight> myHightLine = appl::Highlight::keep(filename);
|
||||
if (myHightLine != NULL) {
|
||||
hlList.push_back(myHightLine);
|
||||
} else {
|
||||
@ -59,19 +59,12 @@ void appl::highlightManager::init() {
|
||||
}
|
||||
|
||||
void appl::highlightManager::unInit() {
|
||||
std::vector<Highlight*>& hlList = s_list();
|
||||
std::vector<ewol::object::Shared<Highlight>>& hlList = s_list();
|
||||
if (hlList.size() == 0) {
|
||||
APPL_DEBUG("HighlightManager ==> no highlight");
|
||||
hlList.clear();
|
||||
return;
|
||||
}
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
continue;
|
||||
}
|
||||
appl::Highlight::release(hlList[iii]);
|
||||
hlList[iii] = NULL;
|
||||
}
|
||||
hlList.clear();
|
||||
}
|
||||
|
||||
@ -80,7 +73,7 @@ std::string appl::highlightManager::getTypeExtention(const std::string& _extenti
|
||||
return "";
|
||||
}
|
||||
APPL_DEBUG("Try to find type for extention : '" << _extention << "' in " << s_list().size() << " types");
|
||||
std::vector<Highlight*>& hlList = s_list();
|
||||
std::vector<ewol::object::Shared<Highlight>>& hlList = s_list();
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
continue;
|
||||
@ -99,7 +92,7 @@ std::string appl::highlightManager::getFileWithTypeType(const std::string& _type
|
||||
if (_type.size() == 0) {
|
||||
return "";
|
||||
}
|
||||
std::vector<Highlight*>& hlList = s_list();
|
||||
std::vector<ewol::object::Shared<Highlight>>& hlList = s_list();
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
continue;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#undef __class__
|
||||
#define __class__ "HighlightPattern"
|
||||
|
||||
appl::HighlightPattern::HighlightPattern(appl::GlyphPainting*& _glyphPainting) :
|
||||
appl::HighlightPattern::HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting) :
|
||||
m_glyphPainting(_glyphPainting),
|
||||
m_paternName(""),
|
||||
m_regExpStart(NULL),
|
||||
|
@ -29,10 +29,10 @@ enum resultFind {
|
||||
namespace appl {
|
||||
class HighlightPattern {
|
||||
private:
|
||||
appl::GlyphPainting*& m_glyphPainting;
|
||||
ewol::object::Shared<appl::GlyphPainting> m_glyphPainting;
|
||||
public:
|
||||
// Constructeur
|
||||
HighlightPattern(appl::GlyphPainting*& _glyphPainting);
|
||||
HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting);
|
||||
~HighlightPattern();
|
||||
private:
|
||||
std::string m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
||||
|
@ -27,7 +27,7 @@ appl::TextPluginCtags::TextPluginCtags() :
|
||||
m_bufferManager = appl::BufferManager::keep();
|
||||
}
|
||||
appl::TextPluginCtags::~TextPluginCtags() {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
|
||||
}
|
||||
|
||||
const char* eventJumpDestination = "event-plugin-ctags-jump-destination";
|
||||
@ -78,7 +78,7 @@ void appl::TextPluginCtags::jumpTo(const std::string& _name) {
|
||||
|
||||
if (tagsFindNext (m_ctagFile, &entry) == TagSuccess) {
|
||||
APPL_INFO("Multiple file destination ...");
|
||||
appl::TagFileSelection* tmpWidget = new appl::TagFileSelection();
|
||||
ewol::object::Shared<appl::TagFileSelection> tmpWidget = ewol::object::makeShared(new appl::TagFileSelection());
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@ -174,7 +174,7 @@ bool appl::TextPluginCtags::onReceiveMessage(appl::TextViewer& _textDrawer,
|
||||
}
|
||||
if (_msg.getMessage() == eventOpenCtagsFile) {
|
||||
APPL_INFO("Request opening ctag file");
|
||||
ewol::widget::FileChooser* tmpWidget = new ewol::widget::FileChooser();
|
||||
ewol::object::Shared<ewol::widget::FileChooser> tmpWidget = ewol::object::makeShared(new ewol::widget::FileChooser());
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
return true;
|
||||
|
@ -33,7 +33,7 @@ namespace appl {
|
||||
void printTag(const tagEntry *_entry);
|
||||
void jumpTo(const std::string& _name);
|
||||
void jumpFile(const std::string& _filename, int64_t _lineId);
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||
public:
|
||||
TextPluginCtags();
|
||||
~TextPluginCtags();
|
||||
|
@ -32,7 +32,7 @@ namespace appl {
|
||||
m_specificData.clear();
|
||||
}
|
||||
private:
|
||||
std::vector<std::pair<appl::Buffer* ,TYPE* >> m_specificData;
|
||||
std::vector<std::pair<ewol::object::Shared<appl::Buffer> ,TYPE* >> m_specificData;
|
||||
protected:
|
||||
TYPE* getDataRef(appl::TextViewer& _textDrawer) {
|
||||
for (size_t iii = 0; iii < m_specificData.size() ; ++iii) {
|
||||
@ -115,7 +115,7 @@ namespace appl {
|
||||
return;
|
||||
};
|
||||
public:
|
||||
virtual void onObjectRemove(ewol::Object* _removeObject) {
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject) {
|
||||
// TODO : plop
|
||||
};
|
||||
};
|
||||
|
@ -176,7 +176,7 @@ bool appl::TextPluginHistory::onRemove(appl::TextViewer& _textDrawer,
|
||||
}
|
||||
|
||||
|
||||
void appl::TextPluginHistory::onObjectRemove(ewol::Object* _removeObject) {
|
||||
void appl::TextPluginHistory::onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject) {
|
||||
// TODO : Dependence with buffer removing ...
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ namespace appl {
|
||||
void clearRedo(appl::PluginHistoryData& _data);
|
||||
void clearUndo(appl::PluginHistoryData& _data);
|
||||
public:
|
||||
virtual void onObjectRemove(ewol::Object* _removeObject);
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -126,16 +126,8 @@ bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) {
|
||||
*/
|
||||
void APP_UnInit(ewol::Context& _context) {
|
||||
APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)");
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = _context.getWindows();
|
||||
|
||||
_context.setWindows(NULL);
|
||||
|
||||
if (NULL != tmpWindows) {
|
||||
delete(tmpWindows);
|
||||
tmpWindows = NULL;
|
||||
}
|
||||
appl::textPluginManager::unInit();
|
||||
|
||||
APPL_INFO("Stop Hightlight");
|
||||
appl::highlightManager::unInit();
|
||||
//Kill all singleton
|
||||
|
Loading…
x
Reference in New Issue
Block a user