[gtk+] textview: Call map/unmap functions on pixel cache
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] textview: Call map/unmap functions on pixel cache
- Date: Wed, 9 Apr 2014 23:55:47 +0000 (UTC)
commit 6e1fc27528b30d5dedc081e641d12f097ac2ab5c
Author: Benjamin Otte <otte redhat com>
Date: Thu Apr 10 00:15:05 2014 +0200
textview: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
gtk/gtktextview.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 7b9efb7..3194357 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -326,6 +326,8 @@ static void gtk_text_view_get_preferred_height (GtkWidget *widget,
gint *natural);
static void gtk_text_view_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static void gtk_text_view_map (GtkWidget *widget);
+static void gtk_text_view_unmap (GtkWidget *widget);
static void gtk_text_view_realize (GtkWidget *widget);
static void gtk_text_view_unrealize (GtkWidget *widget);
static void gtk_text_view_style_updated (GtkWidget *widget);
@@ -649,6 +651,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
gobject_class->finalize = gtk_text_view_finalize;
widget_class->destroy = gtk_text_view_destroy;
+ widget_class->map = gtk_text_view_map;
+ widget_class->unmap = gtk_text_view_unmap;
widget_class->realize = gtk_text_view_realize;
widget_class->unrealize = gtk_text_view_unrealize;
widget_class->style_updated = gtk_text_view_style_updated;
@@ -4323,6 +4327,34 @@ gtk_text_view_unrealize (GtkWidget *widget)
}
static void
+gtk_text_view_map (GtkWidget *widget)
+{
+ GtkTextView *text_view;
+ GtkTextViewPrivate *priv;
+
+ text_view = GTK_TEXT_VIEW (widget);
+ priv = text_view->priv;
+
+ _gtk_pixel_cache_map (priv->pixel_cache);
+
+ GTK_WIDGET_CLASS (gtk_text_view_parent_class)->map (widget);
+}
+
+static void
+gtk_text_view_unmap (GtkWidget *widget)
+{
+ GtkTextView *text_view;
+ GtkTextViewPrivate *priv;
+
+ text_view = GTK_TEXT_VIEW (widget);
+ priv = text_view->priv;
+
+ GTK_WIDGET_CLASS (gtk_text_view_parent_class)->unmap (widget);
+
+ _gtk_pixel_cache_unmap (priv->pixel_cache);
+}
+
+static void
gtk_text_view_set_background (GtkTextView *text_view)
{
GtkStyleContext *context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]