lmi
[Top][All Lists]
Advanced

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

Re: [lmi] A no-longer-reproducible anomaly


From: Greg Chicares
Subject: Re: [lmi] A no-longer-reproducible anomaly
Date: Sat, 10 Mar 2018 02:07:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-03-10 01:23, Vadim Zeitlin wrote:
> On Sat, 10 Mar 2018 00:42:33 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> I conclude that this issue
[...]
> GC> must have been fixed by some wx update (and can therefore now be
> GC> removed) based on experimenting with the following throwaway patch.
> 
>  I don't really remember (and couldn't find by examining "git log
> src/msw/menu{,item}.cpp") any relatively recent commits that could have
> changed this, but OTOH I don't remember ever seeing this problem neither.
> The last potentially relevant commit I found was
> a3f4e9e81afa4f435b137ebbfb5b07e98a698271 but it dates from 1999-02-06...

Thanks. That was before lmi was ported to lmi, around wx-2.5.4 = 2005.
It's good to remove a "WX !!" marker, even if the reason why it was
originally written is lost in the mists of time.

Since you're more familiar with wx history than I...do you know what
ever happened to wxFindSuitableParent()?

I just happened to be looking at 'docmanager_ex.cpp', because it's
the only place where lmi's class SingleChoicePopupMenu is still used
(the kink in the census menu having at last been removed):

// GWC changes begin
/*
            theTemplate = (wxDocTemplate*)wxGetSingleChoiceData
                          (
                            _("Select a document template"),
                            _("Templates"),
                            strings,
                            (void**)data,
                            wxFindSuitableParent()
                          );
*/
            int selection = SingleChoicePopupMenu(strings).Choose();

...and I was intrigued enough to search for it. Finding it here:
  https://github.com/LuaDist/wxwidgets/blob/master/src/common/docview.cpp
I was even more intrigued--it seems to do exactly the right thing in this
circumstance--better than the GetTopWindow() that SingleChoicePopupMenu
uses. I was about to ask whether it could be made public instead of static,
as it seems like a perfect candidate for reuse--but I looked for it in my
local copy of the wx sources:
  $grep --directories=skip GetSuitableParent 
/opt/lmi/wx-scratch/wxWidgets-3.1.0-p1/**/*
and found nothing...so was it removed for a reason? or replaced by
something better? I felt slightly tempted to resurrect it into lmi's
TopWindow(), but a wise druid asks first before bringing your dead
back to life.



reply via email to

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