> For me, it's annoying when you change the value of fileStackMax, the menu doesn't take care about this value.
> I think that that's helpful when you change this value, that the menuItem adjusts automatically to this value.
> I propose you this patch, that should add this feature unfortunately for GTK only
That code looks too complex and difficult to maintain for what
seems to me to be a minor benefit. The amount of explicit memory
management is particularly unwieldy and may be possible to avoid using
containers from the C++ standard library.
> In the case case, you accept it. I plan to add property to defined this value by configuration (e.g. mruFileSize or another name of your choice).
> (If you think that's worth, I can propose you only one patch included property directly)
I don't really see an extra long MRU menu being useful. Maybe
others want this.
Neil
> Originally, I didn't want modify the design of the code. That's reason
> why I implemented this code with explicit memory managment.
> So, I changed it, and as you told me I replaced all this code with
> containers from the C++ standard library (deque) and I removed all
> explicit memory managment.
> I hope that this new patch is acceptable for you in term of complexity
Instead of being simpler, the patch has grown from 164 to 414
lines. I won't be applying it in its current form.
Neil
> The patch is now only 237 lines (with majority is due to use of
> iterator)
My suggestion about using standard containers was an attempt to
simplify the original code. If it doesn't help simplify then a
different approach should be used. This feature should not require a
lot of code. If it does then I won't be merging it.
Neil
I see many warnings like:
SciTEGTK.cxx: In member function ‘void SciTEGTK::CreateMenu()’:
SciTEGTK.cxx:3326:36: warning: passing NULL to non-pointer argument 1
of ‘SString::SString(int)’
Neil
do you use dynamic creation of menus/submenus? maybe its useful to
enahnce the tools-menu like in scite-ru also for gtk+
regards Frank