diff --git a/gtk-v2/src/main.c b/gtk-v2/src/main.c
index b6a57a6..3409f3c 100644
--- a/gtk-v2/src/main.c
+++ b/gtk-v2/src/main.c
@@ -499,11 +499,11 @@ int main(int argc, char *argv[]) {
// Initialize GTK and client library.
gtk_init(&argc, &argv);
+ parse_args(argc, argv);
client_init();
// Set defaults, load configuration, and parse arguments.
config_load();
- parse_args(argc, argv);
config_check();
char *layout = g_path_get_basename(window_xml_file);
Without this, 'crossfire-client-gtk2 -v 0' is ineffective in client_init() and config_load(). While trying to figure out why the client wasn't loading a modded .ui file, LOG(LOG_DEBUG, "config_load", ...) calls added to config.c did not work until I realized '-v 0' hadn't been registered yet.
This is a ticket primarily to allow others to comment before a change is made.
This suggestion is applicable both to the client master and the gtk3-3 branch.
Diff:
Are there any configuration options in the configuration file that would override the values set on the command line? If not, seems okay.
From my perspective, and along the lines of the principle of least surprise, a command-line argument should usually override a setting from a config file, though I guess there is a potential case to consider if a command-line argument specifies a config file to use. It would likely feel wrong to manually type a command-line with a switch only to have it be ignored.
Last edit: Kevin R. Bulgrien 2022-12-22
Fixed by https://sourceforge.net/p/crossfire/crossfire-client/ci/51c91bc2e59eeeb159e7b8964ea8aaf705c87efe/