Commit df2670d7 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by Mark McLoughlin

impl. Wrap the windowless BonoboWidget in a GtkEventBox so we can catch

2001-11-05  Mark McLoughlin  <mark@skynet.ie>

        * panel-applet-frame.c:
        (panel_bonobo_applet_widget): impl. Wrap the windowless
        BonoboWidget in a GtkEventBox so we can catch events.
        (panel_applet_load): rename to panel_bonobo_applet_load.

        * panel-applet-frame.h: upd.

        * menu.c: (add_test_bonobo_applet): upd.
parent 434328a7
2001-11-05 Mark McLoughlin <mark@skynet.ie>
* panel-applet-frame.c:
(panel_bonobo_applet_widget): impl. Wrap the windowless
BonoboWidget in a GtkEventBox so we can catch events.
(panel_applet_load): rename to panel_bonobo_applet_load.
* panel-applet-frame.h: upd.
* menu.c: (add_test_bonobo_applet): upd.
2001-11-05 Mark McLoughlin <mark@skynet.ie>
* applet.c: (applet_button_press): only propagate event to
......
......@@ -2299,7 +2299,7 @@ add_test_bonobo_applet (GtkWidget *widget,
panel = get_panel_from_menu_data (widget, TRUE);
panel_applet_load ("OAFIID:GNOME_Panel_TestBonoboApplet", panel, -1);
panel_bonobo_applet_load ("OAFIID:GNOME_Panel_TestBonoboApplet", panel, -1);
}
static void
......
......@@ -4,17 +4,37 @@
#include "applet.h"
static GtkWidget *
panel_bonobo_applet_widget (const gchar *iid)
{
GtkWidget *control;
GtkWidget *event_box;
event_box = gtk_event_box_new ();
gtk_widget_set_events (event_box,
GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK);
control = bonobo_widget_new_control (iid, NULL);
gtk_container_add (GTK_CONTAINER (event_box), control);
gtk_widget_show_all (event_box);
return event_box;
}
void
panel_applet_load (const gchar *iid,
panel_bonobo_applet_load (const gchar *iid,
PanelWidget *panel,
gint pos)
{
GtkWidget *control;
GtkWidget *widget;
gboolean success;
control = bonobo_widget_new_control (iid, NULL);
widget = panel_bonobo_applet_widget (iid);
success = register_toy (control,
success = register_toy (widget,
NULL, /* FIXME: data */
NULL, /* FIXME: data_destroy */
panel,
......
......@@ -5,7 +5,7 @@
G_BEGIN_DECLS
void panel_applet_load (const gchar *iid,
void panel_bonobo_applet_load (const gchar *iid,
PanelWidget *panel,
gint pos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment