Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/katedialogs.cpp
Show First 20 Lines • Show All 1266 Lines • ▼ Show 20 Line(s) | |||||
1267 | { | 1267 | { | ||
1268 | m_message = new KTextEditor::Message(reason, KTextEditor::Message::Information); | 1268 | m_message = new KTextEditor::Message(reason, KTextEditor::Message::Information); | ||
1269 | m_message->setPosition(KTextEditor::Message::AboveView); | 1269 | m_message->setPosition(KTextEditor::Message::AboveView); | ||
1270 | m_message->setWordWrap(true); | 1270 | m_message->setWordWrap(true); | ||
1271 | 1271 | | |||
1272 | // If the file isn't deleted, present a diff button | 1272 | // If the file isn't deleted, present a diff button | ||
1273 | const bool onDiskDeleted = modtype == KTextEditor::ModificationInterface::OnDiskDeleted; | 1273 | const bool onDiskDeleted = modtype == KTextEditor::ModificationInterface::OnDiskDeleted; | ||
1274 | if (!onDiskDeleted) { | 1274 | if (!onDiskDeleted) { | ||
1275 | QAction * aAutoReload = new QAction(i18n("Enable Auto Reload"), this); | ||||
1276 | aAutoReload->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh"))); | ||||
1277 | aAutoReload->setToolTip(i18n("Will never again warn about on disk changes but always reload.")); | ||||
1278 | m_message->addAction(aAutoReload, false); | ||||
1279 | connect(aAutoReload, &QAction::triggered, this, &KateModOnHdPrompt::autoReloadTriggered); | ||||
1280 | | ||||
1275 | if (!QStandardPaths::findExecutable(QStringLiteral("diff")).isEmpty()) { | 1281 | if (!QStandardPaths::findExecutable(QStringLiteral("diff")).isEmpty()) { | ||
1276 | m_diffAction = new QAction(i18n("View &Difference"), this); | 1282 | m_diffAction = new QAction(i18n("View &Difference"), this); | ||
1277 | m_diffAction->setToolTip(i18n("Shows a diff of the changes")); | 1283 | m_diffAction->setToolTip(i18n("Shows a diff of the changes")); | ||
1278 | m_message->addAction(m_diffAction, false); | 1284 | m_message->addAction(m_diffAction, false); | ||
1279 | connect(m_diffAction, SIGNAL(triggered()), this, SLOT(slotDiff())); | 1285 | connect(m_diffAction, SIGNAL(triggered()), this, SLOT(slotDiff())); | ||
1280 | } | 1286 | } | ||
1281 | 1287 | | |||
1282 | QAction * aReload = new QAction(i18n("&Reload"), this); | 1288 | QAction * aReload = new QAction(i18n("&Reload"), this); | ||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |