GNOME Bugzilla – Bug 613972
AboutDialog show_about_dialog() same screen as parent
Last modified: 2010-05-16 11:38:01 UTC
Created attachment 157124 [details] [review] make show_about_dialog() default to the screen of the parent I wonder if Gtk2->show_about_dialog might popup the new AboutDialog on the same screen as the $parent it's given. In a multi-screen/multi-display program I think that might make most sense. If $parent is a main window running a Help/About then that screen is almost certainly where you're looking.
Review of attachment 157124 [details] [review]: This xs convenience impl was originally a copy of the C function from gtk+/gtk/gtkabout.c. If you look in there, they actually call gtk_window_set_transient_for() if you give a parent pointer. Just do what gtk+ does. :-) http://git.gnome.org/browse/gtk+/tree/gtk/gtkaboutdialog.c
Ah, I see, copied because it's hard to call a varargs. Is there a reason it's Gtk2->show_about_dialog and not Gtk2::AboutDialog->show_about_dialog? If the latter I wondered if called on a subclass like MyAboutDialogSubclass->show_about_dialog it could create an instance of the subclass, instead of always gtk_about_dialog_new().
Created attachment 158565 [details] [review] using gtk_window_transient_for This one using transient_for the same as the gtk code.
The gtk+ code also does gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE). Should we do the same?
Yes, we should.
Alright, I committed a slightly modified variant of Kevin's patch.