diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2006-06-06 18:11:36 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2006-06-06 18:11:36 +0000 |
commit | fc5a23f416af34654ac7fe6bd6effe6a185c9253 (patch) | |
tree | 88da458df1346c64462c9a50818d25e4d133d839 /net-im/ekiga | |
parent | version bump thanks to David PIRY <klessou@gmail.com> in bug 135785 (diff) | |
download | gentoo-2-fc5a23f416af34654ac7fe6bd6effe6a185c9253.tar.gz gentoo-2-fc5a23f416af34654ac7fe6bd6effe6a185c9253.tar.bz2 gentoo-2-fc5a23f416af34654ac7fe6bd6effe6a185c9253.zip |
version bump including a kde trayicon fix, bug 135327, and a doc fix, bug 129344, version bump bug 135785
(Portage version: 2.1_rc4-r1)
Diffstat (limited to 'net-im/ekiga')
-rw-r--r-- | net-im/ekiga/ChangeLog | 10 | ||||
-rw-r--r-- | net-im/ekiga/ekiga-2.0.2.ebuild | 117 | ||||
-rw-r--r-- | net-im/ekiga/files/digest-ekiga-2.0.2 | 3 | ||||
-rw-r--r-- | net-im/ekiga/files/ekiga-eggtrayicon-transparency.diff | 95 | ||||
-rw-r--r-- | net-im/ekiga/files/ekiga-eggtrayicon-update.diff | 535 |
5 files changed, 759 insertions, 1 deletions
diff --git a/net-im/ekiga/ChangeLog b/net-im/ekiga/ChangeLog index aa6b963473fb..b703794403db 100644 --- a/net-im/ekiga/ChangeLog +++ b/net-im/ekiga/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-im/ekiga # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ekiga/ChangeLog,v 1.3 2006/03/24 22:10:11 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ekiga/ChangeLog,v 1.4 2006/06/06 18:11:36 genstef Exp $ + +*ekiga-2.0.2 (06 Jun 2006) + + 06 Jun 2006; Stefan Schweizer <genstef@gentoo.org> + +files/ekiga-eggtrayicon-transparency.diff, + +files/ekiga-eggtrayicon-update.diff, +ekiga-2.0.2.ebuild: + version bump including a kde trayicon fix, bug 135327, and a doc fix, bug + 129344, version bump bug 135785 24 Mar 2006; Stefan Schweizer <genstef@gentoo.org> ekiga-2.0.1.ebuild: Readd ermissions fix thanks to Mike Auty <mike.auty@gmail.com> and David diff --git a/net-im/ekiga/ekiga-2.0.2.ebuild b/net-im/ekiga/ekiga-2.0.2.ebuild new file mode 100644 index 000000000000..1c8c6758917d --- /dev/null +++ b/net-im/ekiga/ekiga-2.0.2.ebuild @@ -0,0 +1,117 @@ +# 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" diff --git a/net-im/ekiga/files/digest-ekiga-2.0.2 b/net-im/ekiga/files/digest-ekiga-2.0.2 new file mode 100644 index 000000000000..f11d5cc478d6 --- /dev/null +++ b/net-im/ekiga/files/digest-ekiga-2.0.2 @@ -0,0 +1,3 @@ +MD5 569e0f79ec018ca3e8f2979449dd6f0f ekiga-2.0.2.tar.gz 6023172 +RMD160 9114c36a2d1f9f914fe154b113e2b9edc6b784b3 ekiga-2.0.2.tar.gz 6023172 +SHA256 bdb883369e6666c8663323ee737a30d7cbf2aa0e03324f2fe9d5f58abfd6cae5 ekiga-2.0.2.tar.gz 6023172 diff --git a/net-im/ekiga/files/ekiga-eggtrayicon-transparency.diff b/net-im/ekiga/files/ekiga-eggtrayicon-transparency.diff new file mode 100644 index 000000000000..f165c63e36b2 --- /dev/null +++ b/net-im/ekiga/files/ekiga-eggtrayicon-transparency.diff @@ -0,0 +1,95 @@ +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 * diff --git a/net-im/ekiga/files/ekiga-eggtrayicon-update.diff b/net-im/ekiga/files/ekiga-eggtrayicon-update.diff new file mode 100644 index 000000000000..a7dcb286afa7 --- /dev/null +++ b/net-im/ekiga/files/ekiga-eggtrayicon-update.diff @@ -0,0 +1,535 @@ +--- 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 + |