root/trunk/max-genlive/gfxboot/dia_fulloptions.inc @ 235

Revision 235, 3.5 KB (checked in by max, 19 months ago)

mario.izquierdo
max-genlive (4.0.max0.46)

  • Update gfxboot-theme-ubuntu package (0.5.20)
    • Better language support
Line 
1% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2%
3% Panel boot options selector.
4%
5% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6
7
8/fulloptions.option .undef def
9
10/.fulloptions.expert 0 def
11/.fulloptions.acpi_off 1 def
12/.fulloptions.noapic 2 def
13/.fulloptions.nolapic 3 def
14/.fulloptions.edd_on 4 def
15/.fulloptions.free 5 def
16
17% These strings are intentionally not translatable.
18/txt_acpi_off "acpi=off" def
19/txt_noapic "noapic" def
20/txt_nolapic "nolapic" def
21/txt_edd_on "edd=on" def
22
23
24% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
25% Initialise boot options menu.
26%
27% ( ) ==> ( )
28%
29/fulloptions.init {
30  /xmenu.fulloptions .xm_size array def
31  /xmenu xmenu.fulloptions def
32
33  is_live {
34    /.fulloptions.acpi_off dec
35    /.fulloptions.noapic dec
36    /.fulloptions.nolapic dec
37    /.fulloptions.edd_on dec
38    /.fulloptions.free dec
39    xmenu .xm_current .fulloptions.acpi_off put
40  } {
41    xmenu .xm_current .fulloptions.expert put
42  } ifelse
43
44  xmenu .xm_list [
45    is_live not { /txt_expert_mode } if
46    /txt_acpi_off /txt_noapic /txt_nolapic /txt_edd_on
47    /txt_option_free
48  ] put
49
50  xmenu .xm_title /txt_other_options put
51  xmenu .xm_check 1 put
52  xmenu .xm_allselected xmenu .xm_list get length array put
53  0 1 xmenu .xm_list get length 1 sub {
54    xmenu .xm_allselected get exch false put
55  } for
56
57  pmenu.init
58} def
59
60
61% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
62% Change boot options status.
63%
64% ( ) ==> ( )
65%
66/fulloptions.change {
67  /xmenu xmenu.fulloptions def
68
69  /fulloptions.option 0 string def
70
71  xmenu .xm_allselected get
72  0 1 xmenu .xm_allselected get length 1 sub {
73    over over get {
74      .undef
75      is_live not { over .fulloptions.expert eq { pop "priority=low" } if } if
76      over .fulloptions.acpi_off eq { pop "acpi=off" } if
77      over .fulloptions.noapic eq { pop "noapic" } if
78      over .fulloptions.nolapic eq { pop "nolapic" } if
79      over .fulloptions.edd_on eq { pop "edd=on" } if
80      over .fulloptions.free eq { pop "apt-setup/restricted=false apt-setup/multiverse=false" } if
81      dup {
82        % append new option string
83        dup length fulloptions.option length add 1 add string
84        /fulloptions.newoption exch def
85        dup fulloptions.option "%s %s" fulloptions.newoption sprintf
86        fulloptions.option free
87        /fulloptions.option fulloptions.newoption def
88      } if
89      pop
90    } if
91    pop
92  } for
93  pop
94
95  fulloptions.option length {
96    /fulloptions.option inc
97  } {
98    /fulloptions.option .undef def
99  } ifelse
100} def
101
102
103% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
104% Update boot options status.
105%
106% ( ) ==> ( )
107%
108/fulloptions.update {
109  fulloptions.change
110  /window.action actRedrawPanel def
111  pmenu.update
112} def
113
114
115% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
116% Show window.
117%
118% ( ) => ( )
119%
120/panel.fulloptions {
121  "fulloptions" help.setcontext
122
123  window.xmenu
124  dup .xmenu xmenu.fulloptions put
125  dup .xmenu.change /fulloptions.change put
126  dup .xmenu.update /fulloptions.update put
127  dup window.init
128      window.show
129} def
130
131
132% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
133% Return width of panel entry.
134%
135% ( ) => ( width )
136%
137/panel.fulloptions.width {
138  /xmenu xmenu.fulloptions def
139
140  pmenu.width
141} def
142
143
144% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
145% Redraw panel entry.
146%
147% ( panel ) => ( )
148%
149/panel.fulloptions.update {
150  /xmenu xmenu.fulloptions def
151
152  pmenu.panel.update
153} def
Note: See TracBrowser for help on using the browser.