mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-voip/ekiga: remove old
Package-Manager: portage-2.2.27
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST ekiga-4.0.0.tar.xz 8332828 SHA256 69c544fb0f2e9cb425b9dae131b01e256ad20fd597f1faf0c28f5930b0f1d998 SHA512 0760b4ba2b037bb829809a92d67a6281c85746286fc2393cfaaf7a84520acac11e68b18d2c5bb98e0eeec70171a991b3bba1ca7dd7d275a29cea97b52fab960f WHIRLPOOL ea3f92433755bb2cec2a075c65074082b6cc684ef41117fd1c8ff0545446e85c09a3e6d3311e3489fef66528f10fe6d254b396f1eeadfa753d05806f57f738d8
|
||||
DIST ekiga-4.0.1.tar.xz 8339364 SHA256 5f4f491c9496cf65ba057a9345d6bb0278f4eca07bcda5baeecf50bfcd9a4a3b SHA512 3c4dd5eab6e91434da4bbfe5728ac5943ed5ae89b8b2241fb59abb3e41bcd08ba187b5d60c9d839b1010edd7fc97b53cc6db57a6eec40ba81757a772febd2217 WHIRLPOOL 10f60d34b110f0bd77631725bcd7be2badaa88e7278c466a5d2f2944a7ad6226d4466cf6f1f2f3fdea3a3ea925b02216052124dfc5ca416439ba60db22a809ed
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
KDE_REQUIRED="optional"
|
||||
CMAKE_REQUIRED="never"
|
||||
GCONF_DEBUG="no" # debug managed by the ebuild
|
||||
|
||||
inherit eutils kde4-base gnome2
|
||||
# gnome2 at the end to make it default
|
||||
|
||||
DESCRIPTION="H.323 and SIP VoIP softphone"
|
||||
HOMEPAGE="http://www.ekiga.org/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ia64 ppc ppc64 sparc x86"
|
||||
IUSE="avahi dbus debug doc eds gconf gnome gstreamer h323 kde kontact ldap
|
||||
libnotify cpu_flags_x86_mmx nls pulseaudio +shm static v4l xcap xv"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.24.0:2
|
||||
>=dev-libs/boost-1.49
|
||||
dev-libs/libxml2:2
|
||||
>=net-libs/opal-3.10.9[sip,sound,video,debug=,h323?,xml]
|
||||
>=net-libs/ptlib-2.10.9[ldap?,stun,v4l?,video,wav,debug=,dtmf,pulseaudio?,xml]
|
||||
>=x11-libs/gtk+-2.20.0:2
|
||||
>=x11-themes/gnome-icon-theme-3.0.0
|
||||
avahi? ( >=net-dns/avahi-0.6[dbus] )
|
||||
dbus? ( >=sys-apps/dbus-0.36
|
||||
>=dev-libs/dbus-glib-0.36 )
|
||||
eds? ( >=gnome-extra/evolution-data-server-1.2 )
|
||||
gconf? ( >=gnome-base/gconf-2.6.0:2 )
|
||||
gnome? ( || ( >=x11-libs/gtk+-2.20.0:2
|
||||
( >=gnome-base/libgnome-2.14.0
|
||||
>=gnome-base/libgnomeui-2.14.0 ) ) )
|
||||
gstreamer? ( >=media-libs/gst-plugins-base-0.10.21.3:0.10 )
|
||||
kde? ( kontact? ( $(add_kdeapps_dep kdepimlibs) ) )
|
||||
ldap? ( dev-libs/cyrus-sasl:2
|
||||
net-nds/openldap )
|
||||
libnotify? ( x11-libs/libnotify )
|
||||
shm? ( x11-libs/libXext )
|
||||
xcap? ( net-libs/libsoup:2.4 )
|
||||
xv? ( x11-libs/libXv )"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-util/intltool-0.35
|
||||
virtual/pkgconfig
|
||||
sys-devel/gettext
|
||||
doc? ( app-text/scrollkeeper
|
||||
app-text/gnome-doc-utils
|
||||
app-doc/doxygen )
|
||||
v4l? ( sys-kernel/linux-headers )"
|
||||
|
||||
DOCS="AUTHORS ChangeLog FAQ MAINTAINERS NEWS README TODO"
|
||||
|
||||
# NOTES:
|
||||
# having >=gtk+-2.14 is actually removing need of +gnome but it's clearer to
|
||||
# represent it with || in gnome dep
|
||||
# TODO: gnome2 eclass add --[dis|en]able-gtk-doc wich throws a QA warning
|
||||
# a patch has been submitted, see bug 262491
|
||||
# ptlib/opal needed features are not checked by ekiga, upstream bug 577249
|
||||
# +doc is not installing dev doc (doxygen)
|
||||
|
||||
# UPSTREAM:
|
||||
# contact ekiga team to be sure intltool and gettext are not nls deps
|
||||
|
||||
pkg_setup() {
|
||||
forceconf=""
|
||||
|
||||
if use kde; then
|
||||
kde4-base_pkg_setup
|
||||
fi
|
||||
|
||||
if use kontact && ! use kde; then
|
||||
ewarn "To enable kontact USE flag, you need kde USE flag to be enabled."
|
||||
ewarn "If you need kontact support, please, re-emerge with kde enabled."
|
||||
forceconf="${forceconf} --disable-kab"
|
||||
fi
|
||||
|
||||
# dbus-service: always enable if dbus is enabled, no reason to disable it
|
||||
# schemas-install: install gconf schemas
|
||||
G2CONF="${G2CONF}
|
||||
--disable-dependency-tracking
|
||||
--disable-maintainer-mode
|
||||
--enable-libtool-lock
|
||||
$(use_enable avahi)
|
||||
$(use_enable dbus)
|
||||
$(use_enable dbus dbus_service)
|
||||
$(use_enable debug gtk-debug)
|
||||
$(use_enable debug opal-debug)
|
||||
$(use_enable doc gdu)
|
||||
$(use_enable eds)
|
||||
$(use_enable gconf)
|
||||
$(use_enable gconf schemas-install)
|
||||
$(use_enable gstreamer)
|
||||
$(use_enable h323)
|
||||
$(use_enable kde)
|
||||
$(use_enable kontact kab)
|
||||
$(use_enable ldap)
|
||||
$(use_enable libnotify notify)
|
||||
$(use_enable cpu_flags_x86_mmx mmx)
|
||||
$(use_enable nls)
|
||||
$(use_enable shm)
|
||||
$(use_enable static static-libs)
|
||||
$(use_enable xcap)
|
||||
$(use_enable xv)
|
||||
${forceconf}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
|
||||
gnome2_src_prepare
|
||||
|
||||
# remove call to gconftool-2 --shutdown, upstream bug 555976
|
||||
# gnome-2 eclass is reloading schemas with SIGHUP
|
||||
sed -i -e '/gconftool-2 --shutdown/d' Makefile.in || die "sed failed"
|
||||
|
||||
# V4L support is auto-enabled, want it to be a user choice
|
||||
# do not contact upstream because that's a hack
|
||||
# TODO: check if upstream has removed this hack
|
||||
if ! use v4l; then
|
||||
sed -i -e "s/V4L=\"enabled\"/V4L=\"disabled\"/" configure \
|
||||
|| die "sed failed"
|
||||
fi
|
||||
|
||||
# compatibility with kdeprefix, fix bug 283033
|
||||
if use kde; then
|
||||
sed -i -e "s:\tKDE_CFLAGS=\(.*\):\tKDE_CFLAGS=\"\1 -I${KDEDIR}/include\":" \
|
||||
configure || die "sed failed"
|
||||
sed -i -e "s:\(KDE_LIBS=.*\)\(-lkdeui\):\1-L${KDEDIR}/$(get_libdir) \2:" \
|
||||
configure || die "sed failed"
|
||||
fi
|
||||
|
||||
# Remove silly -D*_DISABLE_DEPRECATED CFLAGS
|
||||
sed -e 's/-D[^\s\t]\+_DISABLE_DEPRECATED//g' -i configure || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# must be explicit because kde4-base in exporting a src_test function
|
||||
emake -j1 check || die "emake check failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
gnome2_src_install
|
||||
|
||||
if use doc && use dbus; then
|
||||
insinto "/usr/share/doc/${PF}/"
|
||||
doins doc/using_dbus.html || die "doins failed"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_pkg_postinst
|
||||
|
||||
if use kde; then
|
||||
kde4-base_pkg_postinst
|
||||
fi
|
||||
|
||||
if ! use gnome; then
|
||||
ewarn "USE=-gnome is experimental, weirdness with UI and config keys can appear."
|
||||
fi
|
||||
|
||||
if use gstreamer || use kde || use xcap || use kontact; then
|
||||
ewarn "You have enabled gstreamer, kde, xcap or kontact USE flags."
|
||||
ewarn "Those USE flags are considered experimental features."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_pkg_postrm
|
||||
|
||||
if use kde; then
|
||||
kde4-base_pkg_postrm
|
||||
fi
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
--- gnomemeeting-1.2.1/configure.orig 2005-04-11 17:24:31.000000000 +0000
|
||||
+++ gnomemeeting-1.2.1/configure 2005-04-11 17:25:34.000000000 +0000
|
||||
@@ -20815,15 +20815,17 @@
|
||||
if test x"${disable_gnome}" = xyes ; then
|
||||
|
||||
|
||||
-if false; then
|
||||
- GCONF_SCHEMAS_INSTALL_TRUE=
|
||||
- GCONF_SCHEMAS_INSTALL_FALSE='#'
|
||||
-else
|
||||
+#if false; then
|
||||
+# GCONF_SCHEMAS_INSTALL_TRUE=
|
||||
+# GCONF_SCHEMAS_INSTALL_FALSE='#'
|
||||
+#else
|
||||
GCONF_SCHEMAS_INSTALL_TRUE='#'
|
||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||
-fi
|
||||
+#fi
|
||||
|
||||
else
|
||||
+ GCONF_SCHEMAS_INSTALL_TRUE=
|
||||
+ GCONF_SCHEMAS_INSTALL_FALSE='#'
|
||||
|
||||
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
|
||||
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
@@ -1,111 +0,0 @@
|
||||
--- configure.in 2008-03-12 21:20:29.925476633 +0000
|
||||
+++ configure.in 2008-03-12 21:22:29.000000000 +0000
|
||||
@@ -60,8 +60,8 @@
|
||||
if test ${enable_gnome} = yes && test ${enable_doc} = yes; then
|
||||
GNOME_DOC_INIT
|
||||
else
|
||||
-ENABLE_SK_TRUE="#"
|
||||
-ENABLE_SK_FALSE=""
|
||||
+dnl Do not care if GDU is not found
|
||||
+GNOME_DOC_INIT(,,[:])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DISABLE_DOC, test ${enable_doc} = no)
|
||||
--- configure 2008-03-21 00:47:35.000000000 +0100
|
||||
+++ configure 2008-03-21 00:47:48.000000000 +0100
|
||||
@@ -2968,8 +2966,93 @@
|
||||
|
||||
|
||||
else
|
||||
-ENABLE_SK_TRUE="#"
|
||||
-ENABLE_SK_FALSE=""
|
||||
+
|
||||
+gdu_cv_version_required=0.3.2
|
||||
+
|
||||
+if test -n "$PKG_CONFIG" && \
|
||||
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\"") >&5
|
||||
+ ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ gdu_cv_have_gdu=yes
|
||||
+else
|
||||
+ gdu_cv_have_gdu=no
|
||||
+fi
|
||||
+
|
||||
+if test "$gdu_cv_have_gdu" = "yes"; then
|
||||
+ :
|
||||
+else
|
||||
+ :
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+# Check whether --with-help-dir was given.
|
||||
+if test "${with_help_dir+set}" = set; then
|
||||
+ withval=$with_help_dir;
|
||||
+else
|
||||
+ with_help_dir='${datadir}/gnome/help'
|
||||
+fi
|
||||
+
|
||||
+HELP_DIR="$with_help_dir"
|
||||
+
|
||||
+
|
||||
+
|
||||
+# Check whether --with-omf-dir was given.
|
||||
+if test "${with_omf_dir+set}" = set; then
|
||||
+ withval=$with_omf_dir;
|
||||
+else
|
||||
+ with_omf_dir='${datadir}/omf'
|
||||
+fi
|
||||
+
|
||||
+OMF_DIR="$with_omf_dir"
|
||||
+
|
||||
+
|
||||
+
|
||||
+# Check whether --with-help-formats was given.
|
||||
+if test "${with_help_formats+set}" = set; then
|
||||
+ withval=$with_help_formats;
|
||||
+else
|
||||
+ with_help_formats=''
|
||||
+fi
|
||||
+
|
||||
+DOC_USER_FORMATS="$with_help_formats"
|
||||
+
|
||||
+
|
||||
+# Check whether --enable-scrollkeeper was given.
|
||||
+if test "${enable_scrollkeeper+set}" = set; then
|
||||
+ enableval=$enable_scrollkeeper;
|
||||
+else
|
||||
+ enable_scrollkeeper=yes
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then
|
||||
+ ENABLE_SK_TRUE=
|
||||
+ ENABLE_SK_FALSE='#'
|
||||
+else
|
||||
+ ENABLE_SK_TRUE='#'
|
||||
+ ENABLE_SK_FALSE=
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+if test "$gdu_cv_have_gdu" = "yes"; then
|
||||
+ HAVE_GNOME_DOC_UTILS_TRUE=
|
||||
+ HAVE_GNOME_DOC_UTILS_FALSE='#'
|
||||
+else
|
||||
+ HAVE_GNOME_DOC_UTILS_TRUE='#'
|
||||
+ HAVE_GNOME_DOC_UTILS_FALSE=
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
--- lib/engine/components/libnotify/libnotify-main.cpp
|
||||
+++ lib/engine/components/libnotify/libnotify-main.cpp
|
||||
@@ -40,6 +40,10 @@
|
||||
|
||||
#include <libnotify/notify.h>
|
||||
|
||||
+#ifndef NOTIFY_CHECK_VERSION
|
||||
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
|
||||
+#endif
|
||||
+
|
||||
#include "services.h"
|
||||
#include "notification-core.h"
|
||||
|
||||
@@ -158,7 +162,12 @@
|
||||
|
||||
notif = notify_notification_new (notification->get_title ().c_str (),
|
||||
notification->get_body ().c_str (),
|
||||
- urgency, NULL);
|
||||
+ urgency
|
||||
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
|
||||
+ );
|
||||
+#else
|
||||
+ , NULL);
|
||||
+#endif
|
||||
|
||||
g_signal_connect (notif, "closed",
|
||||
G_CALLBACK (on_notif_closed), notification.get ());
|
||||
--- src/gui/main.cpp
|
||||
+++ src/gui/main.cpp
|
||||
@@ -84,6 +84,9 @@
|
||||
|
||||
#ifdef HAVE_NOTIFY
|
||||
#include <libnotify/notify.h>
|
||||
+#ifndef NOTIFY_CHECK_VERSION
|
||||
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#if defined(P_FREEBSD) || defined (P_MACOSX)
|
||||
@@ -2820,12 +2823,21 @@
|
||||
|
||||
body = g_strdup_printf ("%s\n%s\n%s", uri, app, account);
|
||||
|
||||
- notify = notify_notification_new (title, body, GM_ICON_LOGO, NULL);
|
||||
+ notify = notify_notification_new (title, body, GM_ICON_LOGO
|
||||
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
|
||||
+ );
|
||||
+#else
|
||||
+ , NULL);
|
||||
+#endif
|
||||
notify_notification_add_action (notify, "accept", _("Accept"), notify_action_cb, mw, NULL);
|
||||
notify_notification_add_action (notify, "reject", _("Reject"), notify_action_cb, mw, NULL);
|
||||
notify_notification_set_timeout (notify, NOTIFY_EXPIRES_NEVER);
|
||||
notify_notification_set_urgency (notify, NOTIFY_URGENCY_CRITICAL);
|
||||
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
|
||||
+ // notify_notification_attach_to_status_icon was removed
|
||||
+#else
|
||||
notify_notification_attach_to_status_icon (notify, statusicon);
|
||||
+#endif
|
||||
if (!notify_notification_show (notify, NULL)) {
|
||||
ekiga_main_window_incoming_call_dialog_show (mw, call);
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
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 *
|
||||
@@ -1,535 +0,0 @@
|
||||
--- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
Index: ekiga-2.0.11/lib/gmconf/gmconf-glib.c
|
||||
===================================================================
|
||||
--- ekiga-2.0.11.orig/lib/gmconf/gmconf-glib.c
|
||||
+++ ekiga-2.0.11/lib/gmconf/gmconf-glib.c
|
||||
@@ -1473,7 +1473,7 @@ gm_conf_destroy (const gchar *namespac)
|
||||
}
|
||||
|
||||
gboolean
|
||||
-gm_conf_is_key_writable (gchar *key)
|
||||
+gm_conf_is_key_writable (const gchar *key)
|
||||
{
|
||||
g_return_val_if_fail (key != NULL, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user