Changeset View
Changeset View
Standalone View
Standalone View
addons/search/plugin_search.cpp
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Line(s) | 227 | { | |||
---|---|---|---|---|---|
246 | a = actionCollection()->addAction(QStringLiteral("search_in_files_new_tab")); | 246 | a = actionCollection()->addAction(QStringLiteral("search_in_files_new_tab")); | ||
247 | a->setText(i18n("Search in Files (in new tab)")); | 247 | a->setText(i18n("Search in Files (in new tab)")); | ||
248 | // first add tab, then open search view, since open search view switches to show the search options | 248 | // first add tab, then open search view, since open search view switches to show the search options | ||
249 | connect(a, &QAction::triggered, this, &KatePluginSearchView::addTab); | 249 | connect(a, &QAction::triggered, this, &KatePluginSearchView::addTab); | ||
250 | connect(a, &QAction::triggered, this, &KatePluginSearchView::openSearchView); | 250 | connect(a, &QAction::triggered, this, &KatePluginSearchView::openSearchView); | ||
251 | 251 | | |||
252 | a = actionCollection()->addAction(QStringLiteral("go_to_next_match")); | 252 | a = actionCollection()->addAction(QStringLiteral("go_to_next_match")); | ||
253 | a->setText(i18n("Go to Next Match")); | 253 | a->setText(i18n("Go to Next Match")); | ||
254 | actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::Key_F6)); | ||||
254 | connect(a, &QAction::triggered, this, &KatePluginSearchView::goToNextMatch); | 255 | connect(a, &QAction::triggered, this, &KatePluginSearchView::goToNextMatch); | ||
255 | 256 | | |||
256 | a = actionCollection()->addAction(QStringLiteral("go_to_prev_match")); | 257 | a = actionCollection()->addAction(QStringLiteral("go_to_prev_match")); | ||
257 | a->setText(i18n("Go to Previous Match")); | 258 | a->setText(i18n("Go to Previous Match")); | ||
259 | actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::SHIFT + Qt::Key_F6)); | ||||
258 | connect(a, &QAction::triggered, this, &KatePluginSearchView::goToPreviousMatch); | 260 | connect(a, &QAction::triggered, this, &KatePluginSearchView::goToPreviousMatch); | ||
259 | 261 | | |||
260 | m_ui.resultTabWidget->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab); | 262 | m_ui.resultTabWidget->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab); | ||
261 | KAcceleratorManager::setNoAccel(m_ui.resultTabWidget); | 263 | KAcceleratorManager::setNoAccel(m_ui.resultTabWidget); | ||
262 | 264 | | |||
263 | // Gnome does not seem to have all icons we want, so we use fall-back icons for those that are missing. | 265 | // Gnome does not seem to have all icons we want, so we use fall-back icons for those that are missing. | ||
264 | QIcon dispOptIcon = QIcon::fromTheme(QStringLiteral("games-config-options"), QIcon::fromTheme(QStringLiteral("preferences-system"))); | 266 | QIcon dispOptIcon = QIcon::fromTheme(QStringLiteral("games-config-options"), QIcon::fromTheme(QStringLiteral("preferences-system"))); | ||
265 | QIcon matchCaseIcon = QIcon::fromTheme(QStringLiteral("format-text-superscript"), QIcon::fromTheme(QStringLiteral("format-text-bold"))); | 267 | QIcon matchCaseIcon = QIcon::fromTheme(QStringLiteral("format-text-superscript"), QIcon::fromTheme(QStringLiteral("format-text-bold"))); | ||
▲ Show 20 Lines • Show All 1978 Lines • Show Last 20 Lines |