Изменено меню выбора опций

Добавлен параметр composite-labels для gfxboot.cfg, в нем необходимо
указывать пункты меню, для которых будет актуален no composite
Из опций удален free soft, и добавлен динамический пункт No composite
В командную строку добавляется параметр composite:value
master
Mike Khiretskiy 9 years ago
parent d2d747e69a
commit 5bb25f2fc6

@ -390,6 +390,11 @@
video_modes.selected.append "%s" bc.cmd dup length add sprintf
} if
fulloptions.cmd_composite dup 0 get 0 ne {
calculate.param
"%s" bc.cmd dup length add sprintf
} { pop } ifelse
modes.selected.replace .undef ne {
modes.selected.replace "=" strstr dup 0 ne {
modes.selected.replace exch strndup /bc.tmp exch def % e.g. "file="
@ -475,6 +480,17 @@
/menu.bar.color over def
/xmenu.dark exch def
} { pop } ifelse
"composite-labels" getgfxconfig dup .undef ne {
/fulloptions.composite [
2 index
{
skipspace dup 0 get 0 eq { exit } if
getword exch
} loop
pop
] def
pop
} { pop } ifelse
"access-options" getgfxconfig dup .undef ne {
/access.optionnames [
.undef
@ -737,8 +753,9 @@
} ifelse
% update installation modes menu
menu.idx modes.filter
menu.idx video_modes.filter
menu.idx fulloptions.filter
menu.idx modes.filter
} if
} def

@ -6,6 +6,8 @@
/fulloptions.option .undef def
/fulloptions.composite .undef def
/xmenu.fulloptions .undef def
/.fulloptions.expert 0 def
/.fulloptions.acpi_off 1 def
@ -14,9 +16,9 @@
/.fulloptions.edd_on 4 def
/.fulloptions.nodmraid 5 def
/.fulloptions.nomodeset 6 def
/.fulloptions.free 7 def
/.fulloptions.nox 8 def
/.fulloptions.docache 9 def
/.fulloptions.nox 7 def
/.fulloptions.docache 8 def
/.fulloptions.nocomposite 9 def
% These strings are intentionally not translatable.
/txt_acpi_off "acpi=off" def
@ -45,9 +47,9 @@
/.fulloptions.edd_on dec
/.fulloptions.nodmraid dec
/.fulloptions.nomodeset dec
/.fulloptions.free dec
/.fulloptions.nox dec
/.fulloptions.docache dec
/.fulloptions.nocomposite dec
xmenu .xm_current .fulloptions.acpi_off put
} {
xmenu .xm_current .fulloptions.expert put
@ -57,10 +59,11 @@
is_live not { /txt_expert_mode } if
/txt_acpi_off /txt_noapic /txt_nolapic /txt_edd_on /txt_nodmraid
/txt_nomodeset
/txt_option_free
/txt_nox
/txt_docache
/txt_no_composite
] put
/fulloptions.label_no_composite true def
xmenu .xm_title /txt_other_options put
xmenu .xm_check 1 put
@ -68,10 +71,52 @@
0 1 xmenu .xm_list get length 1 sub {
xmenu .xm_allselected get exch false put
} for
pmenu.init
menu.entry fulloptions.filter
} def
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Filter displayed options when a menu item changes.
%
% ( index ) ==> ( )
%
/fulloptions.filter {
xmenu.fulloptions .undef eq { pop return } if
fulloptions.composite .undef eq { pop return } if
fulloptions.composite length 0 eq { pop return } if
menu.labels exch get
dup length 3 add string /fulloptions.tmp.label exch def
" %s " fulloptions.tmp.label sprintf
/fulloptions.label_no_composite false def
fulloptions.composite {
dup length 3 add string /fulloptions.tmp.check exch def
" %s " fulloptions.tmp.check sprintf
fulloptions.tmp.check fulloptions.tmp.label strstr 0 ne
{ /fulloptions.label_no_composite true def } if
fulloptions.tmp.check free
} forall
fulloptions.tmp.label free
xmenu
/xmenu xmenu.fulloptions def
xmenu .xm_list get free
xmenu .xm_list [
/txt_acpi_off /txt_noapic /txt_nolapic /txt_edd_on /txt_nodmraid
/txt_nomodeset
/txt_nox
/txt_docache
fulloptions.label_no_composite { /txt_no_composite } if
] put
pmenu.init
/xmenu exch def % restore
} def
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Change boot options status.
@ -96,7 +141,6 @@
over .fulloptions.nomodeset eq { pop "nomodeset" } if
over .fulloptions.nox eq { pop "nox" } if
over .fulloptions.docache eq { pop "docache" } if
over .fulloptions.free eq { pop "apt-setup/restricted=false apt-setup/multiverse=false" } if
dup {
% append new option string
dup length fulloptions.option length add 1 add string
@ -170,3 +214,14 @@
pmenu.panel.update
} def
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Get composite option
%
% ( ) => ( str )
%
/fulloptions.cmd_composite {
fulloptions.label_no_composite {
xmenu.fulloptions .xm_allselected get .fulloptions.nocomposite get { "composite:on" } { "composite:off" } ifelse
} { "" } ifelse
} def

@ -19,9 +19,9 @@
/xmenu.selected.bg 0x6c6c6c newcolor
small_layout {
/xmenu.maxlines 20 def
/xmenu.maxlines 19 def
} {
/xmenu.maxlines 20 def
/xmenu.maxlines 19 def
} ifelse
% xmenu layout

Loading…
Cancel
Save