]> Pileus Git - ~andy/gtk/commitdiff
implement more cleanly by using text_window->allocation.x/y instead of
authorHavoc Pennington <hp@redhat.com>
Fri, 22 Feb 2002 16:12:13 +0000 (16:12 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Fri, 22 Feb 2002 16:12:13 +0000 (16:12 +0000)
2002-02-22  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
using text_window->allocation.x/y instead of recomputing it.
Fixes a bug caused by leaving out the border width here.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextview.c

index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index 97c065b699222f42b9a1c8fdef870f3d7aca0e4f..b5d3d430cb67458d331fc5b817b0ab93dadc0095 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-22  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (buffer_to_widget): implement more cleanly by
+       using text_window->allocation.x/y instead of recomputing it. 
+       Fixes a bug caused by leaving out the border width here.
+
 2002-02-22  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): call
index eb45173af74813a1d9b81a0ed1ce7e3bc5f871fc..6ef7ca1d55fb601bd2b1e32e2d2cce337b6f6111 100644 (file)
@@ -43,6 +43,7 @@
 #include "gtktextview.h"
 #include "gtkimmulticontext.h"
 #include "gdk/gdkkeysyms.h"
+#include "gtksizegroup.h"          /* FIXME http://bugzilla.gnome.org/show_bug.cgi?id=72258 */
 #include "gtktextutil.h"
 #include "gtkwindow.h"
 #include <string.h>
@@ -6710,33 +6711,17 @@ buffer_to_widget (GtkTextView      *text_view,
                   gint              buffer_y,
                   gint             *window_x,
                   gint             *window_y)
-{
-  gint focus_edge_width;
-  gboolean interior_focus;
-  gint focus_width;
-  
-  gtk_widget_style_get (GTK_WIDGET (text_view),
-                       "interior_focus", &interior_focus,
-                       "focus_line_width", &focus_width,
-                       NULL);
-
-  if (interior_focus)
-    focus_edge_width = 0;
-  else
-    focus_edge_width = focus_width;
-  
+{  
   if (window_x)
     {
-      *window_x = buffer_x - text_view->xoffset + focus_edge_width;
-      if (text_view->left_window)
-        *window_x += text_view->left_window->allocation.width;
+      *window_x = buffer_x - text_view->xoffset;
+      *window_x += text_view->text_window->allocation.x;
     }
 
   if (window_y)
     {
-      *window_y = buffer_y - text_view->yoffset + focus_edge_width;
-      if (text_view->top_window)
-        *window_y += text_view->top_window->allocation.height;
+      *window_y = buffer_y - text_view->yoffset;
+      *window_y += text_view->text_window->allocation.y;
     }
 }