From 8cfbc8ec2dfb219b67608b38f58130dd67310c04 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 16 Jan 2004 00:46:01 +0000 Subject: new function. (impl_createControls): create a task bar also for the tasks 2004-01-16 Rodrigo Moya * gui/tasks-component.[ch] (tasks_component_peek_activity_handler): new function. (impl_createControls): create a task bar also for the tasks component. We can't rely on the calendar component's one. (tasks_component_init): create the private activity handler. * gui/e-calendar-table.c (e_calendar_table_set_status_message): use the tasks component's activity handler. * gui/e-tasks.c (on_url_cb): new callback to display status bar messages when mousing over links. (setup_widgets): connect to "on_url" signal on the HTML widget. svn path=/trunk/; revision=24262 --- calendar/gui/tasks-component.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'calendar/gui/tasks-component.c') diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 9f0470773a..0295b84b16 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -75,6 +75,8 @@ struct _TasksComponentPrivate { ECal *create_ecal; GList *notifications; + + EActivityHandler *activity_handler; }; /* Utility functions. */ @@ -506,8 +508,8 @@ impl_createControls (PortableServer_Servant servant, { TasksComponent *component = TASKS_COMPONENT (bonobo_object_from_servant (servant)); TasksComponentPrivate *priv; - GtkWidget *selector_scrolled_window; - BonoboControl *sidebar_control; + GtkWidget *selector_scrolled_window, *statusbar_widget; + BonoboControl *sidebar_control, *statusbar_control; guint not; priv = component->priv; @@ -565,15 +567,12 @@ impl_createControls (PortableServer_Servant servant, *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev); *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (priv->view_control), ev); - /* The tasks component doesn't use the status bar so just return an empty label. */ - { - GtkWidget *label = gtk_label_new (""); - BonoboControl *control; - - gtk_widget_show (label); - control = bonobo_control_new (label); - *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (control), ev); - } + /* Create the task bar */ + statusbar_widget = e_task_bar_new (); + e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget)); + gtk_widget_show (statusbar_widget); + statusbar_control = bonobo_control_new (statusbar_widget); + *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev); } static GNOME_Evolution_CreatableItemTypeList * @@ -777,6 +776,8 @@ tasks_component_init (TasksComponent *component, TasksComponentClass *klass) priv->source_list = e_source_list_new_for_gconf (priv->gconf_client, "/apps/evolution/tasks/sources"); + priv->activity_handler = e_activity_handler_new (); + component->priv = priv; } @@ -819,4 +820,10 @@ tasks_component_peek_source_list (TasksComponent *component) return component->priv->source_list; } +EActivityHandler * +tasks_component_peek_activity_handler (TasksComponent *component) +{ + return component->priv->activity_handler; +} + BONOBO_TYPE_FUNC_FULL (TasksComponent, GNOME_Evolution_Component, PARENT_TYPE, tasks_component) -- cgit