dia_bits.inc 1.72 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
% 32/64 bit install selection dialog.
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Some global vars.
%
/bits.default 0 def

/bits.suffix [
  .undef
  "64"
] def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Build menu list.
%
% ( ) ==> ( )
%
/bits.init {
  /xmenu.bits .xm_size array def

  /xmenu xmenu.bits def

  xmenu .xm_list [ "x86" ] put

  32+64bit_source {
    64bit {
      /bits.default 1 def
      xmenu .xm_list [ "x86" "x86-64" ] put
    } if
  } if

  % no '64' suffix
  32bit_boot_dir 64bit_boot_dir ne {
    bits.suffix 1 .undef put
  } if

  xmenu .xm_title /txt_arch put

  xmenu .xm_current bits.default put

} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Update bit selection menu.
%
% ( ) ==> ( )
%
/bits.update {
  /xmenu xmenu.bits def

  /window.action actRedrawPanel def
} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Show bit selection menu.
%
% ( ) => ( )
%
/panel.bits {
  "bits" help.setcontext

  window.xmenu
  dup .xmenu xmenu.bits put
  dup .xmenu.update /bits.update put
  dup window.init
      window.show
} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Return width of panel entry.
%
% ( ) => ( width )
%
/panel.bits.width {
  /xmenu xmenu.bits def

  pmenu.width
} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Redraw panel entry.
%
% ( panel ) => ( )
%
/panel.bits.update {
  /xmenu xmenu.bits def

  pmenu.panel.update
} def