By admin | August 17, 2008

For those of you who have never heard of it, a GtkAboutDialog is a convience GtkDialog to display application credits. However, the documentation (archive at 2008-08-17) for it does not specify a way to change the application’s name, and as a result ends up using the script name for the application, which is very ugly and unprofessional.

To change the application name, use the undocumented function GtkAboutDialog::set_name() to change the name. Here is an example:

 <?php $dialog = new GtkAboutDialog();$copy = "(C) Copyright 2008 Example."; $license = "GNU GPL Text would go here";$web = "http://www.example.com/"; $version = "Version 1.0";$prog = "YourExampleProg"; $desc = "A sample program to demonstrate the use of GtkAboutDialog";$dialog->set_copyright($copy);$dialog->set_license($license);$dialog->set_website($web);$dialog->set_version($version);$dialog->set_name($prog); // Use this line to set app name$dialog->set_comments($desc);$dialog->run(); \$dialog->hide(); ?>