GuiView::GuiView(int id)
: d(*new GuiViewPrivate(this)), id_(id), closing_(false), busy_(0),
- command_execute_(false), minibuffer_focus_(false), devel_mode_(false)
+ command_execute_(false), minibuffer_focus_(false), toolbarsMovable_(true),
+ devel_mode_(false)
{
connect(this, SIGNAL(bufferViewChanged()),
this, SLOT(onBufferViewChanged()));
#if EXPORT_in_THREAD
if (allow_async) {
GuiViewPrivate::busyBuffers.insert(used_buffer);
- Buffer * cloned_buffer = used_buffer->cloneFromMaster();
+ Buffer * cloned_buffer = used_buffer->cloneWithChildren();
if (!cloned_buffer) {
Alert::error(_("Export Error"),
- _("Error cloning the Buffer."));
+ _("Error cloning the Buffer."));
return false;
}
QFuture<Buffer::ExportStatus> f = QtConcurrent::run(
// We are asynchronous, so we don't know here anything about the success
return true;
} else {
-#endif
- // this will be run unconditionally in case EXPORT_in_THREAD
- // is not defined.
Buffer::ExportStatus status;
if (syncFunc) {
- status = (used_buffer->*syncFunc)(format, true);
+ status = (used_buffer->*syncFunc)(format, false);
} else if (previewFunc) {
status = (used_buffer->*previewFunc)(format);
} else
(void) asyncFunc;
return (status == Buffer::ExportSuccess
|| status == Buffer::PreviewSuccess);
-#if EXPORT_in_THREAD
- // the end of the else clause in that case.
}
+#else
+ Buffer::ExportStatus status;
+ if (syncFunc) {
+ status = (used_buffer->*syncFunc)(format, true);
+ } else if (previewFunc) {
+ status = (used_buffer->*previewFunc)(format);
+ } else
+ return false;
+ handleExportStatus(gv_, status, format);
+ (void) asyncFunc;
+ return (status == Buffer::ExportSuccess
+ || status == Buffer::PreviewSuccess);
#endif
}