%/*
  SCCS  : @(#) .xdtdirinfo 8.1 92/09/04
  *
  * Controls directory .xdtdirinfo ( $LANG.xdt/toolsheds/Controls/.xdtdirinfo ) 
  * 
%*/

icon_rules
{
  %$TOOLSHED$/Controls/. /DX
  {
    picture=;
  }

  %$TOOLSHED$/Controls/.. /DX
  {
    picture=;
  }

  DeskPref.obj /DRX
  {
    title=Preferences;
  }

  Sysadm.obj /DRX
  {
    title=Administration;
  }

  ObjBld.obj /DRX
  {
    title=Object Builder;
  }

  *.obj /DRX
  {
    picture=%E0.px;
  }
}

%// 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 }
    }
}
