[gtk+/font-selection-new] GtkFontSelection: Using default foreground color for the family+face string in the treeview
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-selection-new] GtkFontSelection: Using default foreground color for the family+face string in the treeview
- Date: Mon, 9 May 2011 16:22:17 +0000 (UTC)
commit 1388dc3c311b621dec53d5340046d0576d4dbbb0
Author: Alberto Ruiz <aruiz gnome org>
Date: Sun May 8 16:19:53 2011 +0100
GtkFontSelection: Using default foreground color for the family+face string in the treeview
gtk/gtkfontselection.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkfontselection.c b/gtk/gtkfontselection.c
index 90dd08b..2ef304e 100644
--- a/gtk/gtkfontselection.c
+++ b/gtk/gtkfontselection.c
@@ -137,7 +137,7 @@ struct _GtkFontSelectionPrivate
#define FONT_STYLE_LIST_WIDTH 170
#define FONT_SIZE_LIST_WIDTH 60
-#define ROW_FORMAT_STRING "<span weight=\"bold\" size=\"small\" foreground=\"%s\">%s</span>\n<span size=\"x-large\" font_desc=\"%s\">%s</span>"
+#define ROW_FORMAT_STRING "<span weight=\"bold\" size=\"small\">%s</span>\n<span size=\"x-large\" font_desc=\"%s\">%s</span>"
/* These are what we use as the standard font sizes, for the size list.
*/
@@ -750,9 +750,6 @@ static void
populate_list (GtkFontSelection *fontsel, GtkTreeView* treeview, GtkListStore* model)
{
GtkStyleContext *style_context;
- GdkRGBA g_color;
- PangoColor p_color;
- gchar *color_string;
PangoFontDescription *default_font;
GtkTreeIter match_row;
@@ -774,14 +771,6 @@ populate_list (GtkFontSelection *fontsel, GtkTreeView* treeview, GtkListStore* m
/* Get row header font color */
style_context = gtk_widget_get_style_context (GTK_WIDGET (treeview));
- gtk_style_context_get_color (style_context,
- GTK_STATE_FLAG_NORMAL | GTK_STATE_FLAG_INSENSITIVE,
- &g_color);
-
- p_color.red = (guint16)((gdouble)G_MAXUINT16 * g_color.red);
- p_color.green = (guint16)((gdouble)G_MAXUINT16 * g_color.green);
- p_color.blue = (guint16)((gdouble)G_MAXUINT16 * g_color.blue);
- color_string = pango_color_to_string (&p_color);
/* Get theme font */
default_font = (PangoFontDescription*) gtk_style_context_get_font (style_context,
@@ -810,7 +799,6 @@ populate_list (GtkFontSelection *fontsel, GtkTreeView* treeview, GtkListStore* m
face_name);
g_string_printf (tmp, ROW_FORMAT_STRING,
- color_string,
family_and_face->str,
font_desc,
fontsel->priv->preview_text);
@@ -846,7 +834,6 @@ populate_list (GtkFontSelection *fontsel, GtkTreeView* treeview, GtkListStore* m
g_string_free (family_and_face, TRUE);
g_string_free (tmp, TRUE);
- g_free (color_string);
g_free (families);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]