Changeset View
Changeset View
Standalone View
Standalone View
addons/konsole/kateconsole.cpp
Show First 20 Lines • Show All 384 Lines • ▼ Show 20 Line(s) | 384 | else // should focus the widget too! | |||
---|---|---|---|---|---|
385 | m_part->widget()->setFocus( Qt::OtherFocusReason ); | 385 | m_part->widget()->setFocus( Qt::OtherFocusReason ); | ||
386 | action->setText( i18n("Defocus Terminal") ); | 386 | action->setText( i18n("Defocus Terminal") ); | ||
387 | } | 387 | } | ||
388 | } | 388 | } | ||
389 | 389 | | |||
390 | void KateConsole::readConfig() | 390 | void KateConsole::readConfig() | ||
391 | { | 391 | { | ||
392 | disconnect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync); | 392 | disconnect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync); | ||
393 | if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("AutoSyncronize", false) ) { | 393 | if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("AutoSyncronize", true) ) { | ||
394 | connect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync); | 394 | connect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync); | ||
395 | } | 395 | } | ||
396 | 396 | | |||
397 | if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("SetEditor", false) ) | 397 | if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("SetEditor", false) ) | ||
398 | qputenv( "EDITOR", "kate -b"); | 398 | qputenv( "EDITOR", "kate -b"); | ||
399 | else | 399 | else | ||
400 | qputenv( "EDITOR", m_plugin->previousEditorEnv().data()); | 400 | qputenv( "EDITOR", m_plugin->previousEditorEnv().data()); | ||
401 | } | 401 | } | ||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 480 | { | |||
485 | config.writeEntry("SetEditor", cbSetEditor->isChecked()); | 485 | config.writeEntry("SetEditor", cbSetEditor->isChecked()); | ||
486 | config.sync(); | 486 | config.sync(); | ||
487 | mPlugin->readConfig(); | 487 | mPlugin->readConfig(); | ||
488 | } | 488 | } | ||
489 | 489 | | |||
490 | void KateKonsoleConfigPage::reset() | 490 | void KateKonsoleConfigPage::reset() | ||
491 | { | 491 | { | ||
492 | KConfigGroup config(KSharedConfig::openConfig(), "Konsole"); | 492 | KConfigGroup config(KSharedConfig::openConfig(), "Konsole"); | ||
493 | cbAutoSyncronize->setChecked(config.readEntry("AutoSyncronize", false)); | 493 | cbAutoSyncronize->setChecked(config.readEntry("AutoSyncronize", true)); | ||
494 | cbRemoveExtension->setChecked(config.readEntry("RemoveExtension", false)); | 494 | cbRemoveExtension->setChecked(config.readEntry("RemoveExtension", false)); | ||
495 | lePrefix->setText(config.readEntry("RunPrefix", "")); | 495 | lePrefix->setText(config.readEntry("RunPrefix", "")); | ||
496 | cbSetEditor->setChecked(config.readEntry("SetEditor", false)); | 496 | cbSetEditor->setChecked(config.readEntry("SetEditor", false)); | ||
497 | } | 497 | } | ||
498 | 498 | | |||
499 | #include "kateconsole.moc" | 499 | #include "kateconsole.moc" | ||
500 | 500 | | |||
501 | // kate: space-indent on; indent-width 2; replace-tabs on; | 501 | // kate: space-indent on; indent-width 2; replace-tabs on; | ||
502 | 502 | |