From: Andre Noll Date: Mon, 17 Apr 2017 19:13:59 +0000 (+0200) Subject: Update status items on blob events. X-Git-Tag: v0.6.1~18^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=a7a8d30e55563dd18fafecc9af710f6c37393016;p=paraslash.git Update status items on blob events. If the image or the lyrics blob for the current audio file changes, e.g. because the user executed the mvimg command, para_gui still reports the old value because blob events don't trigger a status item update. This patch teaches aft_event_handler() to honor such events. We keep it simple and update the items on every add/remove/rename event. --- diff --git a/aft.c b/aft.c index 4a812448..4ed703ec 100644 --- a/aft.c +++ b/aft.c @@ -2558,6 +2558,16 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb, return ret; make_status_items(); return 1; + } + case BLOB_RENAME: + case BLOB_REMOVE: + case BLOB_ADD: { + /* + * These events are rare. We don't bother to check whether the + * current status items are affected and simply recreate them + * every time. + */ + make_status_items(); } default: return 0; }