+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
+2001-10-24 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextview.c (gtk_text_view_update_adjustments): don't
+ create layout if we didn't have one
+ (gtk_text_view_set_buffer): invalidate so we get the idle handlers
+ as appropriate
+ (gtk_text_view_invalidate): new function to do invalidation,
+ containing old guts of invalidated_handler
+
Wed Oct 24 10:29:47 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_class_init): Improve
static gboolean gtk_text_view_flush_scroll (GtkTextView *text_view);
static void gtk_text_view_update_adjustments (GtkTextView *text_view);
+static void gtk_text_view_invalidate (GtkTextView *text_view);
static void gtk_text_view_update_im_spot_location (GtkTextView *text_view);
gtk_text_buffer_add_selection_clipboard (text_view->buffer,
gtk_clipboard_get (GDK_SELECTION_PRIMARY));
}
-
+
if (GTK_WIDGET_VISIBLE (text_view))
gtk_widget_queue_draw (GTK_WIDGET (text_view));
+
+ gtk_text_view_invalidate (text_view);
}
static GtkTextBuffer*
gint width = 0, height = 0;
DV(g_print(">Updating adjustments ("G_STRLOC")\n"));
-
- gtk_text_layout_get_size (text_view->layout, &width, &height);
+
+ if (text_view->layout)
+ gtk_text_layout_get_size (text_view->layout, &width, &height);
if (text_view->width != width || text_view->height != height)
{
}
static void
-invalidated_handler (GtkTextLayout *layout,
- gpointer data)
+gtk_text_view_invalidate (GtkTextView *text_view)
{
- GtkTextView *text_view;
-
- text_view = GTK_TEXT_VIEW (data);
-
text_view->onscreen_validated = FALSE;
DV(g_print(">Invalidate, onscreen_validated = FALSE ("G_STRLOC")\n"));
}
}
+static void
+invalidated_handler (GtkTextLayout *layout,
+ gpointer data)
+{
+ GtkTextView *text_view;
+
+ text_view = GTK_TEXT_VIEW (data);
+
+ gtk_text_view_invalidate (text_view);
+}
+
static void
changed_handler (GtkTextLayout *layout,
gint start_y,