Skip to content

Commit

Permalink
Merge pull request #4 from openSUSE/bsc_957893
Browse files Browse the repository at this point in the history
fix booting from submenu (bsc #957893)
  • Loading branch information
wfeldt committed Dec 4, 2015
2 parents 2e13876 + f10e07b commit db67638
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
11 changes: 4 additions & 7 deletions themes/openSUSE/src/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
pop

main.recalc
main.redraw
true main.redraw

"" -1 0 return
} if
Expand Down Expand Up @@ -260,7 +260,7 @@
menu.args length {
/menu.entry 0 def
main.recalc
main.redraw
true main.redraw
} {
submenu.leave submenu.build
} ifelse
Expand Down Expand Up @@ -309,7 +309,7 @@

window.action actRedraw eq {
/window.action actNothing def
main.redraw
false main.redraw
} if

window.action actRedrawPanel eq {
Expand Down Expand Up @@ -1076,10 +1076,7 @@
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% ( text ) == > ( new_text )
/menuitemmap {
% drop submenu prefix, if any
dup submenu.tag strstr 1 eq {
2 add skipnonspaces skipspaces
} if
submenu.skip_prefix
translate
config._2space {
Expand Down
15 changes: 10 additions & 5 deletions themes/openSUSE/src/menu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
/boot.splitchar 1 def
/boot.splitstr 1 string dup 0 boot.splitchar put def

/boot.update_options true def

% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Create new main window.
%
Expand Down Expand Up @@ -40,16 +42,19 @@
% Redraw main window.
% (E.g. after selecting a new language.)
%
% ( window ) ==> ( )
% ( redraw_boot_options ) ==> ( )
%
% redraw_boot_options: true|false
% redraw boot option line if true
%
/main.redraw {

% boot.drawlabels

main.drawmenu
/keepbootoptions 1 def
/boot.update_options exch def
menu.entry true MenuSelect
/keepbootoptions .undef def
/boot.update_options true def

panel.show
} def
Expand Down Expand Up @@ -126,7 +131,7 @@

free

config.nobootoptions menu.texts menu.entry get iselement
config.nobootoptions menu.texts menu.entry get submenu.skip_prefix iselement
menu.args menu.entry get submenu.tag strstr 1 eq
or
{
Expand Down Expand Up @@ -302,7 +307,7 @@

menu.status {
% init boot options
keepbootoptions .undef eq {
boot.update_options {

boot.input.preinit

Expand Down
12 changes: 12 additions & 0 deletions themes/openSUSE/src/submenu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,15 @@
} if
} def


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Skip submenu prefix, if any.
%
% ( string ) ==> ( string )
%
/submenu.skip_prefix {
dup submenu.tag strstr 1 eq {
2 add skipnonspaces skipspaces
} if
} def

0 comments on commit db67638

Please sign in to comment.