diff options
author | Dan Winship <danw@src.gnome.org> | 2002-09-28 04:23:20 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-09-28 04:23:20 +0800 |
commit | fc2c499f8bc737190309484a96e13dccd3cefbdf (patch) | |
tree | 00a346afe0e783978d6c684ebabc7de25eff9fe8 /calendar/gui/dialogs/event-editor.c | |
parent | 7ed66fac42704097175f778660e391e86cc6d55d (diff) | |
download | gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar.gz gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar.bz2 gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar.lz gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar.xz gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.tar.zst gsoc2013-evolution-fc2c499f8bc737190309484a96e13dccd3cefbdf.zip |
Non-Connector part of #29334 (meeting created by a delegate in the
delegator's calendar should have the delegator as Organizer).
* idl/evolution-calendar.idl: add Cal_getEmailAddress, to return
the email address associated with a backend (if any).
* pcs/cal-backend.c (cal_backend_get_email_address): New.
* pcs/cal-backend-file.c (cal_backend_file_get_email_address):
Return NULL (for now).
* pcs/cal.c (impl_Cal_get_email_address): Implement this by
calling cal_backend_get_email_address and returning a NotFound
exception if it returns NULL.
* cal-client/cal-client.c (cal_client_get_email_address): New.
(cal_client_init, cal_client_destroy, etc): initialize/free
email_address
* gui/dialogs/event-editor.c (event_editor_construct): Split this
out of event_editor_init. Take and set a CalClient.
(event_editor_new): Take a CalClient.
* gui/dialogs/task-editor.c (task_editor_construct,
task_editor_new): Likewise.
* gui/dialogs/meeting-page.c (meeting_page_new,
meeting_page_construct): Take a CalClient and call
cal_client_get_email_address to find the default organizer
address. (Also fix a bug if the default account's name has
non-ASCII characters.)
* gui/itip-utils.c (comp_from): New. When sending a REQUEST or
CANCEL, use the Organizer as the From address.
(itip_send_comp): Call comp_from and pass the result to
Composer_setHeaders.
* gui/comp-editor-factory.c (edit_existing, edit_new): Pass the
CalClient to event_editor_new/task_editor_new
* gui/e-calendar-table.c (open_task): Likewise.
* gui/e-tasks.c (e_tasks_new_task): Likewise.
* gui/gnome-cal.c (gnome_calendar_edit_object,
gnome_calendar_new_task): Likewise.
svn path=/trunk/; revision=18253
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 20b91475d4..4ee2556d97 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -188,6 +188,18 @@ event_editor_init (EventEditor *ee) priv = g_new0 (EventEditorPrivate, 1); ee->priv = priv; + priv->model = E_MEETING_MODEL (e_meeting_model_new ()); + priv->meeting_shown = TRUE; + priv->updating = FALSE; +} + +EventEditor * +event_editor_construct (EventEditor *ee, CalClient *client) +{ + EventEditorPrivate *priv; + + priv = ee->priv; + priv->event_page = event_page_new (); comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->event_page), @@ -203,25 +215,24 @@ event_editor_init (EventEditor *ee) COMP_EDITOR_PAGE (priv->recur_page), _("Recurrence")); - priv->model = E_MEETING_MODEL (e_meeting_model_new ()); - priv->sched_page = schedule_page_new (priv->model); comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->sched_page), _("Scheduling")); - priv->meet_page = meeting_page_new (priv->model); + priv->meet_page = meeting_page_new (priv->model, client); comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->meet_page), _("Meeting")); - comp_editor_merge_ui (COMP_EDITOR (ee), "evolution-event-editor.xml", verbs, pixmaps); + comp_editor_set_cal_client (COMP_EDITOR (ee), client); - priv->meeting_shown = TRUE; - priv->updating = FALSE; + comp_editor_merge_ui (COMP_EDITOR (ee), "evolution-event-editor.xml", verbs, pixmaps); init_widgets (ee); set_menu_sens (ee); + + return ee; } static void @@ -382,6 +393,7 @@ event_editor_destroy (GtkObject *object) /** * event_editor_new: + * @client: a CalClient * * Creates a new event editor dialog. * @@ -389,9 +401,12 @@ event_editor_destroy (GtkObject *object) * editor could not be created. **/ EventEditor * -event_editor_new (void) +event_editor_new (CalClient *client) { - return EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR)); + EventEditor *ee; + + ee = EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR)); + return event_editor_construct (ee, client); } static void |