diff --git a/ChangeLog b/ChangeLog index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9c6c9719c5..b69e42d6d1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2002-02-24 Havoc Pennington + + * gtk/gtktextbuffer.c (parent_class): parent_class variable was + GtkObjectClass instead of GObjectClass + + * gtk/gtktextview.c (widget_to_buffer): fix this the way + buffer_to_widget was fixed, to avoid duplicating + the code that computes text_window->allocation.x/y + Sun Feb 24 21:18:20 2002 Owen Taylor * gtk/gtksocket.c (gtk_socket_end_embedding): Fix diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index a2814a749f..69deec9714 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -113,7 +113,7 @@ static void remove_all_clipboard_contents_buffers (GtkTextBuffer *buffer); static void remove_all_selection_clipboards (GtkTextBuffer *buffer); static void update_selection_clipboards (GtkTextBuffer *buffer); -static GtkObjectClass *parent_class = NULL; +static GObjectClass *parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; GType diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 9e9c164fce..1b5faf23b5 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -6844,34 +6844,17 @@ widget_to_buffer (GtkTextView *text_view, gint widget_y, gint *buffer_x, gint *buffer_y) -{ - gint focus_edge_width; - gboolean interior_focus; - gint focus_width; - gint border_width = GTK_CONTAINER (text_view)->border_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 (buffer_x) { - *buffer_x = widget_x - focus_edge_width - border_width + text_view->xoffset; - if (text_view->left_window) - *buffer_x -= text_view->left_window->allocation.width; + *buffer_x = widget_x + text_view->xoffset; + *buffer_x -= text_view->text_window->allocation.x; } if (buffer_y) { - *buffer_y = widget_y - focus_edge_width - border_width + text_view->yoffset; - if (text_view->top_window) - *buffer_y -= text_view->top_window->allocation.height; + *buffer_y = widget_y + text_view->yoffset; + *buffer_y -= text_view->text_window->allocation.y; } }