« Stopping the “PHP Fatal error: Internal object missing in” error in PHP-GTK2 | Home | Using UTF-8 in PHP-GTK2 »
Changing the application name of a GtkAboutDialog in PHP-GTK2
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();
?>
If you found this article helpful or useful, please help Compdigitec spread the word or leave a comment. Don’t forget to subscribe to Compdigitec Labs for more interesting articles!
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: PHP | 12 Comments »
March 30th, 2025 at 10:58
… [Trackback]
[…] Find More here on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
April 6th, 2025 at 00:12
… [Trackback]
[…] Read More on to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
April 17th, 2025 at 22:56
… [Trackback]
[…] Information to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
May 8th, 2025 at 20:45
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
May 20th, 2025 at 19:37
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
May 20th, 2025 at 22:25
… [Trackback]
[…] Find More Information here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
May 29th, 2025 at 11:58
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
June 16th, 2025 at 23:15
… [Trackback]
[…] Find More to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
June 18th, 2025 at 08:51
… [Trackback]
[…] Read More here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
June 22nd, 2025 at 23:05
… [Trackback]
[…] Find More Information here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
June 24th, 2025 at 19:31
… [Trackback]
[…] Find More here on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]
June 27th, 2025 at 08:17
… [Trackback]
[…] Read More here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]