On 10 Dec 2007, at 19:07, Daniel Gollas wrote:
>>
> I guess the clean solution in this case is to add a / befor the  
> drive letter, but then I would have to remove it before using the  
> text value and the / would appear on the menu item. It seems to be  
> the only workaround. Thanks anyway!

Well - is your code statically linked to fltk? (And I would suggest  
that it should be, particularly on Win32 where DLL's are generally a  
mess.)

If so, there is maybe a better way:

Edit your copy of Fl_Menu_add.cxx, and around line 124, add the  
following code. Note: this is just a suggestion, I haven't actually  
tried this, there's no win32 box here right now. The intent seems  
simple enough, so I'm sure you can make it work as intended.

#ifdef WIN32
     // leading "D:" makes us assume it is a filename:
     if (mytext[1] == ':') {
       if(isalpha((mytext[0])){
         item = mytext;
         break;
       }
     }
#endif


That should stop the menu->add() method breaking up your path names  
as menu tree's, giving the behaviour you want.

-- 
Ian


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to