void nemo_action_set_tt (NemoAction *action, NemoFile *file) { const gchar *orig_tt = nemo_action_get_orig_tt (action); if (!test_string_for_label_token (orig_tt) || file == NULL || action->selection_type != SELECTION_SINGLE) { gtk_action_set_tooltip (GTK_ACTION (action), orig_tt); return; } gchar *display_name = nemo_file_get_display_name (file); gchar **split = g_strsplit (orig_tt, TOKEN_LABEL_FILE_NAME, 2); gchar *new_tt = g_strconcat (split[0], display_name, split[1], NULL); gchar *escaped = eel_str_double_underscores (new_tt); gtk_action_set_tooltip (GTK_ACTION (action), escaped); g_strfreev (split); g_free (display_name); g_free (new_tt); g_free (escaped); }
static GString * score_append (NemoAction *action, GString *str, const gchar *c) { if (action->escape_underscores) { gchar *escaped = eel_str_double_underscores (c); str = g_string_append (str, escaped); g_free (escaped); return str; } else { return g_string_append (str, c); } }