Re: GtkTreeView and mnemonics



* [ Havoc Pennington <hp redhat com>
* Thu, 21 Mar 2002 03:18:26 +0100 ]
You can set the column title widget (I forget the function, some
method on TreeViewColumn) to a label that doesn't parse mnemonics, or
you can escape the text you pass in by doubling underscores as you
say.

        Setting the column title with gtk_tree_view_column_set_title ()
        didn't work for me so I doubled the underscores:
---
static gchar *double_underscores (const gchar *str)
{
        gchar **arr;
        gchar *ret;

        arr = g_strsplit (str, "_", 0);
        ret = g_strjoinv ("__", arr);
        g_strfreev (arr);

        return ret;
}
---

        I love glib :-).

        Thanks!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]