X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=aft.c;h=0e3f83e85524b3fea16d64bb612f10a3e9189abd;hb=94fa6ad6ec3068227d322cb83186ff8780100107;hp=001026db4e956caa8b46256797d29cddced6ddf5;hpb=4a33aa7ad93857d0c6b5ea24983e12b1619b10c0;p=paraslash.git diff --git a/aft.c b/aft.c index 001026db..0e3f83e8 100644 --- a/aft.c +++ b/aft.c @@ -1869,6 +1869,8 @@ struct touch_action_data { struct com_touch_options *cto; /** Message buffer. */ struct para_buffer pb; + /** How many audio files matched the given pattern. */ + unsigned num_matches; }; static int touch_audio_file(__a_unused struct osl_table *table, @@ -1911,6 +1913,7 @@ static int touch_audio_file(__a_unused struct osl_table *table, if (tad->cto->last_played >= 0) new_afsi.last_played = tad->cto->last_played; } + tad->num_matches++; save_afsi(&new_afsi, &obj); /* in-place update */ aced.aft_row = row; aced.old_afsi = &old_afsi; @@ -1937,6 +1940,9 @@ static int com_touch_callback(const struct osl_object *query, ret = for_each_matching_row(&pmd); if (ret < 0) para_printf(&tad.pb, "%s\n", para_strerror(-ret)); + else + if (!tad.num_matches) + para_printf(&tad.pb, "no matches\n"); if (tad.pb.buf) { result->data = tad.pb.buf; result->size = tad.pb.size;