[gtk+] GtkFontChooser: Create functions to bootstrap the treeview column and settings and update the font l
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFontChooser: Create functions to bootstrap the treeview column and settings and update the font l
- Date: Mon, 15 Aug 2011 23:47:18 +0000 (UTC)
commit 6439fb4263349cd32f549cbfc9251c16a2cdd56d
Author: Alberto Ruiz <aruiz gnome org>
Date: Sat Apr 16 00:28:02 2011 +0100
GtkFontChooser: Create functions to bootstrap the treeview column and settings and update the font list
gtk/gtkfontchooser.c | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c
index 98c2755..15fe462 100644
--- a/gtk/gtkfontchooser.c
+++ b/gtk/gtkfontchooser.c
@@ -148,16 +148,8 @@ enum {
enum {
FAMILY_COLUMN,
- FAMILY_NAME_COLUMN
-};
-
-enum {
FACE_COLUMN,
- FACE_NAME_COLUMN
-};
-
-enum {
- SIZE_COLUMN
+ FACE_TEXT_COLUMN
};
static void gtk_font_selection_set_property (GObject *object,
@@ -177,6 +169,7 @@ static void gtk_font_selection_ref_family (GtkFontSelection *font
PangoFontFamily *family);
static void gtk_font_selection_ref_face (GtkFontSelection *fontsel,
PangoFontFace *face);
+static void gtk_font_selection_bootstrap_fontlist (GtkTreeView* treeview);
G_DEFINE_TYPE (GtkFontSelection, gtk_font_selection, GTK_TYPE_VBOX)
@@ -347,6 +340,8 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
gtk_widget_show_all (GTK_WIDGET (fontsel));
gtk_widget_hide (GTK_WIDGET (fontsel));
+ gtk_font_selection_bootstrap_fontlist (priv->family_face_list);
+
gtk_widget_pop_composite_child();
}
@@ -367,6 +362,27 @@ gtk_font_selection_new (void)
return GTK_WIDGET (fontsel);
}
+
+static void
+gtk_font_selection_populate_model (GtkTreeModel *model)
+{
+}
+
+static void
+gtk_font_selection_bootstrap_fontlist (GtkTreeView* treeview)
+{
+ 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_font_selection_populate_model (GTK_TREE_MODEL (fonts_model));
+}
+
+
static void
gtk_font_selection_finalize (GObject *object)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]