On Fri, Mar 15, 2002 at 03:36:42PM -0500, Daniel Henninger wrote:
> > Hrm.  Yeah, that would get ugly real quick.  Would doing something like
> > what follows be interesting?
> >
> > NewAddToMenu "AppMenu"
> > +   Style           SidePixmap "ninja.xpm"
> > +   Style           SideColor gray
> > +   Item            "Application Menu" Title
> > +   Item            "" Nop
> > +   Item            "Corporate Time" Exec /usr/local/bin/ctime
> > +   Property        Greyed
> > +   Property        Hotkey T
> >
> > And maybe allow for S for style, I for item, P for property, etc?
> 
> Alternatively, swap Style for MenuStyle, Property for ItemStyle:
> NewAddToMenu "AppMenu"
> +     MenuStyle       SidePixmap "ninja.xpm"
> +     MenuStyle       SideColor gray
> +     Item            "Application Menu" Title
> +     Item            "" Nop
> +     Item            "Corporate Time" Exec /usr/local/bin/ctime
> +     ItemStyle       Greyed
> +     ItemStyle       Hotkey T

I wouldn't call it "MenuStyle" unless it can provide the same
functionality as the usual MenuStyle command.  I'd start with less
complicated matters first.

> Effectively making them "short aliases" for a full blown MenuStyle and
> ItemStyle command.  Who knows, some folk might actually -want- to specify
> an ItemStyle in the format of:
> ItemStyle     <menu>  <item>  <options>
> ItemStyle     "AppMenu"       "Corporate Time"        Greyed, Hotkey T

We don't need that.  It's bad enough that the '+' command adds to
different kinds of lists.

> That way it could remain "easier"...
> 
> Or....  Or, completely rethinking it:
> NewAddToMenu "AppMenu"
> +     ""                      MenuStyle SidePixmap
> +     ""                      MenuStyle SideColor gray
> +     "Application Menu"      Title
> +     ""                      Nop
> +     "Corporate Time"        Exec /usr/local/bin/ctime
> +     ""                      ItemStyle Greyed
> +     ""                      ItemStyle Hotkey T
> 
> That could get ugly at some level, but would keep it backwards compatible.
> Obviously for the "MenuStyle" and "ItemStyle" commands it would "assume"
> the current menu or the 'last menu item in this menu'.  It would also
> refrain from showing the ""'s for MenuStyle and ItemStyle lines.

That would work fine.  It's completely compatible (if the action
names are chosen well).  It might be a bit confusing, though.

> Granted,
> that would prevent users from being able to set a menu item that would
> adjust MenuStyle or ItemStyle... so.......  Lessee.

Forget it.  Self modifying menu items are not such a good idea
anyway.  It's hard to guarantee stable code.

> NewAddToMenu "AppMenu"
> +     ""                      PassMenuStyle SidePixmap
> +     ""                      PassMenuStyle SideColor gray
> +     "Application Menu"      Title
> +     ""                      Nop
> +     "Corporate Time"        Exec /usr/local/bin/ctime
> +     ""                      PassItemStyle Greyed
> +     ""                      PassItemStyle Hotkey T
> 
> maybe some sort of command that "doesn't exist anywhere else"?  Obviously
> just end up being a modified version of the 'full' command that would call
> the full command with the proper arguments?  I'm not sure I like the
> naming scheme of "PassItemStyle", but something like that...

Perhaps

  NewAddToMenu "AppMenu"
  + ""     ModifyMenu Style SidePixmap foobar.xpm, ...
  + "foo"  exec bar
  + ""     ModifyItem Style Greyed, Hotkey f

?  No, I don't like that.  Although it reduces the number of new
"commands" that have to be defined, it's too complicated.

> Alternatively:
> NewAddToMenu "AppMenu"
> *     MenuStyle               SidePixmap
> *     MenuStyle               SideColor gray
> +     "Application Menu"      Title
> +     ""                      Nop
> +     "Corporate Time"        Exec /usr/local/bin/ctime
> *     ItemStyle               Greyed
> *     ItemStyle               Hotkey T
> 
> Simply add a new initial marker of sorts for the special "these are config
> lines, not menu items".  This would make the old menus as backwards
> compatible as we can make them.  For the time being have the menu routines
> go ahead and continue to parse the Label for options as well, maybe making
> 'comments' saying "please switch to the new style of styling your
> menu/items" or something.  As Dominik pointed out, we'd have to parse the
> labels anyway for tabs, so "sure why not".

Not necessarily:

  + "foo"     exec bar
  + "bar"     ModifyItem AddLabel 3

instead of

  + "foo\t\tbar" ...

> Last but not least, there's a "mod to what I said before" of:
> NewAddToMenu "AppMenu"
> +     MenuStyle       SidePixmap "ninja.xpm"
> +     MenuStyle       SideColor gray
> +     "Application Menu" Title
> +     "" Nop
> +     "Corporate Time" Exec /usr/local/bin/ctime
> +     ItemStyle       Greyed
> +     ItemStyle       Hotkey T
> 
> Where the "after the +" arg there is parsed for whether it's MenuStyle or
> ItemStyle... if so, treat it as a style option, if not, it's a menu item.
> If a user wanted to have ItemStyle or MenuStyle as a menu label for some
> reason they could simply put it in quotes?

Thats' exactly the kind of screwed up parsing I'd like to replace
:-)  

> 
> Daniel
> 
> -- 
> /\\\----------------------------------------------------------------------///\
> \ \\\      Daniel Henninger           http://www.vorpalcloud.org/        /// /
>  \_\\\      North Carolina State University - Systems Programmer        ///_/
>     \\\                   Information Technology <IT>                  ///
>      """--------------------------------------------------------------"""
> 
> 
> --
> Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
> body of a message to [EMAIL PROTECTED]
> To report problems, send mail to [EMAIL PROTECTED]


Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to