Commit 04f5c2a1 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

gdk/gdkcolor.c (gdk_colormap_new) Fix memory leak: colormap->colors was

1999-09-14  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.

* gdk/win32/gdk.c: Remove some unused stuff.

* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.

* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
parent ad8f893e
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
1999-09-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkcolor.c (gdk_colormap_new)
* gdk/win32/gdkcolor.c (gdk_colormap_new): Fix memory leak:
colormap->colors was allocated twice.
* gdk/win32/gdk.c: Remove some unused stuff.
* gdk/win32/gdkcolor.c (gdk_colormap_sync): Initialize all of the
colormap.
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_type)
* gtk/gtklabel.h (gtk_label_get_type)
* gtk/gtktipsquery.c (gtk_tips_query_get_type)
* gtk/gtktypeutils.h (gtk_type_name): : Use GtkType
in a couple of places, not guint.
Fri Sep 10 21:31:00 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/et.po: added Estonian language file
......
......@@ -77,7 +77,6 @@ gdk_colormap_new (GdkVisual *visual,
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal);
......
......@@ -46,8 +46,6 @@ static void gdkx_XConvertCase (KeySym symbol,
static void gdk_exit_func (void);
static RETSIGTYPE gdk_signal (int signum);
/* Private variable declarations
*/
......@@ -112,7 +110,6 @@ gboolean
gdk_init_check (int *argc,
char ***argv)
{
HRESULT hres;
gint i, j, k;
if (gdk_initialized)
......
......@@ -1349,7 +1349,6 @@ gdk_colormap_new (GdkVisual *visual,
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal);
......@@ -1487,6 +1486,14 @@ gdk_colormap_sync (GdkColormap *colormap,
colormap->colors[i].blue = (xpalette[i].peBlue * 65535) / 255;
}
for ( ; i < colormap->size; i++)
{
colormap->colors[i].pixel = i;
colormap->colors[i].red = 0;
colormap->colors[i].green = 0;
colormap->colors[i].blue = 0;
}
g_free (xpalette);
}
......
......@@ -1349,7 +1349,6 @@ gdk_colormap_new (GdkVisual *visual,
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal);
......@@ -1487,6 +1486,14 @@ gdk_colormap_sync (GdkColormap *colormap,
colormap->colors[i].blue = (xpalette[i].peBlue * 65535) / 255;
}
for ( ; i < colormap->size; i++)
{
colormap->colors[i].pixel = i;
colormap->colors[i].red = 0;
colormap->colors[i].green = 0;
colormap->colors[i].blue = 0;
}
g_free (xpalette);
}
......
......@@ -46,8 +46,6 @@ static void gdkx_XConvertCase (KeySym symbol,
static void gdk_exit_func (void);
static RETSIGTYPE gdk_signal (int signum);
/* Private variable declarations
*/
......@@ -112,7 +110,6 @@ gboolean
gdk_init_check (int *argc,
char ***argv)
{
HRESULT hres;
gint i, j, k;
if (gdk_initialized)
......
......@@ -77,7 +77,6 @@ gdk_colormap_new (GdkVisual *visual,
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_PSEUDO_COLOR:
private->info = g_new0 (GdkColorInfo, colormap->size);
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
(GCompareFunc) gdk_color_equal);
......
......@@ -3652,7 +3652,7 @@ gtk_font_selection_create_xlfd (gint size,
* GtkFontSelectionDialog
*****************************************************************************/
guint
GtkType
gtk_font_selection_dialog_get_type (void)
{
static guint font_selection_dialog_type = 0;
......
......@@ -69,7 +69,7 @@ struct _GtkLabelClass
};
guint gtk_label_get_type (void);
GtkType gtk_label_get_type (void);
GtkWidget* gtk_label_new (const char *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
......
......@@ -81,7 +81,7 @@ static guint tips_query_signals[SIGNAL_LAST] = { 0 };
/* --- functions --- */
guint
GtkType
gtk_tips_query_get_type (void)
{
static guint tips_query_type = 0;
......
......@@ -333,7 +333,7 @@ GtkType gtk_type_unique (GtkType parent_type,
const GtkTypeInfo *type_info);
void gtk_type_set_chunk_alloc (GtkType type,
guint n_chunks);
gchar* gtk_type_name (guint type);
gchar* gtk_type_name (GtkType type);
GtkType gtk_type_from_name (const gchar *name);
GtkType gtk_type_parent (GtkType type);
gpointer gtk_type_class (GtkType type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment