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