+#ifdef MODEST_TOOLKIT_HILDON2
+ if (retval && (priv->live_search)) {
+ const gchar *needle;
+ needle = hildon_live_search_get_text (HILDON_LIVE_SEARCH (priv->live_search));
+ if (needle && needle[0] != '\0') {
+ gchar *haystack;
+ gboolean is_local;
+
+ haystack = g_strdup (fname);
+ if (type != TNY_FOLDER_TYPE_ROOT) {
+ is_local = modest_tny_folder_is_local_folder (TNY_FOLDER (instance)) ||
+ modest_tny_folder_is_memory_card_folder (TNY_FOLDER (instance));
+ if (is_local) {
+ TnyFolderType type = TNY_FOLDER_TYPE_UNKNOWN;
+ type = modest_tny_folder_get_local_or_mmc_folder_type (TNY_FOLDER (instance));
+ if (type != TNY_FOLDER_TYPE_UNKNOWN) {
+ g_free (haystack);
+ haystack = g_strdup (modest_local_folder_info_get_type_display_name (type));
+ }
+ } else {
+ }
+ } else {
+ if (modest_tny_account_is_virtual_local_folders (TNY_ACCOUNT (instance))) {
+ g_free (haystack);
+ haystack = g_strdup (priv->local_account_name);
+ } else if (modest_tny_account_is_memory_card_account (TNY_ACCOUNT (instance))) {
+ g_free (haystack);
+ haystack = g_strdup (tny_account_get_name (TNY_ACCOUNT (instance)));
+ }
+ }
+
+ if (type == TNY_FOLDER_TYPE_INBOX &&
+ g_str_has_suffix (haystack, "Inbox")) {
+ g_free (haystack);
+ haystack = g_strdup (_("mcen_me_folder_inbox"));
+ }
+ format_compact_style (&haystack, instance, priv->mailbox, FALSE,
+ priv->style == MODEST_FOLDER_VIEW_STYLE_SHOW_ALL, NULL);
+ retval = modest_text_utils_live_search_find (haystack, needle);
+ g_free (haystack);
+ }
+ }
+#endif
+