From 8b40fda0dc40ead9ddc4a9866f90ae6c379f012b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Jan 2009 17:30:38 +0000 Subject: only show the "Boot Options" entry when Fkey for "Kernel Option" is pressed the difficulty here is to workaround the "Boot Options" from dirtying the display of the panel below it. A solution would be to move the "Boot Options" upper to leave some room between it and the panel. also adding the "Kernel Option" choice for grub, since otherwise you can't edit "Boot Options" --- src/common.inc | 8 +++++++- src/dia_kernelopts.inc | 6 +++++- src/menu.inc | 12 ++++++++++-- src/panel.inc | 1 + src/window.inc | 1 + 5 files changed, 24 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common.inc b/src/common.inc index adb0052..a8251be 100644 --- a/src/common.inc +++ b/src/common.inc @@ -264,6 +264,12 @@ main.redraw } if + window.action actRedrawBootOptionsPanel eq { + /window.action actNothing def + menu.entry true MenuSelect + panel.show + } if + window.action actRedrawPanel eq { /window.action actNothing def panel.show @@ -1008,7 +1014,7 @@ /menu.bar.width menu.bar.min.width def % false: no boot options line initially - /boot.show true def + /boot.show false def } def diff --git a/src/dia_kernelopts.inc b/src/dia_kernelopts.inc index 942efb6..34b0d70 100644 --- a/src/dia_kernelopts.inc +++ b/src/dia_kernelopts.inc @@ -48,7 +48,7 @@ /kernelopts.update { /xmenu xmenu.kernelopts def - /window.action actRedrawPanel def + /window.action actRedrawBootOptionsPanel def } def @@ -60,6 +60,10 @@ /panel.kernelopts { "main" help.setcontext + boot.show not { + /boot.show true def + } if + window.xmenu dup .xmenu xmenu.kernelopts put dup .xmenu.update /kernelopts.update put diff --git a/src/menu.inc b/src/menu.inc index d473cb8..2f957c1 100644 --- a/src/menu.inc +++ b/src/menu.inc @@ -84,7 +84,10 @@ % ( ) == > ( ) % /boot.input.setup { - % boot.show not { return } if + % HACK: we do not need to do this function if not boot.show, + % and since we have some ugly overlap of bootoptions on the panel + % we really do not want to do it if not really useful + boot.show not { return } if boot.ed.list { dup .inp_x get over .inp_y get boot.ed.height add moveto @@ -158,7 +161,12 @@ edit.done } ifelse } forall - boot.ed.list boot.window .ed.focus get get dup .inp_show get { edit.showcursor } { pop } ifelse + boot.ed.list boot.window .ed.focus get get dup .inp_show get { + edit.showcursor + % HACK: there is some ugly overlap of bootoptions on the panel + % so force to redraw the panel after displaying bootoptions + panel.show + } { pop } ifelse boot.ed.list { dup .inp_show get .inp_visible exch put diff --git a/src/panel.inc b/src/panel.inc index c559c23..3fa078a 100644 --- a/src/panel.inc +++ b/src/panel.inc @@ -77,6 +77,7 @@ } { [ keyF2 0 "F2" /panel.lang /panel.lang.width /panel.lang.update /lang.init ] + [ keyF3 0 "F3" /panel.kernelopts /panel.kernelopts.width /panel.kernelopts.update /kernelopts.init ] "profiles" findfile dup { /profile.data exch def [ keyF3 0 "F3" /panel.profile /panel.profile.width /panel.profile.update /profile.init ] diff --git a/src/window.inc b/src/window.inc index a151a8d..2bc6c2d 100644 --- a/src/window.inc +++ b/src/window.inc @@ -113,6 +113,7 @@ /actInstallOK 9 def /actInstallCancel 10 def /actReboot 11 def +/actRedrawBootOptionsPanel 12 def /actNoClose 0x100 def -- cgit v1.2.1