1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

MIME: get_mime_handler_default: Reflow logic.

This commit is contained in:
Miciah Dashiel Butler Masters 2006-05-05 21:25:43 +00:00 committed by Miciah Dashiel Butler Masters
parent 06a541487e
commit 9337a7993d

View File

@ -191,22 +191,19 @@ get_mime_handler_option(unsigned char *type, int xwin)
static struct mime_handler *
get_mime_handler_default(unsigned char *type, int have_x)
{
unsigned char *desc = "";
struct option *opt = get_mime_type_option(type);
struct option *opt_tree = get_mime_handler_option(type, have_x);
if (opt_tree) {
unsigned char *desc = "";
struct option *opt = get_mime_type_option(type);
if (!opt_tree) return NULL;
/* Try to find some description to assing to @name */
if (opt) desc = opt->value.string;
/* Try to find some description to assing to @name */
if (opt) desc = opt->value.string;
return init_mime_handler(get_opt_str_tree(opt_tree, "program"),
desc, default_mime_module.name,
get_opt_bool_tree(opt_tree, "ask"),
get_opt_bool_tree(opt_tree, "block"));
}
return NULL;
return init_mime_handler(get_opt_str_tree(opt_tree, "program"),
desc, default_mime_module.name,
get_opt_bool_tree(opt_tree, "ask"),
get_opt_bool_tree(opt_tree, "block"));
}