]> Pileus Git - ~andy/gtk/commitdiff
set_boxed will copy the color and will use a mem_chunk to do it. Avoid an
authorJody Goldberg <jody@gnome.org>
Wed, 16 Jan 2002 06:02:41 +0000 (06:02 +0000)
committerJody Goldberg <jody@src.gnome.org>
Wed, 16 Jan 2002 06:02:41 +0000 (06:02 +0000)
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.

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/gtktexttag.c

index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index b7863283626ef5071feccfde1bbc924fc25c6322..3ade382500e405484eef4977228a61ba5db9698f 100644 (file)
@@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset 
        initial_pos_set after the first configure request.
 
+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.
+
 Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
index 8899451c00f42dbd019c205e44b6df29581310ea..7000d88b553901975346aaa61ba4b17d81dd3de5 100644 (file)
@@ -1358,12 +1358,8 @@ gtk_text_tag_set_property (GObject      *object,
 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