Changeset View
Changeset View
Standalone View
Standalone View
src/texteditor/plaintexteditor/plaintexteditor.cpp
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | #include "plaintexteditor.h" | 19 | #include "plaintexteditor.h" | ||
20 | #include "kpimtextedit_debug.h" | 20 | #include "kpimtextedit_debug.h" | ||
21 | 21 | | |||
22 | #include "texteditor/commonwidget/textmessageindicator.h" | 22 | #include "texteditor/commonwidget/textmessageindicator.h" | ||
23 | #include <KIO/KUriFilterSearchProviderActions> | 23 | #include <KIO/KUriFilterSearchProviderActions> | ||
24 | #include <KLocalizedString> | 24 | #include <KLocalizedString> | ||
25 | #include <KIconTheme> | | |||
26 | #include <KStandardGuiItem> | 25 | #include <KStandardGuiItem> | ||
27 | #include <KStandardAction> | 26 | #include <KStandardAction> | ||
28 | #include <KCursor> | 27 | #include <KCursor> | ||
29 | #include <QIcon> | 28 | #include <QIcon> | ||
30 | #include <KConfigGroup> | 29 | #include <KConfigGroup> | ||
31 | #include <KSharedConfig> | 30 | #include <KSharedConfig> | ||
32 | #include <KConfig> | 31 | #include <KConfig> | ||
33 | 32 | | |||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 124 | if (!isReadOnly()) { | |||
134 | } | 133 | } | ||
135 | if (separatorAction) { | 134 | if (separatorAction) { | ||
136 | if (!emptyDocument) { | 135 | if (!emptyDocument) { | ||
137 | QAction *clearAllAction = KStandardAction::clear(this, &PlainTextEditor::slotUndoableClear, popup); | 136 | QAction *clearAllAction = KStandardAction::clear(this, &PlainTextEditor::slotUndoableClear, popup); | ||
138 | popup->insertAction(separatorAction, clearAllAction); | 137 | popup->insertAction(separatorAction, clearAllAction); | ||
139 | } | 138 | } | ||
140 | } | 139 | } | ||
141 | } | 140 | } | ||
142 | KIconTheme::assignIconsToContextMenu(isReadOnly() ? KIconTheme::ReadOnlyText | | |||
143 | : KIconTheme::TextEditor, | | |||
144 | popup->actions()); | | |||
145 | if (d->supportFeatures & Search) { | 141 | if (d->supportFeatures & Search) { | ||
146 | popup->addSeparator(); | 142 | popup->addSeparator(); | ||
147 | if (!emptyDocument) { | 143 | if (!emptyDocument) { | ||
148 | popup->addAction(KStandardGuiItem::find().icon(), KStandardGuiItem::find().text(), this, &PlainTextEditor::findText, Qt::Key_F + Qt::CTRL); | 144 | popup->addAction(KStandardGuiItem::find().icon(), KStandardGuiItem::find().text(), this, &PlainTextEditor::findText, Qt::Key_F + Qt::CTRL); | ||
149 | popup->addSeparator(); | 145 | popup->addSeparator(); | ||
150 | } | 146 | } | ||
151 | if (!isReadOnly()) { | 147 | if (!isReadOnly()) { | ||
152 | if (!emptyDocument) { | 148 | if (!emptyDocument) { | ||
▲ Show 20 Lines • Show All 740 Lines • Show Last 20 Lines |