diff options
Diffstat (limited to 'src/adapad.adb')
-rw-r--r-- | src/adapad.adb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/adapad.adb b/src/adapad.adb index d1f895f..03ace13 100644 --- a/src/adapad.adb +++ b/src/adapad.adb @@ -17,10 +17,7 @@ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; -with Ada.Text_IO; - - -function AdaPad return Integer is +function Adapad return Integer is -- forward declarations of helper functions @@ -38,9 +35,9 @@ function AdaPad return Integer is -- global state of the text editor - Editor : Editor_Window := Create (0, 0, 640, 400, "(Untitled)"); + Editor : Editor_Window := Create (800, 500); Buffer : Text_Buffer := Create; - About : About_Window := Create (250, 200); + About : About_Window := Create (350, 250); Find : Find_Window := Create (200, 100); Replace : Replace_Window := Create (200, 100); @@ -124,6 +121,8 @@ function AdaPad return Integer is Item : in out Widget'Class) is begin if not Safe_To_Discard then return; end if; + Find.Hide; + Replace.Hide; About.Hide; Editor.Hide; end Call; @@ -391,11 +390,11 @@ begin Bar.Add ("File/&Quit", Quit_CB'Access, Mod_Ctrl + 'q'); Bar.Add (Text => "&Edit", Flags => Flag_Submenu); - Bar.Add ("Edit/&Undo", Undo_CB'Access, Mod_Ctrl + 'z', Flag_Divider); + Bar.Add ("Edit/&Undo", Undo_CB'Access, Mod_Ctrl + 'z', Flag_Divider); Bar.Add ("Edit/Cu&t", Cut_CB'Access, Mod_Ctrl + 'x'); Bar.Add ("Edit/&Copy", Copy_CB'Access, Mod_Ctrl + 'c'); Bar.Add ("Edit/&Paste", Paste_CB'Access, Mod_Ctrl + 'v'); - Bar.Add ("Edit/&Delete", Delete_CB'Access, No_Key, Flag_Divider); + Bar.Add ("Edit/&Delete", Delete_CB'Access, No_Key, Flag_Divider); Bar.Add ("Edit/Select &All", Select_All_CB'Access, Mod_Ctrl + 'a'); Bar.Add (Text => "&Search", Flags => Flag_Submenu); @@ -408,10 +407,11 @@ begin Buffer.Add_Modify_Callback (Mod_CB'Access); + Editor.Set_Callback (Quit_CB'Access); Editor.Set_Buffer (Buffer); Editor.Show; return FLTK.Run; -end AdaPad; +end Adapad; |