| 10561 | } |
| 10562 | |
| 10563 | GMT_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 | |
| 10584 | void gmt_update_keys (struct GMT_CTRL *GMT, bool arg) { |
| 10585 | gmt_M_unused(GMT); |
no test coverage detected