clean ups. -timj
clean ups. -timj
This commit is contained in:
@ -109,10 +109,11 @@ gtk_object_debug (void)
|
|||||||
GtkObject *obj;
|
GtkObject *obj;
|
||||||
|
|
||||||
obj = (GtkObject*) node->data;
|
obj = (GtkObject*) node->data;
|
||||||
printf ("%p: %s %d %s\n",
|
printf ("%p: %s ref_count=%d%s%s\n",
|
||||||
obj, gtk_type_name (GTK_OBJECT_TYPE (obj)),
|
obj, gtk_type_name (GTK_OBJECT_TYPE (obj)),
|
||||||
obj->ref_count,
|
obj->ref_count,
|
||||||
GTK_OBJECT_FLOATING (obj)? "floating" : "");
|
GTK_OBJECT_FLOATING (obj) ? " (floating)" : "",
|
||||||
|
GTK_OBJECT_DESTROYED (obj) ? " (destroyed)" : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf ("living objects count = %d\n", obj_count);
|
printf ("living objects count = %d\n", obj_count);
|
||||||
@ -456,7 +457,7 @@ gtk_object_destroy (GtkObject *object)
|
|||||||
*
|
*
|
||||||
* Weak refs are very similar to the old "destroy" signal. They allow
|
* Weak refs are very similar to the old "destroy" signal. They allow
|
||||||
* one to register a callback that is called when the weakly
|
* one to register a callback that is called when the weakly
|
||||||
* referenced object is destroyed.
|
* referenced object is finalized.
|
||||||
*
|
*
|
||||||
* They are not implemented as a signal because they really are
|
* They are not implemented as a signal because they really are
|
||||||
* special and need to be used with great care. Unlike signals, who
|
* special and need to be used with great care. Unlike signals, who
|
||||||
@ -704,6 +705,11 @@ gtk_object_query_args (GtkType class_type,
|
|||||||
if (!arg_info_ht)
|
if (!arg_info_ht)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* make sure the types class has been initialized, because
|
||||||
|
* the argument setup happens in the gtk_*_class_init() functions.
|
||||||
|
*/
|
||||||
|
gtk_type_class (class_type);
|
||||||
|
|
||||||
query_data.arg_list = NULL;
|
query_data.arg_list = NULL;
|
||||||
query_data.class_type = class_type;
|
query_data.class_type = class_type;
|
||||||
g_hash_table_foreach (arg_info_ht, gtk_query_arg_foreach, &query_data);
|
g_hash_table_foreach (arg_info_ht, gtk_query_arg_foreach, &query_data);
|
||||||
|
|||||||
@ -1124,6 +1124,10 @@ void
|
|||||||
gtk_widget_destroyed (GtkWidget *widget,
|
gtk_widget_destroyed (GtkWidget *widget,
|
||||||
GtkWidget **widget_pointer)
|
GtkWidget **widget_pointer)
|
||||||
{
|
{
|
||||||
|
/* Don't make any assumptions about the
|
||||||
|
* value of widget!
|
||||||
|
* Even check widget_pointer.
|
||||||
|
*/
|
||||||
if (widget_pointer)
|
if (widget_pointer)
|
||||||
*widget_pointer = NULL;
|
*widget_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user