mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"
"Inspect in Hack Studio" was a bit vague.
This commit is contained in:
parent
d3bd9f1f0c
commit
85eb0eaad0
3 changed files with 6 additions and 6 deletions
|
@ -83,8 +83,8 @@
|
|||
layout: @GUI::HorizontalBoxLayout
|
||||
|
||||
@GUI::Button {
|
||||
name: "inspect_button"
|
||||
text: "Inspect in Hack Studio"
|
||||
name: "debug_button"
|
||||
text: "Debug in Hack Studio"
|
||||
fixed_width: 150
|
||||
fixed_height: 22
|
||||
}
|
||||
|
|
|
@ -367,9 +367,9 @@ int main(int argc, char** argv)
|
|||
app->quit();
|
||||
};
|
||||
|
||||
auto& inspect_button = *widget.find_descendant_of_type_named<GUI::Button>("inspect_button");
|
||||
inspect_button.set_icon(MUST(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-hack-studio.png")));
|
||||
inspect_button.on_click = [&](int) {
|
||||
auto& debug_button = *widget.find_descendant_of_type_named<GUI::Button>("debug_button");
|
||||
debug_button.set_icon(MUST(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-hack-studio.png")));
|
||||
debug_button.on_click = [&](int) {
|
||||
pid_t child;
|
||||
const char* argv[4] = { "HackStudio", "-c", coredump_path, nullptr };
|
||||
if ((errno = posix_spawn(&child, "/bin/HackStudio", nullptr, nullptr, const_cast<char**>(argv), environ))) {
|
||||
|
|
|
@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool mode_coredump = false;
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_positional_argument(path_argument, "Path to a workspace or a file", "path", Core::ArgsParser::Required::No);
|
||||
args_parser.add_option(mode_coredump, "Inspect a coredump in HackStudio", "coredump", 'c');
|
||||
args_parser.add_option(mode_coredump, "Debug a coredump in HackStudio", "coredump", 'c');
|
||||
args_parser.parse(arguments);
|
||||
|
||||
auto argument_absolute_path = Core::File::real_path_for(path_argument);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue