Compdigitec Labs

« | Home | »

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 | 10 Comments »

10 Responses to “Changing the application name of a GtkAboutDialog in PHP-GTK2”

  1. lottobet789 Says:
    July 3rd, 2024 at 18:45

    … [Trackback]

    […] Info on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  2. สล็อตเว็บตรง Says:
    July 6th, 2024 at 21:08

    … [Trackback]

    […] Information on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  3. จำหน่ายอะไหล่อุตสาหกรรม Says:
    July 8th, 2024 at 19:58

    … [Trackback]

    […] Information to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  4. AMBKING Says:
    August 14th, 2024 at 19:57

    … [Trackback]

    […] Find More Information here on that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  5. ลีโอ 999 Says:
    August 20th, 2024 at 19:47

    … [Trackback]

    […] Read More Information here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  6. จอ led ขนาดใหญ่ Says:
    August 22nd, 2024 at 01:34

    … [Trackback]

    […] Find More on to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  7. บริษัทรับทำเว็บไซต์ Says:
    September 5th, 2024 at 23:08

    … [Trackback]

    […] Read More Info here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  8. สล็อตเว็บตรงอันดับ 1 เล่นได้ทุกค่าย ฝากถอนไม่มีขั้นต่ำ Says:
    September 18th, 2024 at 18:33

    … [Trackback]

    […] Read More to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  9. บาคาร่าเกาหลี Says:
    September 22nd, 2024 at 21:36

    … [Trackback]

    […] Here you will find 6138 more Info to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

  10. 1906 love drops Says:
    September 24th, 2024 at 16:33

    … [Trackback]

    […] Read More here to that Topic: compdigitec.com/labs/2008/08/17/changing-the-application-name-of-a-gtkaboutdialog-in-php-gtk2/ […]

Comments