aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog4
-rw-r--r--e-util/e-dialog-utils.c18
-rw-r--r--e-util/e-dialog-utils.h8
3 files changed, 28 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index fed6610258..6a41fd9f8e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,7 @@
+2001-10-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-dialog-utils.c (e_set_dialog_parent_from_xid): New.
+
2001-10-12 Chris Toshok <toshok@ximian.com>
* e-passwords.h: new parameter to e_passwords_init, and add
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index 0a6bf13386..68f0abfde8 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -147,3 +147,21 @@ e_set_dialog_parent (GtkWindow *dialog,
gdk_window = gdk_window_foreign_new (xid);
set_transient_for_gdk (dialog, gdk_window);
}
+
+/**
+ * e_set_dialog_parent_from_xid:
+ * @dialog:
+ * @xid:
+ *
+ * Like %e_set_dialog_parent_from_xid, but use an XID to specify the parent
+ * window.
+ **/
+void
+e_set_dialog_parent_from_xid (GtkWindow *dialog,
+ Window xid)
+{
+ g_return_if_fail (dialog != NULL);
+ g_return_if_fail (GTK_IS_WINDOW (dialog));
+
+ set_transient_for_gdk (dialog, gdk_window_foreign_new (xid));
+}
diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h
index 578ea0d585..b92808d386 100644
--- a/e-util/e-dialog-utils.h
+++ b/e-util/e-dialog-utils.h
@@ -27,7 +27,11 @@
#include <gtk/gtkwindow.h>
#include <gtk/gtkwidget.h>
-void e_set_dialog_parent (GtkWindow *dialog,
- GtkWidget *parent_widget);
+#include <X11/Xlib.h> /* Window */
+
+void e_set_dialog_parent (GtkWindow *dialog,
+ GtkWidget *parent_widget);
+void e_set_dialog_parent_from_xid (GtkWindow *dialog,
+ Window xid);
#endif