| 1672 | } |
| 1673 | |
| 1674 | void App::onWidgetFocusChange( UIWidget* widget ) { |
| 1675 | if ( mConfig.editor.showDocInfo && mDocInfo ) |
| 1676 | mDocInfo->setVisible( widget && widget->isType( UI_TYPE_CODEEDITOR ) ); |
| 1677 | |
| 1678 | mSettings->updateDocumentMenu(); |
| 1679 | if ( widget && !widget->isType( UI_TYPE_CODEEDITOR ) ) { |
| 1680 | if ( widget->isType( UI_TYPE_TERMINAL ) ) |
| 1681 | setAppTitle( widget->asType<UITerminal>()->getTitle() ); |
| 1682 | else { |
| 1683 | UITab* tab = nullptr; |
| 1684 | if ( ( tab = mSplitter->getTabFromWidget( widget ) ) ) { |
| 1685 | setAppTitle( tab->getText() ); |
| 1686 | } else { |
| 1687 | setAppTitle( "" ); |
| 1688 | } |
| 1689 | } |
| 1690 | } |
| 1691 | } |
| 1692 | |
| 1693 | void App::onCodeEditorFocusChange( UICodeEditor* editor ) { |
| 1694 | updateDocInfo( editor->getDocument() ); |
no test coverage detected