revert previous commit - but don't include unneeded email headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-02-15 23:06:05 +00:00
parent ec3110ae1a
commit 0a949d7896

View File

@@ -1,28 +1,67 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* eggtrayicon.c /* eggtrayicon.c
* Copyright (C) 2002 Anders Carlsson <andersca@gnu.org> * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/
/*
Permission to use this file under wxWindows license given by
copyright holder:
--------
From andersca@gnu.org Tue Dec 9 13:01:56 2003
Subject: Re: eggtrayicon.{c,h} licensing
From: Anders Carlsson <andersca@gnu.org>
To: Vaclav Slavik <vaclav.slavik@matfyz.cz>
On tis, 2003-12-09 at 11:42 +0100, Vaclav Slavik wrote:
> Hi,
>
> I'm working on the wxWindows cross-platform GUI toolkit
> (http://www.wxwindows.org) which uses GTK+ and it would save me a lot
> of time if I could use your eggtrayicon code to implement tray icons
> on X11. Unfortunately I can't use it right now because it is not part
> of any library we could depend on (as we do depend on GTK+) and would
> have to be included in our sources and it is under the LGPL license.
> The problem is that wxWindows' license is more permissive (see
> http://www.opensource.org/licenses/wxwindows.php for details) and so
> I can't take your code and put it under wxWindows License. And I
> can't put code that can't be used under the terms of wxWindows
> License into wxWindows either. Do you think it would be possible to
> get permission to include eggtrayicon under wxWindows license?
>
> Thanks,
> Vaclav
>
Sure, that's fine by me.
Anders
--------
*/ */
#include "wx/platform.h" #include "wx/platform.h"
#if wxUSE_TASKBARICON #if wxUSE_TASKBARICON
#include <gtk/gtkversion.h> #include <gtk/gtkversion.h>
#if GTK_CHECK_VERSION(2, 1, 0)
#include <string.h> #include <string.h>
#include "eggtrayicon.h" #include "eggtrayicon.h"
@@ -34,6 +73,7 @@
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#endif #endif
#define SYSTEM_TRAY_REQUEST_DOCK 0 #define SYSTEM_TRAY_REQUEST_DOCK 0
#define SYSTEM_TRAY_BEGIN_MESSAGE 1 #define SYSTEM_TRAY_BEGIN_MESSAGE 1
#define SYSTEM_TRAY_CANCEL_MESSAGE 2 #define SYSTEM_TRAY_CANCEL_MESSAGE 2
@@ -142,7 +182,6 @@ egg_tray_icon_get_property (GObject *object,
case PROP_ORIENTATION: case PROP_ORIENTATION:
g_value_set_enum (value, icon->orientation); g_value_set_enum (value, icon->orientation);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
@@ -227,7 +266,6 @@ egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_
egg_tray_icon_manager_window_destroyed (icon); egg_tray_icon_manager_window_destroyed (icon);
} }
} }
return GDK_FILTER_CONTINUE; return GDK_FILTER_CONTINUE;
} }
@@ -517,11 +555,10 @@ egg_tray_icon_send_message (EggTrayIcon *icon,
icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev); icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
XSync (xdisplay, False); XSync (xdisplay, False);
} }
gdk_error_trap_pop (); gdk_error_trap_pop ();
#endif #endif
return stamp; return stamp;
} }
void void
@@ -545,4 +582,9 @@ egg_tray_icon_get_orientation (EggTrayIcon *icon)
return icon->orientation; return icon->orientation;
} }
#endif /* GTK_CHECK_VERSION(2, 1, 0) */
#endif /* wxUSE_TASKBARICON */ #endif /* wxUSE_TASKBARICON */