Gtk2->show_about_dialog() bug



Hi everyone,

The behaviour of GtkAboutDialogs was changed between 2.8 and 2.10 - developers are now required to set up a callback to hide the dialog when the user clicks on the "close" button. This brings the dialog into line with the others and isn't such a problem.

However, because the gtk_show_about_dialog() function returns void, the dialog that this function creates *does* have the auto-hide behaviour, because there's no way for the developer to access the dialog to connect to its signals.

The following C program shows an about dialog which disappears when the "close" button is clicked:

/* compile with
* cc `pkg-config --cflags --libs gtk+-2.0` test.c -o test
*/

#include <gtk/gtk.h>

int main(int argc, char *argv[]) {

gtk_init(&argc, &argv);

gtk_show_about_dialog(NULL, "name", "test", NULL);

gtk_main();

}
This Perl program does the same, but the dialog doesn't close:

#!/usr/bin/perl
use Gtk2 -init;

Gtk2->show_about_dialog(
undef,
'name' => 'test'
);

Gtk2->main;

Confirmed on FC6 and Ubuntu.

Gavin.

--
http://jodrell.net/

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]