gui2/tgame_paths, taddon_description: Hide browse buttons if unsupported
Hide the URL/path browse buttons if we don't support the current target platform, they are wasting space otherwise since they only trigger a stderr error in that case.
This commit is contained in:
parent
ba49a6d8b8
commit
36682ce78a
2 changed files with 12 additions and 0 deletions
|
@ -393,6 +393,12 @@ void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
|||
url_copy_button.set_visible(tcontrol::tvisible::invisible);
|
||||
url_textbox.set_visible(tcontrol::tvisible::invisible);
|
||||
}
|
||||
|
||||
if(!desktop::open_object_is_supported()) {
|
||||
// No point in displaying the button on platforms that can't do
|
||||
// open_object().
|
||||
url_go_button.set_visible(tcontrol::tvisible::invisible);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace gui2
|
||||
|
|
|
@ -105,6 +105,12 @@ void tgame_paths::pre_show(CVideo& /*video*/, twindow& window)
|
|||
boost::bind(&tgame_paths::browse_directory_callback,
|
||||
this,
|
||||
path_path));
|
||||
|
||||
if(!desktop::open_object_is_supported()) {
|
||||
// No point in displaying these on platforms that can't do
|
||||
// open_object().
|
||||
browse_w.set_visible(tcontrol::tvisible::invisible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue