home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmtfe30.zip / source.zip / source / MYMNUINI.ADD < prev    next >
Text File  |  2000-02-29  |  4KB  |  116 lines

  1. /*************************************************/
  2. /*                                               */
  3. /*  This is file mymnuini.add, version 2.7       */
  4. /*  the menu control code for the                */
  5. /*  EPM with built in TeX Front End              */
  6. /*                                               */
  7. /*  Rename this file to mymniuni.e or            */
  8. /*  add its contents to an existing mymnuini.e   */
  9. /*                                               */
  10. /*************************************************/
  11.  
  12.  
  13. -- since this file is included at the end of PROCESSMENUINIT we cannot put any
  14. -- global declarations here.  We need to use a procedure call to get the
  15. -- value of universal variables.
  16.  
  17.     if menuid=9 then                           -- TeX menu ID is 9
  18.         if tex_is_doc() then
  19.             SetMenuAttribute( 901, 16384, 1)   -- enable TeX Document
  20.             SetMenuAttribute( 908, 16384, 1)   -- enable TeX/PS
  21. compile if defined (vtex)
  22.             SetMenuAttribute( 925, 16384, 1)   -- enable quick TeX
  23. compile endif
  24.         else
  25.             SetMenuAttribute( 901, 16384, 0)   -- disable TeX Document
  26.             SetMenuAttribute( 908, 16384, 0)   -- disable TeX & dvips
  27. compile if defined (vtex)
  28.             SetMenuAttribute( 925, 16384, 0)   -- disable quick TeX
  29. compile endif
  30.         endif
  31.  
  32.         if tex_more_errors() then
  33.             SetMenuAttribute( 924, 16384, 1)   -- enable Locate Error
  34.         else
  35.             SetMenuAttribute( 924, 16384, 0)   -- disable Locate Error
  36.         endif
  37.  
  38.         if tex_current_log() then
  39.             SetMenuAttribute( 905, 16384, 1)   -- enable LOG file view
  40.         else
  41.             SetMenuAttribute( 905, 16384, 0)   -- disable LOG file view
  42.         endif
  43.  
  44. compile if not defined (vtex)
  45.         if tex_check_print_exec() then
  46.             if tex_check_exist('.DVI') then
  47.                SetMenuAttribute( 904, 16384, 0)   -- disable TeX Print Document
  48.             else
  49.                SetMenuAttribute( 904, 16384, 1)   -- enable TeX Print Document
  50.             endif
  51.         endif
  52.  
  53.         if tex_check_exist('.DVI') then
  54.             SetMenuAttribute( 903, 16384, 0)   -- disable TeX Preview Document
  55.             SetMenuAttribute( 944, 16384, 0)   -- disable dvips
  56.         else
  57.             SetMenuAttribute( 903, 16384, 1)   -- enable TeX Preview Document
  58.             SetMenuAttribute( 944, 16384, 1)   -- enable dvips
  59.         endif
  60. compile endif
  61.  
  62.         if tex_check_exist('.PS') then
  63.             SetMenuAttribute( 943, 16384, 0)   -- disable PS Preview
  64.         else
  65.             SetMenuAttribute( 943, 16384, 1)   -- enable PS Preview
  66.         endif
  67.  
  68.         if tex_check_exist('.PDF') then
  69.             SetMenuAttribute( 923, 16384, 0)   -- disable PDF Preview
  70.         else
  71.             SetMenuAttribute( 923, 16384, 1)   -- enable PDF Preview
  72.         endif
  73.  
  74.         if tex_check_user_exec(1) then
  75.            if tex_check_exist(get_tex_user_ext(1)) then
  76.               SetMenuAttribute( 911, 16384, 0) -- disable
  77.            else
  78.               SetMenuAttribute( 911, 16384, 1) -- enable
  79.            endif
  80.         endif
  81.  
  82.         if tex_check_user_exec(2) then
  83.            if tex_check_exist(get_tex_user_ext(2)) then
  84.               SetMenuAttribute( 921, 16384, 0) -- disable
  85.            else
  86.               SetMenuAttribute( 921, 16384, 1) -- enable
  87.            endif
  88.         endif
  89.  
  90.         if tex_check_user_exec(3) then
  91.            if tex_check_exist(get_tex_user_ext(3)) then
  92.               SetMenuAttribute( 930, 16384, 0) -- disable
  93.            else
  94.               SetMenuAttribute( 930, 16384, 1) -- enable
  95.            endif
  96.         endif
  97.  
  98.         if tex_check_user_exec(4) then
  99.            if tex_check_exist(get_tex_user_ext(4)) then
  100.               SetMenuAttribute( 933, 16384, 0) -- disable
  101.            else
  102.               SetMenuAttribute( 933, 16384, 1) -- enable
  103.            endif
  104.         endif
  105.  
  106.         -- Master file support
  107.         SetMenuAttribute( 940, 8192, not check_tex_master())
  108. /*
  109.         -- Menu always on?
  110.         SetMenuAttribute( 916, 8192, not check_tex_menuon())
  111. */
  112.     endif -- menuid=9
  113.  
  114. /* finis */
  115.  
  116.