#include "qt_helpers.h"
-#include "support/gettext.h"
-#include "support/lstrings.h"
-#include "support/lyxtime.h"
-
#include "Author.h"
#include "Buffer.h"
#include "BufferParams.h"
#include "Cursor.h"
#include "FuncRequest.h"
#include "LyXRC.h"
-#include "Text.h"
#include <QDateTime>
#include <QTextBrowser>
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
- bc().addReadOnly(acceptPB);
- bc().addReadOnly(rejectPB);
}
Change const & c = bufferview()->getCurrentChange();
bool const changePresent = c.type != Change::UNCHANGED;
- rejectPB->setEnabled(changePresent);
- acceptPB->setEnabled(changePresent);
+ rejectPB->setEnabled(changePresent && !isBufferReadonly());
+ acceptPB->setEnabled(changePresent && !isBufferReadonly());
bool const inserted = c.type == Change::INSERTED;
QString text;
text += inserted ? qt_("Inserted by %1").arg(author)
: qt_("Deleted by %1").arg(author);
- QString const date = QDateTime::fromTime_t(c.changetime)
- .toString(Qt::DefaultLocaleLongDate);
+ QString const date =
+ QLocale().toString(QDateTime::fromTime_t(c.changetime),
+ QLocale::LongFormat);
if (!date.isEmpty()) {
if (!author.isEmpty())
text += qt_(" on[[date]] %1").arg(date);
}
-Dialog * createGuiChanges(GuiView & lv) { return new GuiChanges(lv); }
-
-
} // namespace frontend
} // namespace lyx