Under ubuntu 16.04 I get the following message
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged
when I open zenity with the command
zenity --text-info --filename=<filename>
This didn't happen under 14.04. I presume that the answer is related to this post but the post doesn't explain how to implement the proposed solution. Could somebody please explain which file I should add the suggested lines to?
You fix this warning by giving the GtkDialog a parent to be modal to. The relevant functions are gtk_window_set_transient_for() (which sets this window to always be on top of, or transient for, another one) and optionally gtk_window_set_modal() to make it a modal dialog. This is ultimately what the various GtkDialog constructors do.
zenity --help-general
gives--attach=WINDOW Set the parent window to attach to
but I'm not sure how to use it (what is Window?), perhaps it will solve your problem.WINDOW_ID=$(xprop -name
echo $TITLE` | grep WM_CLIENT_LEADER | cut -d"#" -f2 | cut -c2-20)` and I then triedzenity --attach=$WINDOW_ID --text-info --filename=<filename>
but sadly I still got the warning. Too bad, but it may come in handy one day to know how to get the window id!NULL
. However I couldn'tmake install
zenity locally (I couldn't find docs or something on how to configure install) so I finaly gave up. Will have to use the dirty2>/dev/null
.