Re: url doesn't show properly on first GtkAboutDialog creation with set_url_hook
| From: | Steph Fox | Date: | Fri, 08 Sep 2006 15:35:10 +0000 |
| Subject: | Re: url doesn't show properly on first GtkAboutDialog creation with set_url_hook | ||
| References: | 1 2 3 4 5 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-3403@lists.php.net to get a copy of this message | ||
It was just a throwaway thought, I haven't looked at 'how' yet... (you'll know when I have time because the manual notes will spring into action :)
Uh, how? In MSHUTDOWN? -Andrei On Sep 7, 2006, at 8:37 PM, Steph Fox wrote:Can't we make that automatic behaviour?-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.comThe Gtk+ API docs are misleading on this one. They make it sound that the destroy function will be back to clean up the custom data, but it's only called when set_url_hook() is called! So the solution is to call GtkAboutDialog::set_url_hook(null) after the dialog is closed or at the end of your program. -Andrei On Sep 7, 2006, at 7:07 AM, Christian Weiske wrote:-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpElizabeth,-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.comGtkAboutDialog has a problem when using set_url_hook The first time the GtkAboutDialog is created the url is not shown correctly (clickable), but the second time a GtkAboutDialog is created (and every subsequent time), it is shown correctly.It has no problem. 1. URL hooks in the about dialog are global, and set_url_hook is static 2. You need to call the hook setup before setting the website. This also solves your problem. Nevertheless, we have a memleak here. [Thu Sep 7 16:06:56 2006] Script: 'abouthook.phpw' /data/cvs/phpgtk2/php-gtk/main/php_gtk.h(98) : Freeing 0x08EF18F4 (36 bytes), script=abouthook.phpw [Thu Sep 7 16:06:56 2006] Script: 'abouthook.phpw' /data/cvs/phpgtk2/php-gtk/main/php_gtk.h(95) : Freeing 0x08EF18B4 (16 bytes), script=abouthook.phpw [Thu Sep 7 16:06:56 2006] Script: 'abouthook.phpw' /data/cvs/php/php-5.1.4/Zend/zend_variables.h(45) : Freeing 0x08EF0084 (9 bytes), script=abouthook.phpw /data/cvs/php/php-5.1.4/Zend/zend_variables.c(120) : Actual location (location was relayed) [Thu Sep 7 16:06:56 2006] Script: 'abouthook.phpw' /data/cvs/php/php-5.1.4/Zend/zend_vm_execute.h(1766) : Freeing 0x08EF06AC (16 bytes), script=abouthook.phpw === Total 4 memory leaks detected === -- Regards/MfG, Christian Weiske