summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-05-04 15:00:07 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-05-04 15:00:07 +0000
commitbbf7b3a60fe7c7fce91625d2c40024b1dc1d3591 (patch)
treef79c9646669db61521c3ec928bfefd78f691ecf2
parent498b5eca13c65a3d8449de842a2af6813b6b4401 (diff)
downloadgdk-pixbuf-bbf7b3a60fe7c7fce91625d2c40024b1dc1d3591.tar.gz
Use width,height = 0, 0 to mean - here to edge of window, instead of -1,
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use width,height = 0, 0 to mean - here to edge of window, instead of -1, -1, since the former is all we support. Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main): Correctly free list nodes when removing from quit_functions list. Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak for pseudocolor where colormap->colors was double allocated. * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the color value in the hash table with the pixel filled in so when we do later hash table lookups, the color value is correct.
-rw-r--r--ChangeLog22
-rw-r--r--ChangeLog.pre-2-022
-rw-r--r--ChangeLog.pre-2-1022
-rw-r--r--ChangeLog.pre-2-222
-rw-r--r--ChangeLog.pre-2-422
-rw-r--r--ChangeLog.pre-2-622
-rw-r--r--ChangeLog.pre-2-822
-rw-r--r--gdk/gdkcolor.c4
-rw-r--r--gdk/x11/gdkcolor-x11.c4
-rw-r--r--gtk/gtkclist.c6
-rw-r--r--gtk/gtkmain.c3
11 files changed, 88 insertions, 83 deletions
diff --git a/ChangeLog b/ChangeLog
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 0232755b4..22b6a36b8 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -22,6 +22,17 @@ Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
+Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
+ for pseudocolor where colormap->colors was double
+ allocated.
+
+ * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
+ color value in the hash table with the pixel filled
+ in so when we do later hash table lookups, the color
+ value is correct.
+
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
@@ -81,17 +92,6 @@ Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
-Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
-
- * gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
- for pseudocolor where colormap->colors was double
- allocated.
-
- * gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
- color value in the hash table with the pixel filled
- in so when we do later hash table lookups, the color
- value is correct.
-
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c
index ecdd999e7..49fcef48d 100644
--- a/gdk/gdkcolor.c
+++ b/gdk/gdkcolor.c
@@ -70,7 +70,7 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size;
- colormap->colors = g_new (GdkColor, colormap->size);
+ colormap->colors = NULL;
switch (visual->type)
{
@@ -117,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll);
+ colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec;
for (i = 0; i < size; i++)
@@ -698,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else
{
colormap->colors[ret->pixel] = *color;
+ colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash,
diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c
index ecdd999e7..49fcef48d 100644
--- a/gdk/x11/gdkcolor-x11.c
+++ b/gdk/x11/gdkcolor-x11.c
@@ -70,7 +70,7 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size;
- colormap->colors = g_new (GdkColor, colormap->size);
+ colormap->colors = NULL;
switch (visual->type)
{
@@ -117,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll);
+ colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec;
for (i = 0; i < size; i++)
@@ -698,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else
{
colormap->colors[ret->pixel] = *color;
+ colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash,
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index fa72c3aca..cae4c2f3f 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -4755,7 +4755,7 @@ gtk_clist_draw (GtkWidget *widget,
(2 * widget->style->klass->ythickness) +
clist->column_title_area.height);
- gdk_window_clear_area (clist->clist_window, 0, 0, -1, -1);
+ gdk_window_clear_area (clist->clist_window, 0, 0, 0, 0);
draw_rows (clist, NULL);
for (i = 0; i < clist->columns; i++)
@@ -5948,8 +5948,8 @@ draw_rows (GtkCList *clist,
}
if (!area)
- gdk_window_clear_area (clist->clist_window,
- 0, ROW_TOP_YPIXEL (clist, i), -1, -1);
+ gdk_window_clear_area (clist->clist_window, 0,
+ ROW_TOP_YPIXEL (clist, i), 0, 0);
}
static void
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 08f1e4412..a1543cb16 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -486,7 +486,9 @@ gtk_main (void)
{
quitf = quit_functions->data;
+ tmp_list = quit_functions;
quit_functions = g_list_remove_link (quit_functions, quit_functions);
+ g_list_free_1 (tmp_list);
if ((quitf->main_level && quitf->main_level != gtk_main_loop_level) ||
gtk_quit_invoke_function (quitf))
@@ -495,7 +497,6 @@ gtk_main (void)
}
else
{
- g_list_free (tmp_list);
gtk_quit_destroy (quitf);
}
}