aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/evolution-calendar-control.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/evolution-calendar-control.c')
-rw-r--r--calendar/gui/evolution-calendar-control.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c
index ceee4335eb..b1c436b716 100644
--- a/calendar/gui/evolution-calendar-control.c
+++ b/calendar/gui/evolution-calendar-control.c
@@ -19,6 +19,22 @@ CORBA_Environment ev;
CORBA_ORB orb;
+static void
+control_activate_cb (BonoboControl *control,
+ gboolean activate,
+ gpointer user_data)
+{
+ BonoboUIHandler *uih;
+
+ uih = bonobo_control_get_ui_handler (control);
+ g_assert (uih);
+
+ if (activate)
+ calendar_control_activate (control, uih);
+ else
+ calendar_control_deactivate (control, uih);
+}
+
static BonoboObject *
calendar_factory (BonoboGenericFactory *Factory, void *closure)
@@ -30,8 +46,12 @@ calendar_factory (BonoboGenericFactory *Factory, void *closure)
//cal = gnome_calendar_new ("unnamed");
cal = new_calendar ("title", NULL, NULL, NULL, 0);
gtk_widget_show (GTK_WIDGET (cal));
+
control = bonobo_control_new (GTK_WIDGET (cal));
+ gtk_signal_connect (GTK_OBJECT (control), "activate",
+ control_activate_cb, NULL);
+
return BONOBO_OBJECT (control);
}