Comments (12)
wesnoth/src/gui/dialogs/game_version_dialog.cpp
Lines 111 to 140 in 71c2f65
The paths are collated into a map and added to the dialogue one at a time, with accompanying open and copy buttons. I suppose one could check that the paths are valid and disable the open button in the cases where it is not.
from wesnoth.
It looks like this is not an issue in Windows because a default logs directory gets created if one doesn't already exist.
Edit: I'm not able to replicate this. If I remove the logs directory, it triggers the migration dialogue and part of that process seems to recreate the logs directory.
from wesnoth.
It is about using the command line option --no-log-to-file
from wesnoth.
Yes, I know. Even using --no-log-to-file
, the logs directory still gets recreated for me. BTW, you didn't specify which version - I was testing official 1.18.0 release and self-compiled 1.18 branch, though I presume master/1.19.0+dev would behave the same way.
from wesnoth.
Can anyone replicate the underlying bug for this request and specify the details, please?
from wesnoth.
I mean that it should not offer the button at all. The button is for opening the log file, and as it is specified on command line to not use a log file, there cannot be a correct path. It does not matter whether the logs directory exists. If it exists, then there is no file to open (and should not be).
I use a self-compiled 1.18.0, though with current 1.18 branch.
from wesnoth.
Again, I understand that - on my system when I specify the console to be used for logging via --no-log-to-file
the logs directory is always created. Therefore, I cannot replicate the scenario you had in the original report.
As for the idea that the option to open the normal logs directory should not be available if logging to file is disabled, I don't necessarily agree with that. Even though I normally disable logging to file on Linux, I still have some logs available there and I don't think it's harmful or even makes sense to disable the option to open an existing logs directory, even if it's empty.
from wesnoth.
I think there is a misunderstanding about what is meant. I think sevu means the log file button on the lower left of the dialog. Not the button to open the log dir.
from wesnoth.
I ran Wesnoth with --no-log-to-file
. The bottom-left icon just copies a report into a buffer and I can paste this text as normal. I do not think disabling logging should affect this in any way.
Since the logs directory gets recreated, I cannot replicate the error in the original report, no matter what button I try.
from wesnoth.
In your screenshot the button in question is the one saying "Fichier de journalisation". The one that explains it opens the current log file in the tool tip.
When I press that button in the flatpak build I get the error Failed to open '/home/wesnoth/.log': No such file or directory
.
from wesnoth.
Okay, I feel pretty silly now, seeing it stare at me in the face. I've never used that button before, I've always just gone straight to the logs directory myself.
Strangely, in both Windows and Linux (specifically, KDE/X11), when using --no-log-to-file
, I still can't replicate either of your errors. Instead, no action occurs when the log file button is clicked - error messages go to the log console rather than shown in a separate dialogue. Nonetheless, I agree that the button should be disabled with the no-log-file option - while no action is better than the error messages you're reporting, it's still a problem.
from wesnoth.
So the relevant code is here:
wesnoth/src/gui/dialogs/game_version_dialog.cpp
Lines 142 to 144 in b98181a
Looks like it should be checking for the existence of the file at log_path_
, not just that the string is non-empty.
from wesnoth.
Related Issues (20)
- widget.on_left_click triggers on keyboard press, but not on mouse clicks
- Should terrain be able to have vision different to movement? HOT 5
- Vision over water and chasms HOT 2
- Improve pohint for upload date in #wesnoth-lib (src/gui/dialogs/addon/manager.cpp) HOT 8
- Change Mudcrawlers' defense in the swamp to 60% HOT 12
- [GUI] Text not redrawing properly when scrolling with transparent background HOT 11
- Add hooks into the GUI2 theming system HOT 7
- Expose unit pick dialog to Lua as a simple API call HOT 6
- Wesnoth Map Editor refuses to edit .mask files HOT 2
- [show_objectives] bad documentation/unexpected behavior
- Update time-line with recent (April 2024) changes to lore dates HOT 2
- EI - 10. Dark Sanctuary - Owaec can go into the sanctuary HOT 3
- Assertion needs_download.size() failed when observing game
- In-game chat doesn't redraw over water when help is open HOT 2
- Should have a better error message when `[unit]type=` in ActionWML names an unknown type
- Close button scrunched in some help menus HOT 3
- hide_help=yes in [unit_type] hides help halfway HOT 2
- EI: In S14 Drowned Plains Replays, Hahid Dialogue Breaks Replays HOT 5
- Delay shroud updates breaks second_unit references for sighted events HOT 4
- Achievements Can Be Earned When Watching Replays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wesnoth.