diff --git a/src/plugins/Makefile b/src/plugins/Makefile index 1c347f0..3b9446b 100644 --- a/src/plugins/Makefile +++ b/src/plugins/Makefile @@ -79,8 +79,8 @@ oss.so: $(oss_OBJS) $(CCSHARED) -o oss.so $(oss_OBJS) $(oss_LDFLAGS) panel_OBJS = panel.o -panel_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) -panel_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) +panel_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) `pkg-config --cflags libDesktop` +panel_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs libDesktop` panel.so: $(panel_OBJS) $(CCSHARED) -o panel.so $(panel_OBJS) $(panel_LDFLAGS) diff --git a/src/plugins/panel.c b/src/plugins/panel.c index e4a211b..ab8179f 100644 --- a/src/plugins/panel.c +++ b/src/plugins/panel.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2011 Pierre Pronchery */ +/* Copyright (c) 2012 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Phone */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* FIXME: - * - only track battery and signal status when online */ + * - track battery and signal status only when online */ @@ -27,6 +27,7 @@ #if GTK_CHECK_VERSION(3, 0, 0) # include #endif +#include #include "Phone.h" @@ -200,8 +201,6 @@ static gboolean _on_plug_delete_event(gpointer data) { PhonePlugin * plugin = data; Panel * panel = plugin->priv; - GdkEvent event; - GdkEventClient * client = &event.client; #ifdef DEBUG fprintf(stderr, "DEBUG: %s()\n", __func__); @@ -209,14 +208,8 @@ static gboolean _on_plug_delete_event(gpointer data) if(panel->timeout == 0) panel->timeout = g_timeout_add(5000, _on_plug_delete_event, plugin); - memset(&event, 0, sizeof(event)); - client->type = GDK_CLIENT_EVENT; - client->window = NULL; - client->send_event = TRUE; - client->message_type = gdk_atom_intern(PHONE_EMBED_MESSAGE, FALSE); - client->data_format = 32; - client->data.l[0] = gtk_plug_get_id(GTK_PLUG(panel->plug)); - gdk_event_send_clientmessage_toall(&event); + desktop_message_send(PHONE_EMBED_MESSAGE, gtk_plug_get_id( + GTK_PLUG(panel->plug)), 0, 0); return TRUE; } diff --git a/src/plugins/project.conf b/src/plugins/project.conf index 0a9d539..96a804b 100644 --- a/src/plugins/project.conf +++ b/src/plugins/project.conf @@ -77,6 +77,8 @@ depends=../../include/Phone.h [panel] type=plugin sources=panel.c +cflags=`pkg-config --cflags libDesktop` +ldflags=`pkg-config --libs libDesktop` install=$(LIBDIR)/Phone/plugins [panel.c]