GtkFontChooser: Add callbacks and improve test to take deprecated widgets into account

This commit is contained in:
Alberto Ruiz
2011-04-29 12:14:30 +01:00
committed by Matthias Clasen
parent e80053c659
commit 4b92872a97
2 changed files with 42 additions and 14 deletions

View File

@ -900,7 +900,6 @@ gtk_font_selection_bootstrap_fontlist (GtkFontSelection* fontsel)
"markup", PREVIEW_TEXT_COLUMN,
NULL);
g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_append_column (treeview, col);
@ -926,7 +925,6 @@ gtk_font_selection_finalize (GObject *object)
}
#endif
G_OBJECT_CLASS (gtk_font_selection_parent_class)->finalize (object);
}
@ -1033,6 +1031,23 @@ update_face_model (GtkFontSelection *fontsel)
g_free (faces);
}
static void
size_list_cursor_changed_cb (GtkTreeView *treeview, gpointer data)
{
}
static void
family_list_cursor_changed_cb (GtkTreeView *treeview, gpointer data)
{
}
face_list_cursor_changed_cb (GtkTreeView *treeview, gpointer data)
{
}
static void
initialize_deprecated_widgets (GtkFontSelection *fontsel)
{
@ -1083,6 +1098,15 @@ initialize_deprecated_widgets (GtkFontSelection *fontsel)
gtk_container_add (GTK_CONTAINER (priv->face_list), face_list);
gtk_container_add (GTK_CONTAINER (priv->size_list), size_list);
g_signal_connect (G_OBJECT (font_list), "cursor-changed",
G_CALLBACK (family_list_cursor_changed_cb), fontsel);
g_signal_connect (G_OBJECT (face_list), "cursor-changed",
G_CALLBACK (face_list_cursor_changed_cb), fontsel);
g_signal_connect (G_OBJECT (size_list), "cursor-changed",
G_CALLBACK (size_list_cursor_changed_cb), fontsel);
populate_font_model (fontsel);
cursor_changed_cb (priv->family_face_list, priv);
}