Hi Greg, this look was what I actually wanted to achive :-) Looks like we don't have a case of not working code, but different goals. We better start out by defining the problem, listing possible solutions and then arguing for or against them.
The problem I see is that we have a duplication of menu reorganisation code. Once for switching between horizontal and vertical and another one for loading NIB files. This duplication is bad in itself and will lead to inconsistencies when switching a loaded NIB menu to horizontal (and back again). My solution was to bring the NIB menu as close to the way the menu of normal GNUstep application looks. That is have on the main menu an info item (could also be a sub menu), at the very bottom the quit item and above that the services and hide items, if any. In the info sub menu all the other entries from the application sub menu of the NIB file get collected. The way I implemented that was to look for the Services entry and move everything above that into the info submenu and everything below in the main menu. If you take a look at the main menu of Gorm you will notice almost looks like the one you reject. The only differences are that the converted menu also has some separator items and two additional hide/show entries. You could argue now that the normal menu layout of GNUstep menus is bad. This is a possible point of view, but then we again should try to find a shared view on how to organise menus. Perhaps we can even move the menu reorganisation into a theme? As for the difference to the original code. When I tried to switch of your code the first time without any changes to NSMenu, it ended up with the Services item being the first one and all of the entries that are now gathered in the info submenu being at the end of the main menu. I hope you find my solution better than that. What looks wrong in my implementation is that the menu has the title MainMenu, that needs to be changed. I don't remember that happening to me. Fred Gregory Casamento wrote: > I have attached how it looks using the new code > (Flexisheet_organizeMenu.jpg). I'm not seeing any difference between > that and how it looked before. > > For reference, with my code, it looks like the attached file > Flexisheet_gsnibcode.jpg. > > Thanks, GC > > On Tue, Feb 24, 2009 at 5:35 PM, Fred Kiefer <[email protected] > <mailto:[email protected]>> wrote: > > Gregory Casamento wrote: > > Author: gcasa > > Date: Wed Feb 18 08:38:02 2009 > > New Revision: 27911 > > > > URL: http://svn.gna.org/viewcvs/gnustep?rev=27911&view=rev > <http://svn.gna.org/viewcvs/gnustep?rev=27911&view=rev> > > Log: > > * Source/GSNibLoading.m: Rollback of previous change. Found a > > minor problem. > > > > Modified: > > libs/gui/trunk/ChangeLog > > libs/gui/trunk/Source/GSNibLoading.m > > Greg, > > could you please explain why you had to undo this change? If there was a > problem I am willing to help fixing it. I did not remove this code > myself, as I wanted to give you enough time to check, whether my > replacement was working. > I really would like to the see this code here go away. > _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
