# HG changeset patch # User giacomo # Date 1174260070 25200 # Node ID 04a56ecc944260c75f3b7fe89c53f68e5a26d278 # Parent 623eca8326e561ec8a3c3ba0ad1f66a0a335ca1e [svn] statusicon: do not behave strangely (or crash) when the plugin is loaded/unloaded multiple times diff -r 623eca8326e5 -r 04a56ecc9442 ChangeLog --- a/ChangeLog Sun Mar 18 11:13:45 2007 -0700 +++ b/ChangeLog Sun Mar 18 16:21:10 2007 -0700 @@ -1,3 +1,12 @@ +2007-03-18 18:13:45 +0000 Giacomo Lozito + revision [1850] + - aosd: beta3, fixes for handling X display open/close + trunk/src/aosd/aosd_common.h | 2 +- + trunk/src/aosd/aosd_osd.c | 4 +++- + trunk/src/aosd/ghosd.c | 1 + + 3 files changed, 5 insertions(+), 2 deletions(-) + + 2007-03-17 07:58:49 +0000 William Pitcock revision [1848] - clear up some configure bugs, pointed out by freebsd port patches diff -r 623eca8326e5 -r 04a56ecc9442 src/statusicon/gtktrayicon-x11.c --- a/src/statusicon/gtktrayicon-x11.c Sun Mar 18 11:13:45 2007 -0700 +++ b/src/statusicon/gtktrayicon-x11.c Sun Mar 18 16:21:10 2007 -0700 @@ -76,7 +76,43 @@ gboolean dock_if_realized); static void gtk_tray_icon_manager_window_destroyed (GtkTrayIcon *icon); -G_DEFINE_TYPE (GtkTrayIcon, gtk_tray_icon, GTK_TYPE_PLUG) +static void gtk_tray_icon_init (GtkTrayIcon *self); +static void gtk_tray_icon_class_init (GtkTrayIconClass *klass); +static gpointer gtk_tray_icon_parent_class = NULL; +static void gtk_tray_icon_class_intern_init (gpointer klass) +{ + gtk_tray_icon_parent_class = g_type_class_peek_parent (klass); + gtk_tray_icon_class_init ((GtkTrayIconClass*) klass); +} + +GType +gtk_tray_icon_get_type (void) +{ + static GType g_define_type_id = 0; + g_define_type_id = g_type_from_name( "AudGtkTrayIcon" ); + if (G_UNLIKELY (g_define_type_id == 0)) + { + static const GTypeInfo g_define_type_info = { + sizeof (GtkTrayIconClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gtk_tray_icon_class_intern_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GtkTrayIcon), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_tray_icon_init, + }; + g_define_type_id = g_type_register_static (GTK_TYPE_PLUG, "AudGtkTrayIcon", &g_define_type_info, 0); + } + else if ( gtk_tray_icon_parent_class == NULL ) + { + gpointer klass = g_type_class_peek( g_define_type_id ); + gtk_tray_icon_parent_class = g_type_class_peek_parent(klass); + } + return g_define_type_id; +} + static void gtk_tray_icon_class_init (GtkTrayIconClass *class)