From 080049ac37387efd71551bfdb661e15c0e1ce8ce Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 6 Apr 2000 02:30:21 +0000 Subject: removed (setup_appbar): removed (calendar_control_activate): new function * gui/calendar-commands.c (setup_menu): removed (setup_appbar): removed (calendar_control_activate): new function -- does the work that setup_appbar and setup_menu used to do. (calendar_control_deactivate): undoes what calendar_control_activate does by removing the toolbar items and menu items. svn path=/trunk/; revision=2299 --- calendar/gui/evolution-calendar-control.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'calendar/gui/evolution-calendar-control.c') 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); } -- cgit v1.2.3