Skip to content

Commit

Permalink
gui2/tgame_paths, taddon_description: Hide browse buttons if unsupported
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
irydacea committed Feb 12, 2014
1 parent ba49a6d commit 36682ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/dialogs/addon/description.cpp
Expand Up @@ -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
6 changes: 6 additions & 0 deletions src/gui/dialogs/game_paths.cpp
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 36682ce

Please sign in to comment.