Re: ev_UnixMenu.cpp question


Subject: Re: ev_UnixMenu.cpp question
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Tue Jan 23 2001 - 23:46:25 CST


Committed. Thanks for finding this leak, Hub.

Dom

>From: Hubert Figuiere <hfiguiere@teaser.fr>
>To: abiword-dev@abisource.com
>Subject: ev_UnixMenu.cpp question
>Date: Mon, 22 Jan 2001 22:52:00 +0100
>
>
>I have a question about the UNIX code of AbiWord, question that may
>leads to discover a memory leak...
>
>In ev_UnixMenu.cpp, I don't really understand this code around line 448
>
> // create the item with the underscored label
> GtkWidget * w = gtk_menu_item_new();
> if ( !pAction->isCheckable() )
> w = gtk_menu_item_new();
> else
> {
> w = gtk_check_menu_item_new();
> // Make the checkbox visible at all times. Much more
>informative to the user
> // and less confusing.
> gtk_check_menu_item_set_show_toggle
>(GTK_CHECK_MENU_ITEM(w), TRUE);
> }
>
>
>My question is why do we do a gtk_menu_item_new () before the if ()
>while we do one in each case of the if....
>Since nothing is done with w, this means that a GtkWidget get lost
>each time we create a menu item....
>
>Any comment ? For me it is a bug, but I'm willing to hear any
>explaination about why this is done.
>
>
>Hub
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



This archive was generated by hypermail 2b25 : Tue Jan 23 2001 - 23:46:36 CST