| 546 | } |
| 547 | |
| 548 | void App::downloadFileWebDialog() { |
| 549 | UIMessageBox* msgBox = |
| 550 | UIMessageBox::New( UIMessageBox::INPUT, i18n( "please_enter_file_url_ellipsis", |
| 551 | "Please enter the file URL..." ) ); |
| 552 | |
| 553 | msgBox->setTitle( mWindowTitle ); |
| 554 | msgBox->getTextInput()->setHint( i18n( "any_https_or_http_url", "Any https or http URL" ) ); |
| 555 | msgBox->setCloseShortcut( { KEY_ESCAPE, KEYMOD_NONE } ); |
| 556 | msgBox->setMinWindowSize( Sizef( 300, 50 ) ); |
| 557 | msgBox->getLayoutCont()->setLayoutWidthPolicy( SizePolicy::MatchParent ); |
| 558 | msgBox->getLayoutCont()->getFirstWidget()->asType<UIWidget>()->setLayoutWidthPolicy( |
| 559 | SizePolicy::MatchParent ); |
| 560 | msgBox->center(); |
| 561 | msgBox->showWhenReady(); |
| 562 | msgBox->on( Event::OnConfirm, [this, msgBox]( const Event* ) { |
| 563 | std::string url( msgBox->getTextInput()->getText().toUtf8() ); |
| 564 | downloadFileWeb( url ); |
| 565 | if ( mSplitter->getCurWidget() ) |
| 566 | mSplitter->getCurWidget()->setFocus(); |
| 567 | msgBox->closeWindow(); |
| 568 | } ); |
| 569 | } |
| 570 | |
| 571 | void App::resetPanelsPartitions() { |
| 572 | if ( mProjectSplitter ) { |
nothing calls this directly
no test coverage detected