From 4ab056ab15e5c6a54e549a795e844d0e67dd28b8 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 17 May 2025 08:20:56 -0400 Subject: [PATCH] database: Respect global "talk menu" setting in the database tree Should fix FS#13625 Change-Id: Ibc6210be45941b2074da1e5c11536bcd31b5ac8f --- apps/tree.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index 7e17682fe4..fc79328cbc 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -223,9 +223,9 @@ static int tree_voice_cb(int selected_item, void * data) /* See if name is an encoded ID, if it is, then speak it normally */ int lang_id = P2ID(name); /*debugf("%s Found name %s id %d\n", __func__, P2STR(name), lang_id);*/ - if (lang_id >= 0) - { - talk_id(lang_id, true); + if (lang_id >= 0) { + if (global_settings.talk_menu) + talk_id(lang_id, true); return 0; } @@ -237,12 +237,14 @@ static int tree_voice_cb(int selected_item, void * data) // each entry type ("artist", "album", etc) should be delineated // so we can split the clips into subdirs. #if 0 - if (talk_file(LANG_DIR"/database/", NULL, - P2STR(name), file_thumbnail_ext, NULL, true) > 0) - { + if (global_settings.talk_file_clip) { + if (talk_file(LANG_DIR"/database/", NULL, + P2STR(name), file_thumbnail_ext, NULL, true) > 0) + return 0; + + // XXX fall back to spelling it out? return 0; } - // XXX fall back to spelling it out? #endif } else