| 671 | } |
| 672 | |
| 673 | int32_t AskForComplexConfirmationList(const std::string& Text, const std::span<const std::string> Arguments) { |
| 674 | std::string TextArg = "--text=" + Text; |
| 675 | |
| 676 | std::vector<const char*> ExecveArgs = { |
| 677 | "zenity", |
| 678 | "--list", |
| 679 | TextArg.c_str(), |
| 680 | }; |
| 681 | |
| 682 | for (auto& Arg : Arguments) { |
| 683 | ExecveArgs.emplace_back(Arg.c_str()); |
| 684 | } |
| 685 | ExecveArgs.emplace_back(nullptr); |
| 686 | |
| 687 | auto Result = Exec::ExecAndWaitForResponseText(ExecveArgs[0], const_cast<char* const*>(ExecveArgs.data())); |
| 688 | if (Result.empty()) { |
| 689 | return -1; |
| 690 | } |
| 691 | return std::stoi(Result); |
| 692 | } |
| 693 | |
| 694 | int32_t AskForDistroSelection(DistroQuery::DistroInfo& Info, const std::span<const WebFileFetcher::FileTargets> Targets) { |
| 695 | // Search for an exact match |
no test coverage detected