From 4f3f11fad9803d5a761327ea9e1cf4514b1b51d2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 29 May 2023 01:01:51 +0300 Subject: [PATCH 43/43] Qt: Add command line option -- --flags To enable svgflags See osdn #48103 Signed-off-by: Marko Lindqvist --- client/gui-qt/gui_main.cpp | 11 ++++------- doc/man/freeciv-client.6.in | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/client/gui-qt/gui_main.cpp b/client/gui-qt/gui_main.cpp index 1646641e15..4018f8881d 100644 --- a/client/gui-qt/gui_main.cpp +++ b/client/gui-qt/gui_main.cpp @@ -74,9 +74,6 @@ static void apply_notify_font(struct option *poption); static void apply_sidebar(struct option *poption); static void apply_titlebar(struct option *poption); -// Uncomment to enable svg flags -//#define FC_QT_SVGFLAG - /**********************************************************************//** Return fc_client instance **************************************************************************/ @@ -98,10 +95,6 @@ int main(int argc, char **argv) { setup_gui_funcs(); -#ifdef FC_QT_SVGFLAG - svg_flag_enable(); -#endif // FC_QT_SVGFLAG - return client_main(argc, argv, TRUE); } @@ -119,6 +112,8 @@ static void print_usage() fc_fprintf(stderr, _("Other gui-specific options are:\n")); + fc_fprintf(stderr, + _("-f, --flags\tEnable svgflags features\n")); fc_fprintf(stderr, _("-s, --shortcutreset\tReset shortcut keys to " "default values\n")); @@ -145,6 +140,8 @@ static bool parse_options(int argc, char **argv) } if (is_option("--shortcutreset", argv[i])) { shortcutreset(); + } else if (is_option("--flags", argv[i])) { + svg_flag_enable(); } // Can't check against unknown options, as those might be Qt options diff --git a/doc/man/freeciv-client.6.in b/doc/man/freeciv-client.6.in index 9c9098486f..ee1dfa9682 100644 --- a/doc/man/freeciv-client.6.in +++ b/doc/man/freeciv-client.6.in @@ -47,7 +47,8 @@ accepts the following parameters following \fB\-\-\fP: .B freeciv-qt accepts the standard Qt parameters following \fB\-\-\fP; see the Qt documentation. It also accepts -.B [ \-h|\-\-help ] +.B [ \-h|\-\-help ] \ +[ \-f|\-\-flags ] .B freeciv-sdl2 accepts the following parameters following \fB\-\-\fP: -- 2.39.2