Web lists-archives.com

Font selection panel as part of notebook

Hi, ALL,
I'm trying to implement a font selection as part of the notebook/wizard control.

1. In the GTK+2 I can write following:

    GtkWidget *names = gtk_font_selection_get_family_list(
(GtkFontSelection *) m_fontPanel );
    GtkWidget *sizes = gtk_font_selection_get_size_entry(
(GtkFontSelection *) m_fontPanel );
    g_signal_connect( names, "cursor-changed", G_CALLBACK(
font_name_change ), this );

And then in the handler I am enabling the "Apply" button.

However in GTK+3 there is no gtk_font_selection_get_family_list() call
according to the docs. Is it possible to implement something like this
for GTK+3?

2. In the handler I wrote the following code:

        GtkTreeIter iter;
        GValue value;
        GtkTreeSelection *sel = gtk_tree_view_get_selection( view );
        GtkTreeModel *model = gtk_tree_view_get_model( view );
        GList *selRows = gtk_tree_selection_get_selected_rows( sel, &model );
        gtk_tree_model_get_iter( model, &iter, (GtkTreePath *)
selRows[0].data );
        gtk_tree_model_get_value( model, &iter, 0, &value );

However it looks like the value is empty.

What am I missing?

Thank you.
gtk-list mailing list