#include "GuiCompare.h"
+#include "GuiApplication.h"
+
#include "Buffer.h"
#include "BufferView.h"
#include "BufferList.h"
#include "buffer_funcs.h"
+#include "ColorCache.h"
#include "Compare.h"
#include "FuncRequest.h"
#include "GuiView.h"
return 0;
dest_buffer_->changed(true);
- dest_buffer_->markDirty();
+ if (blocking_mode)
+ //blocking mode is infinitive and we don't want diff autosave
+ //if user decides to kill ther running lyx instance
+ dest_buffer_->markClean();
+ else
+ dest_buffer_->markDirty();
+
// get the options from the dialog
CompareOptions options;
options.settings_from_new = newSettingsRB->isChecked();
+ options.author = authorCO->currentIndex();
// init the compare object and start it
return false;
}
- // Wait for the Compare function to process in a thread (2 minute timeout)
- compare_->wait(120000);
+ // Wait for the Compare function to process in a thread
+ compare_->wait();
finished(false);
+ //Hiding dialog does not work as intended through finished routine, because showView
+ //is triggered after initialiseParams returns true. So we return false, warning will
+ //show on the terminal though.
+ return false;
}
}
progressBar->setEnabled(false);
progressBar->setMaximum(1);
+ // If empty fill the author combobox with the current and the comparison
+ // author and their respective colors
+ if (authorCO->count() == 0) {
+ authorCO->clear();
+ QPixmap colorIcon(32, 32);
+ colorIcon.fill(guiApp->colorCache().get(
+ Color(Color_changedtext_workarea_author1)));
+ authorCO->addItem(colorIcon, qt_("Current Author"));
+ colorIcon.fill(guiApp->colorCache().get(
+ Color(Color_changedtext_workarea_comparison)));
+ authorCO->addItem(colorIcon, qt_("Document Comparison"));
+ }
+
return true;
}