dia_kernelopts.inc 1.8 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
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
% Kernel options dialog.
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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

/kernelopts.options [
  ""
  "apm=off acpi=off mce=off barrier=off ide=nodma idewait=50 i8042.nomux psmouse.proto=bare irqpoll pci=nommconf"
  "acpi=off"
  "nolapic"
] def


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

  /xmenu xmenu.kernelopts def

  xmenu .xm_current kernelopts.default put
  xmenu .xm_list [
    /txt_kernel_default
    /txt_kernel_safe
    /txt_kernel_noacpi
    /txt_kernel_nolapic
  ] put
  xmenu .xm_title /txt_kernel put

} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Update kernelopts mode.
%
% ( ) ==> ( )
%
/kernelopts.update {
  /xmenu xmenu.kernelopts def

  /window.action actRedrawPanel def
} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Show kernelopts menu.
%
% ( ) => ( )
%
/panel.kernelopts {
  "main" help.setcontext

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


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

  pmenu.width
} def


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

  pmenu.panel.update
} def