phpide_Dialog_Generic(dirname(__FILE__)."/about_dialog.glade"); foreach(array( "credits" => APPDIR . "CREDITS", "about" => APPDIR . "docs/about.txt", "changelog" => APPDIR . "ChangeLog" ) as $wn => $file) { $w = $this->widget->get_widget($wn); $w->connect("pressed",array(&$this,"load_file"), $file); } } function show() { $this->load_file(NULL, APPDIR . "docs/about.txt"); $this->__show(); } function load_file($widget,$file) { $d = implode("",file($file)); $w = $this->widget->get_widget("display_text"); $w->delete_text(0,-1); $w->insert_text($d,0); } } ?>