X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=blobdiff_plain;f=config-ui%2Fbrowser-switchboard-cp.c;h=b11fd2c9abe99a5172318485e31d5501dbfa4bf5;hp=6866c84cb0de80fe0601e9c7bd92fc667a171eb6;hb=667d7d137083b1d65c167ee4b29f88361802247c;hpb=ec8b58af1b1cf22f34478faf476047e7ce996245 diff --git a/config-ui/browser-switchboard-cp.c b/config-ui/browser-switchboard-cp.c index 6866c84..b11fd2c 100644 --- a/config-ui/browser-switchboard-cp.c +++ b/config-ui/browser-switchboard-cp.c @@ -64,10 +64,9 @@ struct browser_entry { 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" }, { "midori", "Midori" }, { "other", "Other" }, { NULL, NULL }, @@ -163,7 +162,9 @@ static void load_config(void) { } 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(); @@ -173,10 +174,12 @@ static void save_config(void) { 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; }