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

Reply via email to