MCPcopy Create free account
hub / github.com/SpartanJ/eepp / downloadFileWebDialog

Method downloadFileWebDialog

src/tools/ecode/ecode.cpp:548–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void 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
571void App::resetPanelsPartitions() {
572 if ( mProjectSplitter ) {

Callers

nothing calls this directly

Calls 15

setHintMethod · 0.80
setMinWindowSizeMethod · 0.80
setLayoutWidthPolicyMethod · 0.80
getLayoutContMethod · 0.80
centerMethod · 0.80
showWhenReadyMethod · 0.80
toUtf8Method · 0.80
getCurWidgetMethod · 0.80
closeWindowMethod · 0.80
NewFunction · 0.50
setTitleMethod · 0.45
getTextInputMethod · 0.45

Tested by

no test coverage detected