X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fsample.adb;h=648036f74a0bc017a477e28660984ec114942885;hp=0e4455687ab6bea50aaab690c43c333863d9fca4;hb=687aeec3e382083652c3bb2e94fb6d3bf101a1f9;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/Ada95/samples/sample.adb b/Ada95/samples/sample.adb index 0e445568..648036f7 100644 --- a/Ada95/samples/sample.adb +++ b/Ada95/samples/sample.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- Copyright (c) 1998,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -34,9 +34,9 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.13 $ +-- $Revision: 1.17 $ +-- $Date: 2008/09/27 14:42:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Text_IO; @@ -111,7 +111,7 @@ package body Sample is if K = QUIT then return True; elsif K = SELECT_ITEM then - if Idx in 1 .. 4 then + if Idx <= 4 then Hide (Pan); Update_Panels; end if; @@ -122,7 +122,7 @@ package body Sample is when 4 => Sample.Text_IO_Demo.Demo; when others => null; end case; - if Idx in 1 .. 4 then + if Idx <= 4 then Top (Pan); Show (Pan); Update_Panels; @@ -191,7 +191,7 @@ package body Sample is Set_Soft_Label_Key_Attributes (Color => Header_Color); -- This propagates the attributes to the label window - Clear_Soft_Label_Keys; Restore_Soft_Label_Keys; + Refresh_Soft_Label_Keys; end if; Init_Keyboard_Handler; @@ -205,6 +205,7 @@ package body Sample is -- We have some fixed key throughout this sample Main_Menu; End_Windows; + Curses_Free_All; exception when Event : others =>