Font selection panel as part of notebook
- From: Igor Korot <ikorot01 gmail com>
- To: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Font selection panel as part of notebook
- Date: Sat, 23 Sep 2017 14:25:43 -0400
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]