Skip to content
Snippets Groups Projects
Commit 060f4318 authored by Sébastien Blin's avatar Sébastien Blin Committed by Hugo Lefeuvre
Browse files

conversationsview: homogenize temporary item between Gnome and MacOSX


When querying a name in the search bar, we should see:
"Searching..." or "Not found" and the registered name below. Or,
actually, the registered name is not shown for the temporary item.
So, fix patch update the renderer to reflect that.

Change-Id: Idc0061300024820af7fed9fe9eaa45748bf03d0a
Reviewed-by: default avatarHugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
parent 2722ab96
Branches
No related tags found
No related merge requests found
...@@ -158,22 +158,21 @@ render_name_and_last_interaction(G_GNUC_UNUSED GtkTreeViewColumn *tree_column, ...@@ -158,22 +158,21 @@ render_name_and_last_interaction(G_GNUC_UNUSED GtkTreeViewColumn *tree_column,
bestId bestId
); );
} else if (std::string(alias).empty()) { } else if (std::string(alias).empty()) {
// For conversations with contacts with no alias // If no alias to show, use the best id
text = g_markup_printf_escaped( text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>", "<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
bestId, bestId,
lastInteraction lastInteraction
); );
} else if (std::string(alias) == std::string(bestId) } else if (std::string(alias) == std::string(bestId)) {
|| std::string(bestId).empty() || std::string(uid).empty()) { // If the alias and the best id are identical, show only the alias
// For temporary item
text = g_markup_printf_escaped( text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>", "<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
alias, alias,
lastInteraction lastInteraction
); );
} else { } else {
// For conversations with contacts with alias // If the alias is not empty and not equals to the best id, show both the alias and the best id
text = g_markup_printf_escaped( text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>", "<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
alias, alias,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment