On Fri, 7 Jun 2013 at 15:21:07 +0100, Iain Patterson wrote: > Quoth Carlos R. Mafra, > > >The Workspaces entry in the main menu allows to rename workspaces by > >clicking on the workspace name while pressing the Ctrl key. > > I did not know that...
Right, that was indeed a trap. > >This happens because there is an explicit offset in the current code (- 2) > >to account for the "non-workspace" entries in the menu. If one adds one > >more entry that offset should be changed too (this is a prime example > >of fragile code leading to bugs). > > Prior to breaking it with commit 63219247c6c7 I had attempted to > get rid of the corresponding magic numbers. See 9b27217b53d9. As I > didn't know about the workspace renaming I didn't think to look for > the -2 you just fixed. By the way, when I wrote "prime example of fragile code leading to bugs" I was not refering to your code in that commit, but my code to rename the workspaces from fd07e032d. > Should we consider moving the MC_* #defines (and others) to > WindowMaker.h or some other shared header so that the code is less > fragile? Yes, if you see a way to make that happen and make the code more robust, definitely. -- To unsubscribe, send mail to [email protected].
