[gtk+] GtkDialog: Warn about lack of transient parents
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkDialog: Warn about lack of transient parents
- Date: Fri, 2 May 2014 22:24:55 +0000 (UTC)
commit c4ec89cf9d296c60513f61aaba88415b8f0fd81f
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 2 18:23:58 2014 -0400
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.
gtk/gtkdialog.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 73ae618..bf41fb4 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]