GtkDialog: Warn about lack of transient parents

We want make it mandatory for dialogs to have transient parents,
eventually. This is a first step in that direction.
This commit is contained in:
Matthias Clasen 2014-05-02 18:23:58 -04:00
parent 3db60baf2d
commit c4ec89cf9d

View File

@ -793,6 +793,9 @@ gtk_dialog_map (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkDialog *dialog = GTK_DIALOG (widget);
if (gtk_window_get_transient_for (window) == NULL)
g_warning ("GtkDialog mapped without a transient parent. This is discouraged.");
GTK_WIDGET_CLASS (gtk_dialog_parent_class)->map (widget);
focus = gtk_window_get_focus (window);