char *displayname;
};
struct browser_entry browsers[] = {
- { "microb", "MicroB" }, /* First entry is the default! */
+ { "microb", "MicroB (stock browser)" }, /* First entry is the default! */
{ "tear", "Tear" },
{ "fennec", "Mobile Firefox (Fennec)" },
{ "opera", "Opera Mobile" },
}
static void save_config(void) {
- struct swb_config new_cfg = orig_cfg;
+ struct swb_config new_cfg;
+
+ swb_config_copy(&new_cfg, &orig_cfg);
if (get_continuous_mode() != orig_cfg.continuous_mode) {
new_cfg.continuous_mode = get_continuous_mode();
new_cfg.default_browser = get_default_browser();
new_cfg.flags |= SWB_CONFIG_DEFAULT_BROWSER_SET;
}
- if ((orig_cfg.other_browser_cmd &&
- strcmp(get_other_browser_cmd(), orig_cfg.other_browser_cmd)) ||
- (!orig_cfg.other_browser_cmd &&
- strlen(get_other_browser_cmd()) > 0)) {
+ if (strlen(get_other_browser_cmd()) == 0) {
+ new_cfg.other_browser_cmd = NULL;
+ new_cfg.flags &= ~SWB_CONFIG_OTHER_BROWSER_CMD_SET;
+ } else if (!(orig_cfg.other_browser_cmd &&
+ !strcmp(get_other_browser_cmd(),
+ orig_cfg.other_browser_cmd))) {
new_cfg.other_browser_cmd = get_other_browser_cmd();
new_cfg.flags |= SWB_CONFIG_OTHER_BROWSER_CMD_SET;
}