aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-26 00:28:33 +0800
committerDan Winship <danw@src.gnome.org>2003-03-26 00:28:33 +0800
commit264ed440fda26153d23487e8fa6e169ab61706ef (patch)
tree4ef92a7b60ad6a6ec6dfe172f7553fde1f377cea /e-util
parent4670b852ed91512def9755baea4dc8615178b8e4 (diff)
downloadgsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar.gz
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar.bz2
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar.lz
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar.xz
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.tar.zst
gsoc2013-evolution-264ed440fda26153d23487e8fa6e169ab61706ef.zip
(e_dialog_set_transient_for_xid): #ifdef out gtk 2.2 api usage
svn path=/trunk/; revision=20505
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog1
-rw-r--r--e-util/e-dialog-utils.c13
2 files changed, 11 insertions, 3 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 3018e6a2fb..07a25faf12 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -8,6 +8,7 @@
deprecated and only used in one place.
(e_file_dialog_save): Make this use GtkMessageDialog instead of
GnomeDialog
+ (e_dialog_set_transient_for_xid): #ifdef out gtk 2.2 api usage
2003-03-25 Not Zed <NotZed@Ximian.com>
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index 173526c46b..a37519297e 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -196,7 +196,9 @@ void
e_dialog_set_transient_for_xid (GtkWindow *dialog,
GdkNativeWindow xid)
{
+#ifdef GDK_MULTIHEAD_SAFE
GdkDisplay *display;
+#endif
GdkWindow *parent;
g_return_if_fail (GTK_IS_WINDOW (dialog));
@@ -208,12 +210,17 @@ e_dialog_set_transient_for_xid (GtkWindow *dialog,
return;
}
+#ifdef GDK_MULTIHEAD_SAFE
display = gdk_drawable_get_display (GDK_DRAWABLE (GTK_WIDGET (dialog)->window));
parent = gdk_window_lookup_for_display (display, xid);
- if (!parent) {
+ if (!parent)
parent = gdk_window_foreign_new_for_display (display, xid);
- g_return_if_fail (parent != NULL);
- }
+#else
+ parent = gdk_window_lookup (xid);
+ if (!parent)
+ parent = gdk_window_foreign_new (xid);
+#endif
+ g_return_if_fail (parent != NULL);
gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, parent);
}