Re: GWP doesn't compile (patch included)
- From: Daniel Burrows <Daniel_Burrows brown edu>
- To: "gnome-list gnome org" <gnome-list gnome org>
- Subject: Re: GWP doesn't compile (patch included)
- Date: Sat, 19 Dec 1998 20:49:01 -0500
On Sat, Dec 19, 1998 at 08:38:15PM -0500, Daniel Burrows scribbled:
> I poked around in the gnome_app_remove_menus() code and discovered that
> it calls gtk_container_remove() on each menu item, followed by
> gtk_destroy_widget(), but the gtk_destroy_widget() segfaults first time. Is
> it possible that gtk_container_remove() destroys the widget, causing
> gtk_destroy_widget() to free() memory which has already been deallocated, or
> something like that? Anyway, this looks like maybe a libgnomeui bug.. (?)
>
Well, I commented out the gtk_destroy_widget() call in
gnome_app_remove_menus() and it _appears_ to work fine. I've attached a patch
against gnome-libs/libgnomeui, it's a one-line change again. :-) I'm concerned
about eliminating a memory-freeing call, although I can't see how it could be
segfaulting unless the gtk_container_remove() call destroyed the widget already.
So I may have introduced a memory leak, but I don't THINK so at the moment..
I'd feel more secure if someone else confimed that this was kosher though.
--
Daniel Burrows
Nothing is hopeless.
PROOF:
(a) Assume the opposite.
(b) If something _is_ hopeless, then its condition can only improve.
(c) If its condition can only improve, then there must be hope for it.
(d) Therefore, nothing is hopeless. QED.
Index: gnome-app-helper.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-app-helper.c,v
retrieving revision 1.95.2.3
diff -c -r1.95.2.3 gnome-app-helper.c
*** gnome-app-helper.c 1998/12/18 09:58:30 1.95.2.3
--- gnome-app-helper.c 1998/12/20 01:45:04
***************
*** 1372,1378 ****
child = GTK_WIDGET(children->data);
children = children->next;
gtk_container_remove(GTK_CONTAINER(parent), child);
! gtk_widget_destroy(child);
items--;
}
--- 1372,1378 ----
child = GTK_WIDGET(children->data);
children = children->next;
gtk_container_remove(GTK_CONTAINER(parent), child);
! // gtk_widget_destroy(child);
items--;
}
Index: gnome-init.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-init.c,v
retrieving revision 1.62.2.1
diff -c -r1.62.2.1 gnome-init.c
*** gnome-init.c 1998/12/17 02:16:00 1.62.2.1
--- gnome-init.c 1998/12/20 01:45:04
***************
*** 403,409 ****
* Parse:
* $gnomedatadir/gtkrc
* $gnomedatadir/$apprc
- * ~/.gnome/gtkrc
* ~/.gnome/$apprc
*
* appname is derived from argv[0]. IMHO this is a great solution.
--- 403,408 ----
***************
*** 450,462 ****
/* <gnomedatadir>/<progname> */
file = gnome_datadir_file(apprc);
- if (file){
- gtk_rc_parse (file);
- g_free (file);
- }
-
- /* ~/.gnome/gtkrc */
- file = gnome_util_home_file("gtkrc");
if (file){
gtk_rc_parse (file);
g_free (file);
--- 449,454 ----
PGP signature
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]