> imm wrote:
> > 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.
>
> Mmm, that'll work for drive letter paths, but not UNCs,
> eg. "//yourserver/volname/path", which you can end up with
> if you browse to a server thru Network Neighborhood, or have
> to use due to the limitations of drive letters in multiuser
> contexts.
>
> I guess you could also check for a leading / or //
Thanks all for the replies, I guess it's a common problem. I really don't want
to mess around with fltk because I know next time I upgdade to a newer version
or build on a different computer, I will forget to add the changes. For now I
guess I will use #ifdef WIN32s to add and remove "/" before any path, even if
it looks kind of ugly on the actual item label.
Anyway, I will also submit a bug/feature request for a solution. Maybe a
mechanism kind of like the turning off all @x symbols, but for turning off all
special formating character interpretation. Or maybe even an
Fl_Menu_::addSimple(const *char) method... I don't think that would break back
compatibility.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk