]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiCompare.cpp
Hack to display section symbol
[lyx.git] / src / frontends / qt / GuiCompare.cpp
index 7f6b00f44a096a484da594c938624a4ea8a23468..e485ec0a548c6de028a6ae5ed6952dfcfd8a84b4 100644 (file)
 
 #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"
@@ -329,6 +332,7 @@ int GuiCompare::run(bool blocking_mode)
        // 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
 
@@ -385,6 +389,19 @@ bool GuiCompare::initialiseParams(std::string const &par)
        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;
 }