From 4edab6c5f5cd9acf220f2acfa81d3cd05a8dc879 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 3 Jul 2016 12:51:36 +0200 Subject: Setting parent for annotation properties dialog After the last gtk+ update, the warning: "Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged." was shown whenever the annotation properties dialog was opened. The commit fixes this issue by setting this dialog transient for the main window. As a plus, the dialog is now shown always on the center of the main window. https://bugzilla.gnome.org/show_bug.cgi?id=732114 taken from: https://git.gnome.org/browse/evince/commit/?id=9533c68 --- shell/ev-window.c | 1 + 1 file changed, 1 insertion(+) (limited to 'shell') diff --git a/shell/ev-window.c b/shell/ev-window.c index 993df17e..2fb1a66c 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -7044,6 +7044,7 @@ ev_view_popup_cmd_annot_properties (GtkAction *action, return; dialog = EV_ANNOTATION_PROPERTIES_DIALOG (ev_annotation_properties_dialog_new_with_annotation (window->priv->annot)); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window)); if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_APPLY) { gtk_widget_destroy (GTK_WIDGET (dialog)); -- cgit v1.2.1