MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtinit_update_theme

Function gmtinit_update_theme

src/gmt_init.c:10563–10582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10561}
10562
10563GMT_LOCAL int gmtinit_update_theme (struct GMT_CTRL *GMT) {
10564 int error = GMT_NOERROR;
10565 char theme_file[PATH_MAX] = {""};
10566
10567 if (!GMT->current.setting.update_theme) return GMT_NOERROR; /* Nothing to do */
10568 if (!strcmp (GMT->current.setting.theme, "off")) return GMT_NOERROR; /* Nothing to do */
10569
10570 /* Got a GMT_THEME setting, take delayed action now */
10571 GMT->current.setting.update_theme = false;
10572 if (!strcmp (GMT->current.setting.theme, "classic")) /* Just reload the classic defaults */
10573 gmtinit_conf_classic (GMT);
10574 else if (!strcmp (GMT->current.setting.theme, "modern"))
10575 gmtinit_conf_modern (GMT);
10576 else if (gmt_getsharepath (GMT, "themes", GMT->current.setting.theme, ".conf", theme_file, R_OK)) { /* Load given theme */
10577 error = gmtinit_loaddefaults (GMT, theme_file, true);
10578 }
10579 else
10580 GMT_Report (GMT->parent, GMT_MSG_WARNING, "Theme %s file not found - ignored\n", GMT->current.setting.theme);
10581 return (error);
10582}
10583
10584void gmt_update_keys (struct GMT_CTRL *GMT, bool arg) {
10585 gmt_M_unused(GMT);

Callers 3

gmtinit_loaddefaultsFunction · 0.85
gmt_setdefaultsFunction · 0.85
gmtlib_setparameterFunction · 0.85

Calls 5

gmtinit_conf_classicFunction · 0.85
gmtinit_conf_modernFunction · 0.85
gmt_getsharepathFunction · 0.85
gmtinit_loaddefaultsFunction · 0.85
GMT_ReportFunction · 0.85

Tested by

no test coverage detected