aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@novell.com>2006-07-10 23:16:42 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2006-07-10 23:16:42 +0800
commitaccf65162528d78d873fa46aad82ee093d348d81 (patch)
tree3971724ec09964a498d65a0a461e3b2bdace644b /widgets/table
parent6f65a56e22a11a20b1aa0f4230f81b5bdfd4536f (diff)
downloadgsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar.gz
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar.bz2
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar.lz
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar.xz
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.tar.zst
gsoc2013-evolution-accf65162528d78d873fa46aad82ee093d348d81.zip
Revert the previous patch. Requires rework.
2006-07-10 Harish Krishnaswamy <kharish@novell.com> * table/e-cell-text.c: (ect_unrealize), (build_layout): * text/e-text.c: (reset_layout): Revert the previous patch. Requires rework. svn path=/trunk/; revision=32272
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-text.c60
1 files changed, 2 insertions, 58 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index a1b56a674c..7ea8a54c98 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -142,6 +142,7 @@ typedef struct {
int xofs, yofs; /* This gets added to the x
and y for the cell text. */
double ellipsis_width[2]; /* The width of the ellipsis. */
+
} ECellTextView;
struct _CellEdit {
@@ -438,7 +439,6 @@ ect_unrealize (ECellView *ecv)
if (parent_class->unrealize)
(* parent_class->unrealize) (ecv);
-
}
static void
@@ -504,53 +504,6 @@ build_attr_list (ECellTextView *text_view, int row, int text_length)
return attrs;
}
-static cairo_font_options_t *
-get_font_options ()
-{
- char *antialiasing, *hinting, *subpixel_order;
- cairo_font_options_t *font_options = cairo_font_options_create ();
-
- /* Antialiasing */
- antialiasing = gconf_client_get_string (gconf_client_get_default (),
- "/desktop/gnome/font_rendering/antialiasing", NULL);
- if (strcmp (antialiasing, "grayscale") == 0)
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY);
- else if (strcmp (antialiasing, "rgba") == 0)
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- else if (strcmp (antialiasing, "none") == 0)
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE);
- else
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
-
- hinting = gconf_client_get_string (gconf_client_get_default (),
- "/desktop/gnome/font_rendering/hinting", NULL);
- if (strcmp (hinting, "full") == 0)
- cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_FULL);
- else if (strcmp (hinting, "medium") == 0)
- cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_MEDIUM);
- else if (strcmp (hinting, "slight") == 0)
- cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_SLIGHT);
- else if (strcmp (hinting, "none") == 0)
- cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
- else
- cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_DEFAULT);
-
- subpixel_order = gconf_client_get_string (gconf_client_get_default (),
- "/desktop/gnome/font_rendering/rgba_order", NULL);
- if (strcmp (subpixel_order, "rgb") == 0)
- cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB);
- else if (strcmp (subpixel_order, "bgr") == 0)
- cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_BGR);
- else if (strcmp (subpixel_order, "vrgb") == 0)
- cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VRGB);
- else if (strcmp (subpixel_order, "vbgr") == 0)
- cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_VBGR);
- else
- cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
-
- return font_options;
-}
-
static PangoLayout *
layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint width)
{
@@ -617,8 +570,6 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
PangoAttrList *attrs ;
PangoLayout *layout;
- PangoContext *context;
- cairo_font_options_t *font_options;
layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas), text);
@@ -630,13 +581,6 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
if (text_view->edit || width <= 0)
return layout;
- context = pango_layout_get_context (layout);
-
- font_options = get_font_options();
- pango_cairo_context_set_font_options (context, font_options);
- cairo_font_options_destroy (font_options);
- pango_layout_context_changed (layout);
-
if (ect->font_name)
{
PangoFontDescription *desc = NULL, *fixed_desc = NULL;
@@ -688,7 +632,7 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
default:
break;
}
-
+
return layout;
}