| 2749 | } |
| 2750 | |
| 2751 | void App::loadDiffFromStrings( const std::string& str, const std::string& otherStr ) { |
| 2752 | auto diffViewTitle = i18n( "diff_viewer", "Diff Viewer" ); |
| 2753 | auto* diffView = Tools::UIDiffView::New(); |
| 2754 | auto [tab, iv] = mSplitter->createWidget( diffView, i18n( "diff_viewer", "Diff Viewer" ) ); |
| 2755 | tab->setText( diffViewTitle ); |
| 2756 | auto icon = findIcon( "filetype-diff" ); |
| 2757 | tab->setIcon( icon ? icon : findIcon( "file" ) ); |
| 2758 | diffView->setHeadersVisible( true ); |
| 2759 | diffView->loadFromStrings( str, otherStr ); |
| 2760 | diffView->setSyntaxColorScheme( *getCurrentColorScheme() ); |
| 2761 | registerUnlockedCommands( *diffView ); |
| 2762 | } |
| 2763 | |
| 2764 | void App::openFileFromPath( const std::string& path ) { |
| 2765 | std::string ext = FileSystem::fileExtension( path ); |
nothing calls this directly
no test coverage detected