-MD5 ffe911b1f7f634445901098bc479d972 ChangeLog 920
-RMD160 0cc7829d7ff6e6702455efb94a06ed3f287c5874 ChangeLog 920
-SHA256 c927d6d26c22ea533de775e3f48dbb7fd4a086ade2bc132b747dff9af33e51f3 ChangeLog 920
-MD5 613f0f5f1de07b21a413442830deebb3 ekiga-2.0.1.ebuild 2854
-RMD160 868e37af02e3b4adb8c93f8024cabecad871edbd ekiga-2.0.1.ebuild 2854
-SHA256 0d563cc52bef56d5987f7d799fd8091c763c95867748da5f6c6b4a7d24866324 ekiga-2.0.1.ebuild 2854
-MD5 0483cc844936ac12c35db48d7b0186a3 files/digest-ekiga-2.0.1 238
-RMD160 125ce44db4306d3e3499f0f0e3095b0ff8903189 files/digest-ekiga-2.0.1 238
-SHA256 cb352afaeb56243c6aa58b0dd8b4c91a3dd562e2da62edd8941ca34027082645 files/digest-ekiga-2.0.1 238
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX ekiga-1.99.0-configure.patch 669 RMD160 fa6cfdb6f1613e63b3af9a60d4f14b0260bae2db SHA1 c7f05a63821c2f890f6bc4dc9b3a848500833e7d SHA256 5c8ffcb27ebf51a0f39ae866e8b9637f56bad8fe113adb6122da4d973d55dd80
MD5 683dfd499a4dd803dd3cb8797a4d0efe files/ekiga-1.99.0-configure.patch 669
RMD160 fa6cfdb6f1613e63b3af9a60d4f14b0260bae2db files/ekiga-1.99.0-configure.patch 669
SHA256 5c8ffcb27ebf51a0f39ae866e8b9637f56bad8fe113adb6122da4d973d55dd80 files/ekiga-1.99.0-configure.patch 669
+AUX ekiga-eggtrayicon-transparency.diff 2960 RMD160 9303bf9c0dcb2f666b88622a772540136f0a63df SHA1 d8a7b866ba119d286899f19a3ddb618f117398de SHA256 9cf235b64f1201e0119a55c76db6d1c243abb971757e5d781aa95c3724138e37
+MD5 e95dae90fcf9265a2524c7677f95078c files/ekiga-eggtrayicon-transparency.diff 2960
+RMD160 9303bf9c0dcb2f666b88622a772540136f0a63df files/ekiga-eggtrayicon-transparency.diff 2960
+SHA256 9cf235b64f1201e0119a55c76db6d1c243abb971757e5d781aa95c3724138e37 files/ekiga-eggtrayicon-transparency.diff 2960
+AUX ekiga-eggtrayicon-update.diff 13969 RMD160 159f1164516362b90ef8e63988ba5fa77c544e13 SHA1 edc6809219a312483f2f8c77f07a0d88a2ce5cff SHA256 1db286369b81677d559b38261ce5f6686de41e3d645808f7ecb57cee6eaf82d6
+MD5 0e220d738a307a500dfa319430a63c73 files/ekiga-eggtrayicon-update.diff 13969
+RMD160 159f1164516362b90ef8e63988ba5fa77c544e13 files/ekiga-eggtrayicon-update.diff 13969
+SHA256 1db286369b81677d559b38261ce5f6686de41e3d645808f7ecb57cee6eaf82d6 files/ekiga-eggtrayicon-update.diff 13969
+DIST ekiga-2.0.1.tar.gz 5572709 RMD160 bce9ffd65c880b1d38240b2662e171e39e525eb9 SHA1 3687152aae6e0debe9b2ea129158b72ef6318a7b SHA256 af0a37f30f2c03126ce387c4f7348e23f8fa107664b387576e42faf3a862a8f4
+DIST ekiga-2.0.2.tar.gz 6023172 RMD160 9114c36a2d1f9f914fe154b113e2b9edc6b784b3 SHA1 668f1b7229e09f962114b1be9996ec1c53ab758e SHA256 bdb883369e6666c8663323ee737a30d7cbf2aa0e03324f2fe9d5f58abfd6cae5
+EBUILD ekiga-2.0.1.ebuild 2854 RMD160 868e37af02e3b4adb8c93f8024cabecad871edbd SHA1 4276ea850062992f9df97ec1237e362009182a8a SHA256 0d563cc52bef56d5987f7d799fd8091c763c95867748da5f6c6b4a7d24866324
+MD5 613f0f5f1de07b21a413442830deebb3 ekiga-2.0.1.ebuild 2854
+RMD160 868e37af02e3b4adb8c93f8024cabecad871edbd ekiga-2.0.1.ebuild 2854
+SHA256 0d563cc52bef56d5987f7d799fd8091c763c95867748da5f6c6b4a7d24866324 ekiga-2.0.1.ebuild 2854
+EBUILD ekiga-2.0.2.ebuild 3019 RMD160 fd6478b3a485dbed96eb307ac3a503472a461a7b SHA1 caf4b5276494e7a37e434b4901b61ad00bce1ed3 SHA256 c36dbe750a2486995507af477dba8baeb72750ca4b61c1fbf902afb2c51ac99f
+MD5 23de0a1ca700c1d46b2d2c75a28c5fb1 ekiga-2.0.2.ebuild 3019
+RMD160 fd6478b3a485dbed96eb307ac3a503472a461a7b ekiga-2.0.2.ebuild 3019
+SHA256 c36dbe750a2486995507af477dba8baeb72750ca4b61c1fbf902afb2c51ac99f ekiga-2.0.2.ebuild 3019
+MISC ChangeLog 1219 RMD160 20cad069ce3453ad0006e5054f7f5386aab0c305 SHA1 0f06409c4537db0e0500485971c99ff553d2ed72 SHA256 7da0c5d085ef56def79fbed7ca658cba04f3a18febf5441a6e51c3c10a12927f
+MD5 2642074ea8962b680281957f9e0c9365 ChangeLog 1219
+RMD160 20cad069ce3453ad0006e5054f7f5386aab0c305 ChangeLog 1219
+SHA256 7da0c5d085ef56def79fbed7ca658cba04f3a18febf5441a6e51c3c10a12927f ChangeLog 1219
+MISC metadata.xml 157 RMD160 cb900ea8bf389b8f6147746711462b5757752b16 SHA1 bbbbd897cfe8d8bac785b23bead8e185871055bd SHA256 6759dc127ff53f85505b9b455ba325e65015b694b1ec50eb99ddfc8903b967bf
MD5 b334f14db95c08e71ab02ffd5d712607 metadata.xml 157
RMD160 cb900ea8bf389b8f6147746711462b5757752b16 metadata.xml 157
SHA256 6759dc127ff53f85505b9b455ba325e65015b694b1ec50eb99ddfc8903b967bf metadata.xml 157
+MD5 0483cc844936ac12c35db48d7b0186a3 files/digest-ekiga-2.0.1 238
+RMD160 125ce44db4306d3e3499f0f0e3095b0ff8903189 files/digest-ekiga-2.0.1 238
+SHA256 cb352afaeb56243c6aa58b0dd8b4c91a3dd562e2da62edd8941ca34027082645 files/digest-ekiga-2.0.1 238
+MD5 79e65ffd6c3eeccacd6660b5bde2f6a2 files/digest-ekiga-2.0.2 238
+RMD160 9e1b38a77585e471f5985896359f80477e5bbb26 files/digest-ekiga-2.0.2 238
+SHA256 5c05718ca76835bb7548e48aff036dbecb54b43fbff3d597cea8fe344cd53efb files/digest-ekiga-2.0.2 238
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.3 (GNU/Linux)
+
+iD8DBQFEhcVdNJowsmZ/PzARAnagAJ9pTVdtUNfn6VCOJxDz3kIQzSKw5QCeL+KA
+YYEzrr8X4kgxHdYtj83Wvb8=
+=pUSY
+-----END PGP SIGNATURE-----
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ekiga/ekiga-2.0.2.ebuild,v 1.1 2006/06/06 18:11:36 genstef Exp $
+
+inherit gnome2 eutils flag-o-matic
+
+DESCRIPTION="H.323 and SIP VoIP softphone"
+HOMEPAGE="http://www.ekiga.org/"
+SRC_URI="http://www.ekiga.org/includes/clicks_counter.php?http://www.ekiga.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="avahi dbus doc gnome ipv6 sdl ssl"
+
+RDEPEND="~dev-libs/pwlib-1.10.1
+ ~net-libs/opal-2.2.2
+ >=net-nds/openldap-2.0.0
+ >=x11-libs/gtk+-2.4.0
+ >=dev-libs/glib-2.0.0
+ >=dev-libs/libxml2-2.6.1
+ ssl? ( >=dev-libs/openssl-0.9.6g )
+ sdl? ( >=media-libs/libsdl-1.2.4 )
+ dbus? ( >=sys-apps/dbus-0.61 )
+ avahi? ( net-dns/avahi )
+ gnome? ( >=gnome-base/libbonoboui-2.2.0
+ >=gnome-base/libbonobo-2.2.0
+ >=gnome-base/libgnomeui-2.2.0
+ >=gnome-base/libgnome-2.2.0
+ >=gnome-base/gnome-vfs-2.2.0
+ >=gnome-base/gconf-2.2.0
+ >=gnome-base/orbit-2.5.0
+ gnome-extra/evolution-data-server
+ >=media-sound/esound-0.2.28
+ doc? ( app-text/gnome-doc-utils ) )"
+
+
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ >=dev-util/pkgconfig-0.12.0
+ >=dev-util/intltool-0.20
+ gnome? ( app-text/scrollkeeper )"
+
+pkg_setup() {
+ if ! built_with_use dev-libs/pwlib ldap; then
+ einfo "You need to build dev-libs/pwlib with USE=ldap enabled."
+ die "Pwlib w/o ldap-support detected."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ # Fix configure to install schemafile into the proper directory
+ epatch ${FILESDIR}/${PN}-1.99.0-configure.patch
+ epatch ${FILESDIR}/${PN}-eggtrayicon-update.diff
+ epatch ${FILESDIR}/${PN}-eggtrayicon-transparency.diff
+}
+
+src_compile() {
+ local myconf
+
+ # filter -O3, causes trouble with plugins (bug #88710)
+ replace-flags -O3 -O2
+
+ # don't touch! yes, it works this way.
+ # no, changing to use_enable / use_with breaks it
+ #
+ if use ssl; then
+ myconf="${myconf} --with-openssl-libs=/usr/lib"
+ myconf="${myconf} --with-openssl-includes=/usr/include/openssl"
+ fi
+
+ use sdl \
+ && myconf="${myconf} --with-sdl-prefix=/usr" \
+ || myconf="${myconf} --disable-sdltest"
+
+ use gnome \
+ || myconf="${myconf} --disable-gnome --disable-scrollkeeper --disable-schemas-install"
+
+ use dbus \
+ && myconf="${myconf} --enable-dbus"
+
+ use avahi \
+ || myconf="${myconf} --disable-avahi"
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable doc) \
+ ${myconf} || die "configure failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ if use gnome; then
+ gnome2_src_install
+ else
+ make DESTDIR=${D} install || die "make install failed"
+ rm -rf ${D}/usr/lib/bonobo
+
+ dodoc AUTHORS ChangeLog COPYING README INSTALL NEWS FAQ TODO
+ fi
+}
+
+pkg_postinst() {
+ if use gnome; then
+ gnome2_pkg_postinst
+ # we need to fix the GConf permissions, see bug #59764
+ # <obz@gentoo.org>
+ einfo "Fixing GConf permissions for ekiga"
+ ekiga-config-tool --fix-permissions
+ fi
+}
+
+DOCS="AUTHORS ChangeLog COPYING README INSTALL NEWS FAQ TODO"
--- /dev/null
+Index: eggtrayicon.c
+===================================================================
+RCS file: /cvs/gnome/libegg/libegg/tray/eggtrayicon.c,v
+retrieving revision 1.8
+diff -u -r1.8 eggtrayicon.c
+--- lib/gui/gmtray/eggtrayicon.c 16 Jun 2005 13:27:40 -0000 1.8
++++ lib/gui/gmtray/eggtrayicon.c 22 Feb 2006 21:35:25 -0000
+@@ -67,6 +67,9 @@
+ static void egg_tray_icon_realize (GtkWidget *widget);
+ static void egg_tray_icon_unrealize (GtkWidget *widget);
+
++static void egg_tray_icon_add (GtkContainer *container,
++ GtkWidget *widget);
++
+ #ifdef GDK_WINDOWING_X11
+ static void egg_tray_icon_update_manager_window (EggTrayIcon *icon,
+ gboolean dock_if_realized);
+@@ -113,6 +116,7 @@
+ {
+ GObjectClass *gobject_class = (GObjectClass *)klass;
+ GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
++ GtkContainerClass *container_class = (GtkContainerClass *)klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+@@ -121,6 +125,8 @@
+ widget_class->realize = egg_tray_icon_realize;
+ widget_class->unrealize = egg_tray_icon_unrealize;
+
++ container_class->add = egg_tray_icon_add;
++
+ g_object_class_install_property (gobject_class,
+ PROP_ORIENTATION,
+ g_param_spec_enum ("orientation",
+@@ -367,6 +373,36 @@
+
+ #endif
+
++static gboolean
++transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
++{
++ gdk_window_clear_area (widget->window, event->area.x, event->area.y,
++ event->area.width, event->area.height);
++ return FALSE;
++}
++
++static void
++make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
++ gpointer user_data)
++{
++ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++}
++
++static void
++make_transparent (GtkWidget *widget, gpointer user_data)
++{
++ if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
++ return;
++
++ gtk_widget_set_app_paintable (widget, TRUE);
++ gtk_widget_set_double_buffered (widget, FALSE);
++ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++ g_signal_connect (widget, "expose_event",
++ G_CALLBACK (transparent_expose_event), NULL);
++ g_signal_connect_after (widget, "style_set",
++ G_CALLBACK (make_transparent_again), NULL);
++}
++
+ static void
+ egg_tray_icon_realize (GtkWidget *widget)
+ {
+@@ -381,6 +417,8 @@
+ if (GTK_WIDGET_CLASS (parent_class)->realize)
+ GTK_WIDGET_CLASS (parent_class)->realize (widget);
+
++ make_transparent (widget, NULL);
++
+ screen = gtk_widget_get_screen (widget);
+ display = gdk_screen_get_display (screen);
+ xdisplay = gdk_x11_display_get_xdisplay (display);
+@@ -411,6 +449,14 @@
+ gdk_window_add_filter (root_window,
+ egg_tray_icon_manager_filter, icon);
+ #endif
++}
++
++static void
++egg_tray_icon_add (GtkContainer *container, GtkWidget *widget)
++{
++ g_signal_connect (widget, "realize",
++ G_CALLBACK (make_transparent), NULL);
++ GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
+ }
+
+ EggTrayIcon *
--- /dev/null
+--- lib/gui/gmtray/eggtrayicon.c 2006-01-07 09:25:47.000000000 +0100
++++ lib/gui/gmtray/eggtrayicon.c 2006-06-03 01:00:21.000000000 +0200
+@@ -18,22 +18,60 @@
+ * Boston, MA 02111-1307, USA.
+ */
+
++#include <config.h>
+ #include <string.h>
+-#ifndef WIN32
++#include <libintl.h>
++
++#include "eggtrayicon.h"
++
++#include <gdkconfig.h>
++#if defined (GDK_WINDOWING_X11)
+ #include <gdk/gdkx.h>
++#include <X11/Xatom.h>
++#elif defined (GDK_WINDOWING_WIN32)
++#include <gdk/gdkwin32.h>
++#endif
++
++#ifndef EGG_COMPILATION
++#ifndef _
++#define _(x) dgettext (GETTEXT_PACKAGE, x)
++#define N_(x) x
++#endif
++#else
++#define _(x) x
++#define N_(x) x
+ #endif
+-#include "eggtrayicon.h"
+
+ #define SYSTEM_TRAY_REQUEST_DOCK 0
+ #define SYSTEM_TRAY_BEGIN_MESSAGE 1
+ #define SYSTEM_TRAY_CANCEL_MESSAGE 2
++
++#define SYSTEM_TRAY_ORIENTATION_HORZ 0
++#define SYSTEM_TRAY_ORIENTATION_VERT 1
++
++enum {
++ PROP_0,
++ PROP_ORIENTATION
++};
+
+ static GtkPlugClass *parent_class = NULL;
+
+ static void egg_tray_icon_init (EggTrayIcon *icon);
+ static void egg_tray_icon_class_init (EggTrayIconClass *klass);
+
+-static void egg_tray_icon_update_manager_window (EggTrayIcon *icon);
++static void egg_tray_icon_get_property (GObject *object,
++ guint prop_id,
++ GValue *value,
++ GParamSpec *pspec);
++
++static void egg_tray_icon_realize (GtkWidget *widget);
++static void egg_tray_icon_unrealize (GtkWidget *widget);
++
++#ifdef GDK_WINDOWING_X11
++static void egg_tray_icon_update_manager_window (EggTrayIcon *icon,
++ gboolean dock_if_realized);
++static void egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon);
++#endif
+
+ GType
+ egg_tray_icon_get_type (void)
+@@ -65,6 +103,7 @@
+ egg_tray_icon_init (EggTrayIcon *icon)
+ {
+ icon->stamp = 1;
++ icon->orientation = GTK_ORIENTATION_HORIZONTAL;
+
+ gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
+ }
+@@ -72,7 +111,105 @@
+ static void
+ egg_tray_icon_class_init (EggTrayIconClass *klass)
+ {
++ GObjectClass *gobject_class = (GObjectClass *)klass;
++ GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
++
+ parent_class = g_type_class_peek_parent (klass);
++
++ gobject_class->get_property = egg_tray_icon_get_property;
++
++ widget_class->realize = egg_tray_icon_realize;
++ widget_class->unrealize = egg_tray_icon_unrealize;
++
++ g_object_class_install_property (gobject_class,
++ PROP_ORIENTATION,
++ g_param_spec_enum ("orientation",
++ _("Orientation"),
++ _("The orientation of the tray."),
++ GTK_TYPE_ORIENTATION,
++ GTK_ORIENTATION_HORIZONTAL,
++ G_PARAM_READABLE));
++
++#if defined (GDK_WINDOWING_X11)
++ /* Nothing */
++#elif defined (GDK_WINDOWING_WIN32)
++ g_warning ("Port eggtrayicon to Win32");
++#else
++ g_warning ("Port eggtrayicon to this GTK+ backend");
++#endif
++}
++
++static void
++egg_tray_icon_get_property (GObject *object,
++ guint prop_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ EggTrayIcon *icon = EGG_TRAY_ICON (object);
++
++ switch (prop_id)
++ {
++ case PROP_ORIENTATION:
++ g_value_set_enum (value, icon->orientation);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++#ifdef GDK_WINDOWING_X11
++
++static void
++egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
++{
++ Display *xdisplay;
++ Atom type;
++ int format;
++ union {
++ gulong *prop;
++ guchar *prop_ch;
++ } prop = { NULL };
++ gulong nitems;
++ gulong bytes_after;
++ int error, result;
++
++ g_assert (icon->manager_window != None);
++
++ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
++
++ gdk_error_trap_push ();
++ type = None;
++ result = XGetWindowProperty (xdisplay,
++ icon->manager_window,
++ icon->orientation_atom,
++ 0, G_MAXLONG, FALSE,
++ XA_CARDINAL,
++ &type, &format, &nitems,
++ &bytes_after, &(prop.prop_ch));
++ error = gdk_error_trap_pop ();
++
++ if (error || result != Success)
++ return;
++
++ if (type == XA_CARDINAL)
++ {
++ GtkOrientation orientation;
++
++ orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ?
++ GTK_ORIENTATION_HORIZONTAL :
++ GTK_ORIENTATION_VERTICAL;
++
++ if (icon->orientation != orientation)
++ {
++ icon->orientation = orientation;
++
++ g_object_notify (G_OBJECT (icon), "orientation");
++ }
++ }
++
++ if (prop.prop)
++ XFree (prop.prop);
+ }
+
+ static GdkFilterReturn
+@@ -85,19 +222,53 @@
+ xev->xclient.message_type == icon->manager_atom &&
+ xev->xclient.data.l[1] == icon->selection_atom)
+ {
+- egg_tray_icon_update_manager_window (icon);
++ egg_tray_icon_update_manager_window (icon, TRUE);
+ }
+ else if (xev->xany.window == icon->manager_window)
+ {
++ if (xev->xany.type == PropertyNotify &&
++ xev->xproperty.atom == icon->orientation_atom)
++ {
++ egg_tray_icon_get_orientation_property (icon);
++ }
+ if (xev->xany.type == DestroyNotify)
+ {
+- egg_tray_icon_update_manager_window (icon);
++ egg_tray_icon_manager_window_destroyed (icon);
+ }
+ }
+-
+ return GDK_FILTER_CONTINUE;
+ }
+
++#endif
++
++static void
++egg_tray_icon_unrealize (GtkWidget *widget)
++{
++#ifdef GDK_WINDOWING_X11
++ EggTrayIcon *icon = EGG_TRAY_ICON (widget);
++ GdkWindow *root_window;
++
++ if (icon->manager_window != None)
++ {
++ GdkWindow *gdkwin;
++
++ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
++ icon->manager_window);
++
++ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
++ }
++
++ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
++
++ gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
++
++ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
++ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
++#endif
++}
++
++#ifdef GDK_WINDOWING_X11
++
+ static void
+ egg_tray_icon_send_manager_message (EggTrayIcon *icon,
+ long message,
+@@ -119,11 +290,7 @@
+ ev.data.l[3] = data2;
+ ev.data.l[4] = data3;
+
+-#if HAVE_GTK_MULTIHEAD
+ display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+-#else
+- display = gdk_display;
+-#endif
+
+ gdk_error_trap_push ();
+ XSendEvent (display,
+@@ -143,29 +310,15 @@
+ }
+
+ static void
+-egg_tray_icon_update_manager_window (EggTrayIcon *icon)
++egg_tray_icon_update_manager_window (EggTrayIcon *icon,
++ gboolean dock_if_realized)
+ {
+ Display *xdisplay;
+
+-#if HAVE_GTK_MULTIHEAD
+- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+-#else
+- xdisplay = gdk_display;
+-#endif
+-
+ if (icon->manager_window != None)
+- {
+- GdkWindow *gdkwin;
++ return;
+
+-#if HAVE_GTK_MULTIHEAD
+- gdkwin = gdk_window_lookup_for_display (display,
+- icon->manager_window);
+-#else
+- gdkwin = gdk_window_lookup (icon->manager_window);
+-#endif
+-
+- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+- }
++ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+
+ XGrabServer (xdisplay);
+
+@@ -174,7 +327,7 @@
+
+ if (icon->manager_window != None)
+ XSelectInput (xdisplay,
+- icon->manager_window, StructureNotifyMask);
++ icon->manager_window, StructureNotifyMask|PropertyChangeMask);
+
+ XUngrabServer (xdisplay);
+ XFlush (xdisplay);
+@@ -183,87 +336,95 @@
+ {
+ GdkWindow *gdkwin;
+
+-#if HAVE_GTK_MULTIHEAD
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+-#else
+- gdkwin = gdk_window_lookup (icon->manager_window);
+-#endif
+
+ gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+
+- /* Send a request that we'd like to dock */
+- egg_tray_icon_send_dock_request (icon);
++ if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
++ egg_tray_icon_send_dock_request (icon);
++
++ egg_tray_icon_get_orientation_property (icon);
+ }
+ }
+
+-EggTrayIcon *
+-egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name)
++static void
++egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
+ {
+- EggTrayIcon *icon;
++ GdkWindow *gdkwin;
++
++ g_return_if_fail (icon->manager_window != None);
++
++ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
++ icon->manager_window);
++
++ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
++
++ icon->manager_window = None;
++
++ egg_tray_icon_update_manager_window (icon, TRUE);
++}
++
++#endif
++
++static void
++egg_tray_icon_realize (GtkWidget *widget)
++{
++#ifdef GDK_WINDOWING_X11
++ EggTrayIcon *icon = EGG_TRAY_ICON (widget);
++ GdkScreen *screen;
++ GdkDisplay *display;
++ Display *xdisplay;
+ char buffer[256];
+ GdkWindow *root_window;
+
+- g_return_val_if_fail (xscreen != NULL, NULL);
+-
+- icon = g_object_new (EGG_TYPE_TRAY_ICON, NULL);
+- gtk_window_set_title (GTK_WINDOW (icon), name);
++ if (GTK_WIDGET_CLASS (parent_class)->realize)
++ GTK_WIDGET_CLASS (parent_class)->realize (widget);
+
+-#if HAVE_GTK_MULTIHEAD
+- gtk_plug_construct_for_display (GTK_PLUG (icon),
+- gdk_screen_get_display (screen), 0);
+-#else
+- gtk_plug_construct (GTK_PLUG (icon), 0);
+-#endif
+-
+- gtk_widget_realize (GTK_WIDGET (icon));
++ screen = gtk_widget_get_screen (widget);
++ display = gdk_screen_get_display (screen);
++ xdisplay = gdk_x11_display_get_xdisplay (display);
+
+ /* Now see if there's a manager window around */
+ g_snprintf (buffer, sizeof (buffer),
+ "_NET_SYSTEM_TRAY_S%d",
+- XScreenNumberOfScreen (xscreen));
+-
+- icon->selection_atom = XInternAtom (DisplayOfScreen (xscreen),
+- buffer, False);
++ gdk_screen_get_number (screen));
++
++ icon->selection_atom = XInternAtom (xdisplay, buffer, False);
+
+- icon->manager_atom = XInternAtom (DisplayOfScreen (xscreen),
+- "MANAGER", False);
++ icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False);
+
+- icon->system_tray_opcode_atom = XInternAtom (DisplayOfScreen (xscreen),
+- "_NET_SYSTEM_TRAY_OPCODE", False);
++ icon->system_tray_opcode_atom = XInternAtom (xdisplay,
++ "_NET_SYSTEM_TRAY_OPCODE",
++ False);
++
++ icon->orientation_atom = XInternAtom (xdisplay,
++ "_NET_SYSTEM_TRAY_ORIENTATION",
++ False);
+
+- egg_tray_icon_update_manager_window (icon);
++ egg_tray_icon_update_manager_window (icon, FALSE);
++ egg_tray_icon_send_dock_request (icon);
+
+-#if HAVE_GTK_MULTIHEAD
+ root_window = gdk_screen_get_root_window (screen);
+-#else
+- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
+-#endif
+
+ /* Add a root window filter so that we get changes on MANAGER */
+ gdk_window_add_filter (root_window,
+ egg_tray_icon_manager_filter, icon);
+-
+- return icon;
++#endif
+ }
+
+-#if HAVE_GTK_MULTIHEAD
+ EggTrayIcon *
+ egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
+ {
+- EggTrayIcon *icon;
+- char buffer[256];
+-
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+- return egg_tray_icon_new_for_xscreen (GDK_SCREEN_XSCREEN (screen), name);
++ return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
+ }
+-#endif
+
+ EggTrayIcon*
+ egg_tray_icon_new (const gchar *name)
+ {
+- return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
++ return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL);
+ }
+
+ guint
+@@ -278,14 +439,17 @@
+ g_return_val_if_fail (timeout >= 0, 0);
+ g_return_val_if_fail (message != NULL, 0);
+
++#ifdef GDK_WINDOWING_X11
+ if (icon->manager_window == None)
+ return 0;
++#endif
+
+ if (len < 0)
+ len = strlen (message);
+
+ stamp = icon->stamp++;
+
++#ifdef GDK_WINDOWING_X11
+ /* Get ready to send the message */
+ egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
+ (Window)gtk_plug_get_id (GTK_PLUG (icon)),
+@@ -298,11 +462,7 @@
+ XClientMessageEvent ev;
+ Display *xdisplay;
+
+-#if HAVE_GTK_MULTIHEAD
+ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+-#else
+- xdisplay = gdk_display;
+-#endif
+
+ ev.type = ClientMessage;
+ ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
+@@ -326,6 +486,7 @@
+ XSync (xdisplay, False);
+ }
+ gdk_error_trap_pop ();
++#endif
+
+ return stamp;
+ }
+@@ -336,8 +497,17 @@
+ {
+ g_return_if_fail (EGG_IS_TRAY_ICON (icon));
+ g_return_if_fail (id > 0);
+-
++#ifdef GDK_WINDOWING_X11
+ egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
+ (Window)gtk_plug_get_id (GTK_PLUG (icon)),
+ id, 0, 0);
++#endif
++}
++
++GtkOrientation
++egg_tray_icon_get_orientation (EggTrayIcon *icon)
++{
++ g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL);
++
++ return icon->orientation;
+ }
+--- lib/gui/gmtray/eggtrayicon.h 2006-01-07 09:25:47.000000000 +0100
++++ lib/gui/gmtray/eggtrayicon.h 2006-06-03 01:00:42.000000000 +0200
+@@ -22,7 +22,9 @@
+ #define __EGG_TRAY_ICON_H__
+
+ #include <gtk/gtkplug.h>
++#ifdef GDK_WINDOWING_X11
+ #include <gdk/gdkx.h>
++#endif
+
+ G_BEGIN_DECLS
+
+@@ -42,10 +44,14 @@
+
+ guint stamp;
+
++#ifdef GDK_WINDOWING_X11
+ Atom selection_atom;
+ Atom manager_atom;
+ Atom system_tray_opcode_atom;
++ Atom orientation_atom;
+ Window manager_window;
++#endif
++ GtkOrientation orientation;
+ };
+
+ struct _EggTrayIconClass
+@@ -55,10 +61,8 @@
+
+ GType egg_tray_icon_get_type (void);
+
+-#if EGG_TRAY_ENABLE_MULTIHEAD
+ EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
+ const gchar *name);
+-#endif
+
+ EggTrayIcon *egg_tray_icon_new (const gchar *name);
+
+@@ -69,7 +73,7 @@
+ void egg_tray_icon_cancel_message (EggTrayIcon *icon,
+ guint id);
+
+-
++GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
+
+ G_END_DECLS
+