[Xfce4-commits] <xfce4-indicator-plugin:master> it compiles
Mark Trompell
noreply at xfce.org
Thu Feb 17 08:30:16 CET 2011
Updating branch refs/heads/master
to 4798235d8013f98fe5b843376ba0112d694700cc (commit)
from 709ad772c8eaa711c3559d06d59b0799891958f2 (commit)
commit 4798235d8013f98fe5b843376ba0112d694700cc
Author: Mark Trompell <mark at foresightlinux.org>
Date: Thu Jun 4 11:00:17 2009 +0200
it compiles
panel-plugin/indicator.c | 9 ++++++---
panel-plugin/indicator.h | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
index ab1cd84..a9447a5 100644
--- a/panel-plugin/indicator.c
+++ b/panel-plugin/indicator.c
@@ -47,6 +47,9 @@ indicator_construct (XfcePanelPlugin *plugin);
static gboolean
load_module (const gchar * name, GtkWidget * menu);
+static gboolean
+on_button_press (GtkWidget *widget, GdkEventButton *event, IndicatorPlugin *indicator);
+
/* register the plugin */
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (indicator_construct);
@@ -185,10 +188,10 @@ indicator_new (XfcePanelPlugin *plugin)
"widget \"*.indicator-applet-menubar\" style \"indicator-applet-menubar-style\"");
gtk_widget_set_name(GTK_WIDGET (plugin), "indicator-applet-menubar");
/* create some panel widgets */
- indicator->button = gtk_button_new ("foo");
+ indicator->button = gtk_button_new_with_label ("foo");
gtk_button_set_relief (GTK_BUTTON(indicator->button), GTK_RELIEF_NONE);
- g_signal_connect (G_OBJECT(mounter->button), "button_press_event",
+ g_signal_connect (G_OBJECT(indicator->button), "button_press_event",
G_CALLBACK(on_button_press), indicator);
@@ -284,7 +287,7 @@ static gboolean
on_button_press (GtkWidget *widget, GdkEventButton *event, IndicatorPlugin *indicator)
{
TRACE ("enters on_button_press");
- if (plugin != NULL && event->button == 1) /* left click only */
+ if (indicator != NULL && event->button == 1) /* left click only */
{
gtk_menu_popup (GTK_MENU(indicator->menu), NULL, NULL, NULL, NULL, 0,
event->time);
diff --git a/panel-plugin/indicator.h b/panel-plugin/indicator.h
index a4e4d8b..0f6c5f4 100644
--- a/panel-plugin/indicator.h
+++ b/panel-plugin/indicator.h
@@ -30,7 +30,7 @@ typedef struct
/* panel widgets */
GtkWidget *menu;
GtkWidget *label;
- GdkPixbuf *item;
+ GtkWidget *item;
GtkWidget *button;
GdkPixbuf *button_pb;
gchar *icon;
More information about the Xfce4-commits
mailing list