%/*
  *
  * $XDESKTOP/applications/FAX/.xdtdirinfo
  * 
%*/

%// modify menu panes
menu: DirFileMenu
{
  menu_item: Open          _O_Ctrl<Key>O_Ctrl+O
    {
      open_cmd
    }

  thick_dividing_line;

  menu_item: Close         _l_Ctrl<Key>C_Ctrl+C
    {
      # M002 remove state info so next time dir is opened it is clean
      remove_dir_view_states Names Details Time Size Show
      close_directory $static_arg
    }
}

%// M002 Add new view menu without dot file display

menu: DirViewMenu
{
  menu_item
  {
    ti=Icons   _I_Ctrl<Key>I_Ctrl+I;
    enable_if
    {
      # M002 see if dir is viewed as names or details, if not, stipple
      vstate=`(list intersect $thread_name(2)^Names :: $:_dirview)
      vstate=($vstate `(list intersect $thread_name(2)^Details :: $:_dirview))
      [ -ne $#vstate 0 ]
    }
    select_action
    {
      # M002 don't need to add to state, no entry means icons
      # just remove other states
      remove_dir_view_states Names Details
      display_directory -i $static_arg
    }
  }
  menu_item
  {
    ti=Names   _N_Ctrl<Key>N_Ctrl+N;
    enable_if
    {
      # M002 see if dir is viewed as names already, if so stipple
      vstate=`(list intersect $thread_name(2)^Names :: $:_dirview)
      [ -ne $#vstate 1 ]
    }
    select_action
    {
      # M002 if we got in here then we were either in icon or details state
      remove_dir_view_states Details
      :_dirview=( $static_arg^Names $:_dirview )
      display_directory -nf %I $static_arg
    }
  }
  menu_item
  {
    ti=Details _D__;
    enable_if
    {
      # M002 see if dir is viewed as details already, if so stipple
      vstate=`(list intersect $thread_name(2)^Details :: $:_dirview )
      [ -ne $#vstate 1 ]
    }
    select_action
    {
      # M002 if we got in here then we were either in icon or names state
      remove_dir_view_states Names
      :_dirview=( $static_arg^Details $:_dirview )
      display_directory -nf '%T %S %I' $static_arg
    }
  }

  dividing_line;

  menu_item: Sort    _S__
    { pull_off_menu=DirSortMenu }

  dividing_line;

  menu_item
    {
      ti=Reorganize _R_Ctrl<Key>R_Ctrl+R;
      enable_if { conts=`(query contents $thread_name(2)); [ -ne $#conts 0 ] }
      select_action { display_directory $static_arg }
    }
}

icon_rules
{
	%$XDESKTOP$/applications/FAX/. /DX { picture=; }
	%$XDESKTOP$/applications/FAX/.. /DX { picture=; }

	faxsend.obj /DRX	{ title=Send; }
	faxrcv.obj /DRX		{ title=Received; }
	faxsave.obj /DRX	{ title=Saved; }
	faxstat.obj /DRX	{ title=Status; }
	faxcvt.obj /DRX		{ title=Convert; }
	faxadmin.obj /DRX	{ title=Administer; }
	faxview.obj /DRX	{ title=View; }
	xdigifax.obj /DRX	{ title=DigiFAX; }

	%// SendFax.obj /DRX	{ title=Send a FAX; }
	%// RcvSpool.obj /DRX	{ title=Show Received%#10#FAXes; }
	%// RcvHome.obj /DRX	{ title=Show Saved%#10#FAXes; }
	%// ToFax.obj /DRX		{ title=Convert File%#10#To .fax; }
	%// ViewFax.obj /DRX	{ title=View a%#10#.fax File; }
}
