[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] popup menus cleanup

From: Greg Chicares
Subject: Re: [lmi] popup menus cleanup
Date: Tue, 06 Jul 2010 10:43:46 +0000
User-agent: Thunderbird (Windows/20100228)

On 2010-07-06 08:44Z, Vaclav Slavik wrote:
> On Mon, 2010-07-05 at 17:02 +0200, Vaclav Slavik wrote:
>> please apply the patch below. It cleans up popup menus code: 
> And here's another one. It fixes an assert (and malfunctioning menu
> items) under wxGTK, where the hack with reusing menu bar's menu doesn't
> work.
> This patch changes it to "properly" create a new menu from XRC markup.

I don't object to the change, but please help me understand why that
was a hack. In the manual for wxMenu I see:

  Allocation strategy
  All menus except the popup ones must be created on the heap. All
  menus attached to a menubar or to another menu will be deleted by
  their parent when it is deleted.

But AFAICT this menu lives on the heap, with or without the patch, so
heap vs. stack doesn't seem to be the problem. I figured that we have
this menu on the heap already, inside the menubar object, so why not
just use it for the popup?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]