gui: Do not decode the pressed key multiple times.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 5595071f2ade631b25db6872b13dcec978ba9141..f41bfadea25385c4ab1c9a169a15b0c755440c98 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2534,10 +2534,12 @@ static int aft_open(const char *dir)
                PARA_NOTICE_LOG("current audio file hash lookup: success\n");
                return 1;
        }
-       PARA_NOTICE_LOG("failed to open audio file table\n");
        audio_file_table = NULL;
-       if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT))
+       if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) {
+               PARA_WARNING_LOG("no audio file table\n");
                return 1;
+       }
+       PARA_NOTICE_LOG("failed to open audio file table\n");
        return ret;
 }
 
@@ -2620,6 +2622,10 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb,
                 * current status items are affected and simply recreate them
                 * every time.
                 */
+               ret = get_afhi_of_row(current_aft_row,
+                       &status_item_ls_data.afhi);
+               if (ret < 0)
+                       return ret;
                make_status_items();
                return 0;
        } default: