xapp-favorites.c: Unescape the file uri before using it for display.
The original display name was being unescaped. During deduplication,
the full uri wasn't being escaped before being added to the unique
display name.
Fixes #150
Michael Webster
2 years ago
469 | 469 | while (g_hash_table_iter_next (&iter, &key, &value)) |
470 | 470 | { |
471 | 471 | GList *same_names_list, *uri_ptr; |
472 | const gchar *common_display_name; | |
472 | gchar *common_display_name = NULL; | |
473 | 473 | |
474 | 474 | if (((GList *) value)->next == NULL) |
475 | 475 | { |
479 | 479 | } |
480 | 480 | // Now we know we have a list of uris that would have identical display names |
481 | 481 | // Add a part of the uri after each to distinguish them. |
482 | common_display_name = (const gchar *) key; | |
482 | common_display_name = g_uri_unescape_string ((const gchar *) key, NULL); | |
483 | 483 | same_names_list = (GList *) value; |
484 | 484 | |
485 | 485 | for (uri_ptr = same_names_list; uri_ptr != NULL; uri_ptr = uri_ptr->next) |
577 | 577 | info->display_name = g_string_free (new_display_string, FALSE); |
578 | 578 | } |
579 | 579 | |
580 | g_free (common_display_name); | |
580 | 581 | g_list_free_full (same_names_list, g_free); |
581 | 582 | } |
582 | 583 |