GtkDialog mapped without a transient parent

前端 未结 2 1337
庸人自扰
庸人自扰 2020-12-04 19:43

I have a GUI built in Glade (3.18) which is called by a Python 3 program (using PyGObject). I get a lot of warnings when running the program (Fedora 21) that say:

         


        
相关标签:
2条回答
  • 2020-12-04 20:09

    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.

    0 讨论(0)
  • 2020-12-04 20:18

    Use a GtkWindow instead; and use a GtkDialog only when there is a parent window/dialog.

    0 讨论(0)
提交回复
热议问题