[gtk+/font-chooser: 13/84] GtkFontChooser: Add column and cell renderer
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-chooser: 13/84] GtkFontChooser: Add column and cell renderer
- Date: Fri, 20 May 2011 08:59:36 +0000 (UTC)
commit 5565c31bab1508ed755374e561dcc776c4cd1f6d
Author: Alberto Ruiz <aruiz gnome org>
Date: Sat Apr 16 01:26:26 2011 +0100
GtkFontChooser: Add column and cell renderer
gtk/gtkfontchooser.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c
index 15fe462..d0ccb0a 100644
--- a/gtk/gtkfontchooser.c
+++ b/gtk/gtkfontchooser.c
@@ -149,7 +149,7 @@ enum {
enum {
FAMILY_COLUMN,
FACE_COLUMN,
- FACE_TEXT_COLUMN
+ TEXT_COLUMN
};
static void gtk_font_selection_set_property (GObject *object,
@@ -366,19 +366,31 @@ gtk_font_selection_new (void)
static void
gtk_font_selection_populate_model (GtkTreeModel *model)
{
+
}
static void
gtk_font_selection_bootstrap_fontlist (GtkTreeView* treeview)
{
+ GtkTreeViewColumn *col;
GtkTreeModel *fonts_model;
-
+
fonts_model = gtk_list_store_new (3,
PANGO_TYPE_FONT_FAMILY,
PANGO_TYPE_FONT_FACE,
G_TYPE_STRING);
gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (fonts_model));
+
+ gtk_tree_view_set_headers_visible (treeview, FALSE);
+
+ col = gtk_tree_view_column_new_with_attributes ("Family",
+ gtk_cell_renderer_text_new (),
+ "markup", TEXT_COLUMN,
+ NULL);
+
+ gtk_tree_view_append_column (treeview, col);
+
gtk_font_selection_populate_model (GTK_TREE_MODEL (fonts_model));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]