| 27 | static int n_failed = 0; |
| 28 | |
| 29 | static char * |
| 30 | item_complete_name (const char *filename) |
| 31 | { |
| 32 | if (filename == NULL) |
| 33 | return NULL; |
| 34 | |
| 35 | g_autofree char *name = g_filename_display_basename(filename); |
| 36 | |
| 37 | if (g_utf8_strlen(name, -1) > 64) |
| 38 | { |
| 39 | g_autofree char *shortname = g_utf8_substring(name, 0, 64); |
| 40 | return g_strdup_printf("%s…", shortname); |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | return g_steal_pointer(&name); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | static char * |
| 49 | queue_complete_message (void) |