Pastey filemenu.e

namespace file_menu
constant tips = { -- here's what happens when items on this menu are called; 
 "Open an existing database file", 
 "Select an opened database file", 
 "Close the currently selected database file", 
 "Create a new database file", 
 "Rename the current database file", 
 "Delete the current database file", 
 "Set system-wide preferences", 
 "Save files and exit the program" 
include GtkEngine.e 
--include file_funcs.e -- for Open, Select, Close, etc... 
--include prefs.e      -- for SetPreferences 
constant menu = create(GtkMenuItem,"_Database"),  
 submenu = create(GtkMenu), 
    items = 
    & create(GtkMenuItem,"gtk-apply#_Select",_("Select")) 
    & create(GtkMenuItem,"gtk-close",_("Close")) 
    & create(GtkSeparatorMenuItem) 
    & create(GtkMenuItem,"gtk-new",_("New")) 
    & create(GtkMenuItem,"filesaveas#_Rename",_("Rename")) 
    & create(GtkMenuItem,"gtk-delete",_("Delete")) 
    & create(GtkSeparatorMenuItem) 
    & create(GtkMenuItem,"preferences-system#_Preferences",_("SetPreferences")) 
    & create(GtkSeparatorMenuItem) 
    & create(GtkMenuItem,"gtk-quit",_("BailOut")) 
 for i = 1 to length(tips) do 
   set(items[i],"tooltip text",tips[i]) 
 end for 

1. Comment by irv 1 week ago

OOPS! this should be saved as file_menu.e, not filemenu.e - sorry for the wrong title for the pastry.

2. Comment by irv 1 week ago

include file_funcs.e and include prefs.e are commented out in order to test the user-interface.


Quick Links

User menu

Not signed in.

Help Fund OpenEuphoria

Misc Menu