]> Pileus Git - ~andy/gtk/commitdiff
make sure that the text_area_width is always >= 0. Fixes bug #316712 (Dan
authorMichael Natterer <mitch@imendio.com>
Wed, 8 Mar 2006 14:04:53 +0000 (14:04 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Wed, 8 Mar 2006 14:04:53 +0000 (14:04 +0000)
2006-03-08  Michael Natterer  <mitch@imendio.com>

* gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the
text_area_width is always >= 0. Fixes bug #316712 (Dan Winship).

ChangeLog
ChangeLog.pre-2-10
gtk/gtkentry.c

index 0c69b4e174e141e7ba904d8155bc69198f683c5d..ef7c5e731b77a43320e0500a934bc681560f7b09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-08  Michael Natterer  <mitch@imendio.com>
+
+       * gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the
+       text_area_width is always >= 0. Fixes bug #316712 (Dan Winship).
+
 2006-03-07  Federico Mena Quintero  <federico@novell.com>
 
        Cancel drags when the grabs get broken.  Fixes bug #333056:
index 0c69b4e174e141e7ba904d8155bc69198f683c5d..ef7c5e731b77a43320e0500a934bc681560f7b09 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-08  Michael Natterer  <mitch@imendio.com>
+
+       * gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the
+       text_area_width is always >= 0. Fixes bug #316712 (Dan Winship).
+
 2006-03-07  Federico Mena Quintero  <federico@novell.com>
 
        Cancel drags when the grabs get broken.  Fixes bug #333056:
index cbe9ef936997689e596549edb8032532638861b8..dfdb9e9a8d42a0610d49241459beb066e9c5d116 100644 (file)
@@ -3463,6 +3463,8 @@ gtk_entry_adjust_scroll (GtkEntry *entry)
   
   gdk_drawable_get_size (entry->text_area, &text_area_width, NULL);
   text_area_width -= 2 * INNER_BORDER;
+  if (text_area_width < 0)
+    text_area_width = 0;
 
   layout = gtk_entry_ensure_layout (entry, TRUE);
   line = pango_layout_get_lines (layout)->data;