[DEBUG] correct the bug of close file and open again ar seg-fault when write
This commit is contained in:
@@ -70,24 +70,24 @@ void appl::WorkerCloseFile::startAction(const std::string& _bufferName) {
|
||||
destroy();
|
||||
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...");
|
||||
tmpPopUp->setTitle("<bold>_T{Close un-saved file:}</bold>");
|
||||
tmpPopUp->setComment("_T{The file named:} <i>'" + m_buffer->getFileName() + "'</i> _T{is curently modify.}<br/>_T{If you don't saves these modifications,}<br/>_T{they will be definitly lost...}");
|
||||
std::shared_ptr<ewol::widget::Button> bt = nullptr;
|
||||
if (m_buffer->hasFileName() == true) {
|
||||
bt = tmpPopUp->addButton("Save", true);
|
||||
bt = tmpPopUp->addButton("_T{Save}", true);
|
||||
if (bt != nullptr) {
|
||||
bt->signalPressed.connect(shared_from_this(), &appl::WorkerCloseFile::onCallbackSaveValidate);
|
||||
}
|
||||
}
|
||||
bt = tmpPopUp->addButton("Save As", true);
|
||||
bt = tmpPopUp->addButton("_T{Save As}", true);
|
||||
if (bt != nullptr) {
|
||||
bt->signalPressed.connect(shared_from_this(), &appl::WorkerCloseFile::onCallbackSaveAsValidate);
|
||||
}
|
||||
bt = tmpPopUp->addButton("Close", true);
|
||||
bt = tmpPopUp->addButton("_T{Close}", true);
|
||||
if (bt != nullptr) {
|
||||
bt->signalPressed.connect(shared_from_this(), &appl::WorkerCloseFile::onCallbackClose);
|
||||
}
|
||||
bt = tmpPopUp->addButton("Cancel", true);
|
||||
bt = tmpPopUp->addButton("_T{Cancel}", true);
|
||||
if (bt != nullptr) {
|
||||
bt->signalPressed.connect(shared_from_this(), &appl::WorkerCloseFile::onCallbackCancel);
|
||||
}
|
||||
|
@@ -66,8 +66,8 @@ void appl::WorkerSaveFile::init() {
|
||||
destroy();
|
||||
return;
|
||||
}
|
||||
m_chooser->propertyLabelTitle.set("Save files As...");
|
||||
m_chooser->propertyLabelValidate.set("Save");
|
||||
m_chooser->propertyLabelTitle.set("_T{Save files As...}");
|
||||
m_chooser->propertyLabelValidate.set("_T{Save}");
|
||||
etk::FSNode tmpName(*propertyBufferName);
|
||||
m_chooser->propertyPath.set(tmpName.getNameFolder());
|
||||
m_chooser->propertyFile.set(tmpName.getNameFile());
|
||||
|
Reference in New Issue
Block a user