-----------------------------------
-- RecentChooser
-----------------------------------
include GtkEngine.e
include std/dll.e

constant rcdlg = create(GtkRecentChooserDialog, "Recently Done Stuff")
constant btn_ok = get(rcdlg,"add_button","gtk-ok",1)
constant btn_can = get(rcdlg,"add_button","gtk-cancel",0)

constant win = create(GtkWindow)
	connect(win,"destroy",quit)
	set(win,"default size",200,200)
	set(win,"position",GTK_WIN_POS_CENTER)

function Foo(atom ctl, atom input)
	if run(rcdlg) = 1 then 
		-- ok clicked
	end if
return 0
end function
constant foo = call_back(routine_id("Foo"))

constant panel = create(GtkVBox)
	add(win,panel)

constant lbl = create(GtkLabel,"Click ok to see\nrecent documents")
	add(panel,lbl)

constant btnbox = create(GtkHButtonBox)
	pack(panel,-btnbox)

constant btn1 = create(GtkButton,"gtk-quit")
	connect(btn1,"clicked",quit)

constant btn2 = create(GtkButton,"gtk-ok")
	connect(btn2,"clicked",foo)

	add(btnbox,{btn1,btn2})

show_all(win)
main()

---------------------------------------------------------------
-- Copyright 2009 by Irv Mullins - code released under the LGPL
---------------------------------------------------------------