Feature #289 ยป 0028-Qt-Replace-svgflags-commandline-parameter-with-a-cli.patch
client/gui-qt/gui_main.cpp | ||
---|---|---|
fc_fprintf(stderr,
|
||
_("Other gui-specific options are:\n"));
|
||
#ifdef FREECIV_SVG_FLAGS
|
||
fc_fprintf(stderr,
|
||
_("-f, --flags\tEnable svgflags features\n"));
|
||
#endif // FREECIV_SVG_FLAGS
|
||
fc_fprintf(stderr,
|
||
_("-s, --shortcutreset\tReset shortcut keys to "
|
||
"default values\n"));
|
||
... | ... | |
}
|
||
if (is_option("--shortcutreset", argv[i])) {
|
||
shortcutreset();
|
||
} else if (is_option("--flags", argv[i])) {
|
||
#ifdef FREECI_SVG_FLAGS
|
||
svg_flag_enable();
|
||
#else // FREECIV_SVG_FLAGS
|
||
fc_fprintf(stderr, _("svg flags not enabled in this freeciv build."));
|
||
#endif // FREECIV_SVG_FLAGS
|
||
}
|
||
// Can't check against unknown options, as those might be Qt options
|
||
... | ... | |
return tsret;
|
||
}
|
||
if (gui_options.gui_qt_svgflags) {
|
||
#ifdef FREECIV_SVG_FLAGS
|
||
svg_flag_enable();
|
||
#else // FREECIV_SVG_FLAGS
|
||
fc_fprintf(stderr, _("svg flags not enabled in this freeciv build."));
|
||
#endif // FREECIV_SVG_FLAGS
|
||
}
|
||
tileset_init(tileset);
|
||
tileset_load_tiles(tileset);
|
||
qpm = get_icon_sprite(tileset, ICON_FREECIV)->pm;
|
client/options.c | ||
---|---|---|
.gui_qt_wakeup_text = "Wake up %1",
|
||
.gui_qt_show_relations_panel = TRUE,
|
||
.gui_qt_show_techs_panel = TRUE,
|
||
.gui_qt_show_wonders_panel = TRUE
|
||
.gui_qt_show_wonders_panel = TRUE,
|
||
.gui_qt_svgflags = TRUE
|
||
};
|
||
/* Set to TRUE after the first call to options_init(), to avoid the usage
|
||
... | ... | |
N_("Wake up sequence"),
|
||
N_("String which will trigger sound in pregame page; "
|
||
"%1 stands for username."),
|
||
COC_INTERFACE, GUI_QT, "Wake up %1", NULL, 0)
|
||
COC_INTERFACE, GUI_QT, "Wake up %1", NULL, 0),
|
||
GEN_BOOL_OPTION(gui_qt_svgflags, N_("SVG flags features"),
|
||
#ifdef FREECIV_SVG_FLAGS
|
||
N_("Enable svgflags features, such as bigger flags "
|
||
"on the diplomacy dialog. Change to this comes "
|
||
"to an effect on next client start."),
|
||
#else /* FREECIV_SVG_FLAGS */
|
||
N_("Enable svgflags features, such as bigger flags "
|
||
"on the diplomacy dialog. This has no effect on "
|
||
"this freeciv build, as the svg support has not "
|
||
"been built in."),
|
||
#endif /* FREECIV_SVG_FLAGS */
|
||
COC_GRAPHICS, GUI_QT, TRUE, NULL)
|
||
};
|
||
static const int client_options_num = ARRAY_SIZE(client_options);
|
||
client/options.h | ||
---|---|---|
bool gui_qt_show_relations_panel;
|
||
bool gui_qt_show_techs_panel;
|
||
bool gui_qt_show_wonders_panel;
|
||
bool gui_qt_svgflags;
|
||
struct overview overview;
|
||
};
|