GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 25fc4d97 authored by Benjamin Otte's avatar Benjamin Otte

textview: remove GtkTextAttributes (un)realize code

It was unused (apart from a few assertion that indeed it was unused).
parent 13087315
......@@ -398,7 +398,6 @@ modified directly.
@invisible:
@bg_full_height:
@editable:
@realized:
<!-- ##### FUNCTION gtk_text_tag_new ##### -->
<para>
......
......@@ -699,8 +699,6 @@ gtk_text_tag_finalize (GObject *object)
text_tag = GTK_TEXT_TAG (object);
g_assert (!text_tag->values->realized);
if (text_tag->table)
gtk_text_tag_table_remove (text_tag->table, text_tag);
......@@ -957,8 +955,6 @@ gtk_text_tag_set_property (GObject *object,
text_tag = GTK_TEXT_TAG (object);
g_return_if_fail (!text_tag->values->realized);
switch (prop_id)
{
case PROP_NAME:
......@@ -1914,8 +1910,6 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
{
guint orig_refcount;
g_return_if_fail (!dest->realized);
if (src == dest)
return;
......@@ -1941,7 +1935,6 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
dest->pg_bg_color = gdk_color_copy (src->pg_bg_color);
dest->refcount = orig_refcount;
dest->realized = FALSE;
}
/**
......@@ -1979,8 +1972,6 @@ gtk_text_attributes_unref (GtkTextAttributes *values)
if (values->refcount == 0)
{
g_assert (!values->realized);
if (values->tabs)
pango_tab_array_free (values->tabs);
......@@ -1994,61 +1985,6 @@ gtk_text_attributes_unref (GtkTextAttributes *values)
}
}
void
_gtk_text_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
{
g_return_if_fail (values != NULL);
g_return_if_fail (values->refcount > 0);
g_return_if_fail (!values->realized);
/* It is wrong to use this colormap, FIXME */
gdk_colormap_alloc_color (cmap,
&values->appearance.fg_color,
FALSE, TRUE);
gdk_colormap_alloc_color (cmap,
&values->appearance.bg_color,
FALSE, TRUE);
if (values->pg_bg_color)
gdk_colormap_alloc_color (cmap,
values->pg_bg_color,
FALSE, TRUE);
values->realized = TRUE;
}
void
_gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual)
{
g_return_if_fail (values != NULL);
g_return_if_fail (values->refcount > 0);
g_return_if_fail (values->realized);
gdk_colormap_free_colors (cmap,
&values->appearance.fg_color, 1);
gdk_colormap_free_colors (cmap,
&values->appearance.bg_color, 1);
values->appearance.fg_color.pixel = 0;
values->appearance.bg_color.pixel = 0;
if (values->pg_bg_color)
{
gdk_colormap_free_colors (cmap, values->pg_bg_color, 1);
values->pg_bg_color->pixel = 0;
}
values->realized = FALSE;
}
void
_gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
GtkTextTag** tags,
......@@ -2059,8 +1995,6 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
guint left_margin_accumulative = 0;
guint right_margin_accumulative = 0;
g_return_if_fail (!dest->realized);
while (n < n_tags)
{
GtkTextTag *tag = tags[n];
......
......@@ -259,9 +259,6 @@ struct _GtkTextAttributes
/* can edit this text */
guint editable : 1;
/* colors are allocated etc. */
guint realized : 1;
/*< private >*/
guint pad1 : 1;
guint pad2 : 1;
......
......@@ -41,16 +41,6 @@ void _gtk_text_attributes_fill_from_tags (GtkTextAttributes *values,
void _gtk_text_tag_array_sort (GtkTextTag **tag_array_p,
guint len);
/* ensure colors are allocated, etc. for drawing */
void _gtk_text_attributes_realize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
/* free the stuff again */
void _gtk_text_attributes_unrealize (GtkTextAttributes *values,
GdkColormap *cmap,
GdkVisual *visual);
gboolean _gtk_text_tag_affects_size (GtkTextTag *tag);
gboolean _gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment