Pastey help.e

namespace help
 
include GtkEngine.e 
include GtkAboutDialog.e 
 
constant menu = create(GtkMenuItem,"_Help"), 
  submenu = create(GtkMenu), 
    items = create(GtkMenuItem,"gtk-about",_("About")) 
 
set(menu,"submenu",submenu) 
add(submenu,items) 
add("MainWin:MenuBar",menu) 
 
---------------- 
function About() 
---------------- 
-- < you'll want to personalize the dialog here > 
-- for example, set(about:Dialog,"authors",{"You","Me","and Somebody else"}) 
-- < see GtkAboutDialog.e for the options > 
if run(about:Dialog) then hide(about:Dialog) end if 
return 1 
end function 

1. Comment by irv 1 week ago

Here's a revised version which suppresses the gtk warning about dubious parentage;

namespace help 
 
include GtkEngine.e 
include GtkAboutDialog.e 
 
constant menu = create(GtkMenuItem,"_Help"), 
  submenu = create(GtkMenu), 
    items = create(GtkMenuItem,"gtk-about",_("About")) 
 
set(menu,"submenu",submenu) 
add(submenu,items) 
add("MainWin:MenuBar",menu) 
 
constant dlg = about:Dialog 
set(dlg,"transient for",pointer("MainWin")) -- suppress gtk warning; 
 
---------------- 
function About() 
---------------- 
set(dlg,"authors",{"You","Me","Somebody"}) 
run(dlg) 
hide(dlg) 
return 1 
end function 

Search



Quick Links

User menu

Not signed in.

Help Fund OpenEuphoria

Misc Menu