quell some warnings with g_hash_table_new
* gdk/gdkcolor.c: (gdk_colormap_new) (gdk_colormap_get_system): quell some warnings with g_hash_table_new * gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery when we're done with it * gtk/itemfactory.c: (gtk_item_factory_from_path): (gtk_item_factory_create_item): free some strings * gtk/gtklabel.c: (gtk_label_finalize): free label->pattern when done (gtk_label_parse_uline): null terminate pattern string, delete some duplicated code * gtk/testthreads.c: add #include <unistd.h> for sleep() -Yosh
This commit is contained in:
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -1,3 +1,23 @@
|
||||
Sat Aug 29 14:50:56 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkcolor.c:
|
||||
(gdk_colormap_new) (gdk_colormap_get_system):
|
||||
quell some warnings with g_hash_table_new
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_add): free the GtkSignalQuery
|
||||
when we're done with it
|
||||
|
||||
* gtk/itemfactory.c:
|
||||
(gtk_item_factory_from_path):
|
||||
(gtk_item_factory_create_item): free some strings
|
||||
|
||||
* gtk/gtklabel.c:
|
||||
(gtk_label_finalize): free label->pattern when done
|
||||
(gtk_label_parse_uline): null terminate pattern string, delete
|
||||
some duplicated code
|
||||
|
||||
* gtk/testthreads.c: add #include <unistd.h> for sleep()
|
||||
|
||||
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktext.c (recompute_geometry): Make sure the
|
||||
|
@ -71,8 +71,8 @@ gdk_colormap_new (GdkVisual *visual,
|
||||
private->info = g_new0 (GdkColorInfo, colormap->size);
|
||||
colormap->colors = g_new (GdkColor, colormap->size);
|
||||
|
||||
private->hash = g_hash_table_new (gdk_color_hash,
|
||||
gdk_color_equal);
|
||||
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
|
||||
(GCompareFunc) gdk_color_equal);
|
||||
|
||||
private->private_val = private_cmap;
|
||||
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
|
||||
@ -259,8 +259,8 @@ gdk_colormap_get_system (void)
|
||||
private->info = g_new0 (GdkColorInfo, colormap->size);
|
||||
colormap->colors = g_new (GdkColor, colormap->size);
|
||||
|
||||
private->hash = g_hash_table_new (gdk_color_hash,
|
||||
gdk_color_equal);
|
||||
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
|
||||
(GCompareFunc) gdk_color_equal);
|
||||
|
||||
gdk_colormap_sync (colormap, TRUE);
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ gdk_colormap_new (GdkVisual *visual,
|
||||
private->info = g_new0 (GdkColorInfo, colormap->size);
|
||||
colormap->colors = g_new (GdkColor, colormap->size);
|
||||
|
||||
private->hash = g_hash_table_new (gdk_color_hash,
|
||||
gdk_color_equal);
|
||||
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
|
||||
(GCompareFunc) gdk_color_equal);
|
||||
|
||||
private->private_val = private_cmap;
|
||||
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
|
||||
@ -259,8 +259,8 @@ gdk_colormap_get_system (void)
|
||||
private->info = g_new0 (GdkColorInfo, colormap->size);
|
||||
colormap->colors = g_new (GdkColor, colormap->size);
|
||||
|
||||
private->hash = g_hash_table_new (gdk_color_hash,
|
||||
gdk_color_equal);
|
||||
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
|
||||
(GCompareFunc) gdk_color_equal);
|
||||
|
||||
gdk_colormap_sync (colormap, TRUE);
|
||||
}
|
||||
|
@ -379,6 +379,8 @@ gtk_accel_group_add (GtkAccelGroup *accel_group,
|
||||
return;
|
||||
}
|
||||
|
||||
g_free (query);
|
||||
|
||||
/* prematurely abort if the group/entry is already locked
|
||||
*/
|
||||
if (accel_group->lock_count > 0)
|
||||
|
@ -628,6 +628,9 @@ gtk_item_factory_from_path (const gchar *path)
|
||||
fname[i + 1] = 0;
|
||||
|
||||
item = g_hash_table_lookup (class->item_ht, fname);
|
||||
|
||||
g_free (fname);
|
||||
|
||||
if (item && item->widgets)
|
||||
return gtk_item_factory_from_widget (item->widgets->data);
|
||||
|
||||
@ -1006,7 +1009,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
if (!gtk_item_factory_parse_path (entry->path,
|
||||
&path, &parent_path, &name))
|
||||
return;
|
||||
|
||||
|
||||
parent = gtk_item_factory_get_widget (ifactory, parent_path);
|
||||
if (!parent)
|
||||
{
|
||||
@ -1104,6 +1107,8 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
callback_type,
|
||||
item_type_path,
|
||||
widget);
|
||||
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -315,6 +315,7 @@ gtk_label_finalize (GtkObject *object)
|
||||
label = GTK_LABEL (object);
|
||||
|
||||
g_free (label->label);
|
||||
if (label->pattern) g_free (label->pattern);
|
||||
gtk_label_free_rows (label);
|
||||
|
||||
(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
|
||||
@ -590,7 +591,6 @@ gtk_label_parse_uline (GtkLabel *label,
|
||||
p = string;
|
||||
q = name;
|
||||
r = pattern;
|
||||
underscore = FALSE;
|
||||
|
||||
while (*p)
|
||||
{
|
||||
@ -621,7 +621,8 @@ gtk_label_parse_uline (GtkLabel *label,
|
||||
p++;
|
||||
}
|
||||
*q = 0;
|
||||
|
||||
*r = 0;
|
||||
|
||||
gtk_label_set (label, name);
|
||||
gtk_label_set_pattern (label, pattern);
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "../config.h"
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "../config.h"
|
||||
|
||||
|
Reference in New Issue
Block a user