%/*
  SCCS  : @(#) .xdtdirinfo 1.5 92/10/12
  *
  * Extras directory .xdtdirinfo ( $XDESKTOP/applications/Extras/.xdtdirinfo ) 
  * 
%*/

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

  %$XDESKTOP$/applications/Extras/.. /DX
  {
    picture=dirup.px;
  }

  Demo.ts /DX
  {
    picture=Animation.px;
    title=Animation Demos;
  }

  * /FX
  {
    title=%B0;
    picture=%B0.px;

    trigger_action: s1
    {
      $static_arg
    }

    trigger_action: d1
    {
      $static_arg $dynamic_args
    }
  }
}

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

%// Add new view menu without dot file display

menu: DirViewMenu
{
  menu_item
  {
    ti=Icons   _I_Ctrl<Key>I_Ctrl+I;
    enable_if
    {
      # 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
    {
      # 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
    {
      # see if dir is viewed as names already, if so stipple
      vstate=`(list intersect $thread_name(2)^Names :: $:_dirview)
      [ -ne $#vstate 1 ]
    }
    select_action
    {
      # 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
    {
      # see if dir is viewed as details already, if so stipple
      vstate=`(list intersect $thread_name(2)^Details :: $:_dirview )
      [ -ne $#vstate 1 ]
    }
    select_action
    {
      # 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 }
    }
}
