diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-12-02 13:24:02 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-12-02 13:24:02 +0800 |
commit | 49e7dd311ec4652cbd87fe6f7627c54ab20f4782 (patch) | |
tree | de7f360836c95134d1c57a52391a7fb4ee58388e /calendar/gui/calendar-component.c | |
parent | 89dc17247f41b4d82f4a973fa6f4a8358cd0f42c (diff) | |
download | gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.gz gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.zst gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.zip |
Replace member "activity" with an "activity_id".
* gui/e-calendar-table.h (struct _ECalendarTable): Replace member
"activity" with an "activity_id".
* gui/e-cal-view.c (struct _ECalendarViewPrivate): Replace member
"activity" with "activity_id".
(e_calendar_view_destroy): Don't unref activity here anymore.
(e_calendar_view_set_status_message): Report progress using the
EActivityHandler off the CalendarComponent.
* gui/calendar-component.c
(struct _CalendarComponentPrivate): New member activity_handler.
(calendar_component_init): Init.
(calendar_component_peek_activity_handler): New.
(impl_dispose): Unref.
(impl_createControls): Return an ETaskBar for the statusbar
control.
svn path=/trunk/; revision=23565
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r-- | calendar/gui/calendar-component.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 53acafe853..93c5a0be42 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -62,7 +62,9 @@ struct _CalendarComponentPrivate { GnomeCalendar *calendar; GtkWidget *source_selector; - guint selected_not; + guint selected_not; + + EActivityHandler *activity_handler; }; /* FIXME This should be gnome cal likely */ @@ -474,6 +476,11 @@ impl_dispose (GObject *object) priv->selected_not = 0; } + if (priv->activity_handler != NULL) { + g_object_unref (priv->activity_handler); + priv->activity_handler = NULL; + } + (* G_OBJECT_CLASS (parent_class)->dispose) (object); } @@ -515,8 +522,10 @@ impl_createControls (PortableServer_Servant servant, CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant)); CalendarComponentPrivate *priv; GtkWidget *selector_scrolled_window; + GtkWidget *statusbar_widget; BonoboControl *sidebar_control; BonoboControl *view_control; + BonoboControl *statusbar_control; priv = calendar_component->priv; @@ -566,6 +575,11 @@ impl_createControls (PortableServer_Servant servant, G_CALLBACK (fill_popup_menu_cb), G_OBJECT (calendar_component), 0); + statusbar_widget = e_task_bar_new (); + gtk_widget_show (statusbar_widget); + e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget)); + statusbar_control = bonobo_control_new (statusbar_widget); + /* Load the selection from the last run */ update_selection (calendar_component); update_primary_selection (calendar_component); @@ -577,16 +591,7 @@ impl_createControls (PortableServer_Servant servant, /* Return the controls */ *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev); *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev); - - /* FIXME temporary for testing. */ - { - GtkWidget *label = gtk_label_new ("Hey hey this is the calendar"); - BonoboControl *control; - - gtk_widget_show (label); - control = bonobo_control_new (label); - *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (control), ev); - } + *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev); } @@ -707,6 +712,8 @@ calendar_component_init (CalendarComponent *component) priv->source_list = e_source_list_new_for_gconf (priv->gconf_client, "/apps/evolution/calendar/sources"); + priv->activity_handler = e_activity_handler_new (); + /* create default calendars if there are no groups */ groups = e_source_list_peek_groups (priv->source_list); if (!groups) { @@ -779,4 +786,11 @@ calendar_component_peek_config_directory (CalendarComponent *component) } +EActivityHandler * +calendar_component_peek_activity_handler (CalendarComponent *component) +{ + return component->priv->activity_handler; +} + + BONOBO_TYPE_FUNC_FULL (CalendarComponent, GNOME_Evolution_Component, PARENT_TYPE, calendar_component) |