After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613972 - AboutDialog show_about_dialog() same screen as parent
AboutDialog show_about_dialog() same screen as parent
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-25 23:13 UTC by Kevin Ryde
Modified: 2010-05-16 11:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make show_about_dialog() default to the screen of the parent (1.58 KB, patch)
2010-03-25 23:13 UTC, Kevin Ryde
rejected Details | Review
using gtk_window_transient_for (1.63 KB, patch)
2010-04-13 00:24 UTC, Kevin Ryde
none Details | Review

Description Kevin Ryde 2010-03-25 23:13:49 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.
Comment 1 muppet 2010-03-25 23:42:42 UTC
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
Comment 2 Kevin Ryde 2010-03-26 00:35:50 UTC
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().
Comment 3 Kevin Ryde 2010-04-13 00:24:34 UTC
Created attachment 158565 [details] [review]
using gtk_window_transient_for

This one using transient_for the same as the gtk code.
Comment 4 Torsten Schoenfeld 2010-04-24 23:49:14 UTC
The gtk+ code also does gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE).  Should we do the same?
Comment 5 muppet 2010-05-10 02:26:36 UTC
Yes, we should.
Comment 6 Torsten Schoenfeld 2010-05-16 11:38:01 UTC
Alright, I committed a slightly modified variant of Kevin's patch.