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 732114 - Gtk warning upon opening Annotation properties dialog
Gtk warning upon opening Annotation properties dialog
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: pdf annotations
git master
Other Linux
: Normal minor
: ---
Assigned To: giselle
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-23 15:39 UTC by giselle
Modified: 2014-06-24 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sets the main window as the transient parent of annotation properties dialog (5.80 KB, patch)
2014-06-23 15:42 UTC, giselle
reviewed Details | Review
Sets the annotation property dialog transient for the main window (1.20 KB, patch)
2014-06-24 14:07 UTC, giselle
committed Details | Review

Description giselle 2014-06-23 15:39:00 UTC
The following Gtk warning is shown:

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

when an annotation property window is opened. I am using the latest gtk and this happens because of this recent commit: https://mail.gnome.org/archives/commits-list/2014-May/msg00576.html
Comment 1 giselle 2014-06-23 15:42:10 UTC
Created attachment 279046 [details] [review]
Sets the main window as the transient parent of annotation properties dialog

Mimics the implementation of ev-annotation-window with respect to the 'parent' property.
Comment 2 Carlos Garcia Campos 2014-06-23 17:03:16 UTC
Review of attachment 279046 [details] [review]:

::: shell/ev-window.c
@@ +6311,3 @@
 		return;
 
+	dialog = EV_ANNOTATION_PROPERTIES_DIALOG (ev_annotation_properties_dialog_new_with_annotation (window->priv->annot, GTK_WINDOW (window)));

It's probably easier to simply call gtk_window_set_transient_for() here, no?
Comment 3 giselle 2014-06-23 17:33:57 UTC
Yes... but then if someone decides to create another property dialog somewhere else, they would have to call gtk_window_set_transient_for() before instantiating it also. With the solution I proposed, we make sure that every property dialog has always a parent. 

If you think this is unlikely to happen though, I can simplify the patch a lot :)
Comment 4 Carlos Garcia Campos 2014-06-24 13:33:33 UTC
(In reply to comment #3)
> Yes... but then if someone decides to create another property dialog somewhere
> else, they would have to call gtk_window_set_transient_for() before
> instantiating it also. With the solution I proposed, we make sure that every
> property dialog has always a parent. 
> 
> If you think this is unlikely to happen though, I can simplify the patch a lot
> :)

Yes, please, I don't think that will happen.
Comment 5 giselle 2014-06-24 14:07:37 UTC
Created attachment 279116 [details] [review]
Sets the annotation property dialog transient for the main window

Ok, this was much easier than before :)
Comment 6 Carlos Garcia Campos 2014-06-24 15:02:40 UTC
Review of attachment 279116 [details] [review]:

Nice
Comment 7 giselle 2014-06-24 16:06:45 UTC
Review of attachment 279116 [details] [review]:

Pushed, thanks!
Comment 8 giselle 2014-06-24 16:07:08 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.