Patch to GtkLayout, and another for GtkTexttag
- From: Jody Goldberg <jody gnome org>
- To: gtk-devel-list gnome org
- Subject: Patch to GtkLayout, and another for GtkTexttag
- Date: Tue, 15 Jan 2002 00:41:35 -0500
1) If you scroll a GtkLayout before it is realized the window is not
moved. When things are eventually realized the window position is
out of sync with its adjustments.
2) GtkTextTag was using g_new(GdkColor) to pass a colour into a
boxed value. g_value_set_boxed does not take responsibility for the
allocation, causing a leak. Thankfully it did not free it either,
because gdkColors have a memchunk allocator which gets very confused
if you gdk_color_free something from g_new (or vice versa).
? layout.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.2803
diff -u -w -r1.2803 ChangeLog
--- ChangeLog 2002/01/14 08:20:21 1.2803
+++ ChangeLog 2002/01/15 05:31:43
@@ -1,3 +1,9 @@
+2002-01-15 Jody Goldberg <jody gnome org>
+
+ * gtk/gtklayout.c (gtk_layout_realize) : It is possible that a
+ GtkLayout may have been scrolled _before_ it was realized. Process
+ the cumulative scrolls when we are realized.
+
Sun Jan 13 23:23:22 2002 Owen Taylor <otaylor redhat com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
@@ -30,6 +36,12 @@
and especially faster,
(gtk_tree_model_convert_iter_to_child_iter): use
gtk_tree_model_sort_elt_get_path
+
+2002-01-13 Jody Goldberg <jody gnome org>
+
+ * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color
+ and will use a mem_chunk to do it. Avoid an unnecessary copy, a
+ leak, and confusion.
Sat Jan 12 16:57:31 2002 Kristian Rietveld <kris gtk org>
Index: gtk/gtklayout.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklayout.c,v
retrieving revision 1.48
diff -u -w -r1.48 gtklayout.c
--- gtk/gtklayout.c 2002/01/10 00:32:22 1.48
+++ gtk/gtklayout.c 2002/01/15 05:31:44
@@ -835,6 +835,12 @@
gtk_widget_set_parent_window (child->widget, layout->bin_window);
}
+
+ gdk_window_move (layout->bin_window,
+ - layout->hadjustment->value,
+ - layout->vadjustment->value);
+
+ gdk_window_process_updates (layout->bin_window, TRUE);
}
static void
Index: gtk/gtktexttag.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktexttag.c,v
retrieving revision 1.54
diff -u -w -r1.54 gtktexttag.c
--- gtk/gtktexttag.c 2001/12/04 22:53:12 1.54
+++ gtk/gtktexttag.c 2002/01/15 05:31:45
@@ -1358,12 +1358,8 @@
static void
get_color_arg (GValue *value, GdkColor *orig)
{
- GdkColor *color;
-
- color = g_new (GdkColor, 1);
- *color = *orig;
g_value_init (value, GDK_TYPE_COLOR);
- g_value_set_boxed (value, color);
+ g_value_set_boxed (value, orig);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]