gui/game_version: Fix Open Log File button being missing

In commit fc7c87b765 someone missed the
logic surrounding the Open Log File button's setup that should've been
made not Windows-specific anymore.

This commit enables the Open Log File button back whenever Wesnoth has
a log file open for the current session. It also removes a few more
leftovers of the old Windows-specific UI layout path.
This commit is contained in:
Iris Morelle 2023-05-24 04:18:52 -04:00
parent f7140b2e44
commit acd9429a23
No known key found for this signature in database
GPG key ID: BB9666228F278524
2 changed files with 7 additions and 26 deletions

View file

@ -151,13 +151,6 @@
[column] [column]
horizontal_alignment = right horizontal_alignment = right
vertical_alignment = top vertical_alignment = top
[grid]
id = "win32_paths"
[row]
[column]
border = all border = all
border_size = 5 border_size = 5
@ -169,12 +162,6 @@
[/column] [/column]
[/row] [/row]
[/grid]
[/column]
[/row]
#enddef #enddef
#define _GUI_VERINFO_TAB_PAGE_BUILD_INFO #define _GUI_VERINFO_TAB_PAGE_BUILD_INFO

View file

@ -142,15 +142,9 @@ void game_version::pre_show(window& window)
} }
} }
#ifndef _WIN32
for(const auto& wid : {"win32_paths"}) {
find_widget<widget>(&window, wid, false).set_visible(widget::visibility::invisible);
}
#else
button& stderr_button = find_widget<button>(&window, "open_stderr", false); button& stderr_button = find_widget<button>(&window, "open_stderr", false);
connect_signal_mouse_left_click(stderr_button, std::bind(&game_version::browse_directory_callback, this, log_path_)); connect_signal_mouse_left_click(stderr_button, std::bind(&game_version::browse_directory_callback, this, log_path_));
stderr_button.set_active(!log_path_.empty()); stderr_button.set_active(!log_path_.empty());
#endif
// //
// Build info tab. // Build info tab.