aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-06-22 22:32:36 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-06-22 22:32:36 +0800
commit6233ffcdc44f613aed1314ed2c8ac605115b5fa4 (patch)
tree8cfda10bacc9b6aa392e2ddc7ee5e801eab8d98a /calendar/gui
parentca3816102af57541751a1f9a92a8d04a0a7fa3b9 (diff)
downloadgsoc2013-evolution-6233ffcdc44f613aed1314ed2c8ac605115b5fa4.tar.gz
gsoc2013-evolution-6233ffcdc44f613aed1314ed2c8ac605115b5fa4.tar.zst
gsoc2013-evolution-6233ffcdc44f613aed1314ed2c8ac605115b5fa4.zip
Commiting the fix for free busy and sensitizing the attachment bar properly.
svn path=/trunk/; revision=29566
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/comp-editor.c3
-rw-r--r--calendar/gui/dialogs/event-editor.c27
-rw-r--r--calendar/gui/dialogs/event-page.c5
-rw-r--r--calendar/gui/e-calendar-view.c12
-rw-r--r--calendar/gui/e-meeting-store.c5
5 files changed, 32 insertions, 20 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index e7bc7efa9c..3f4b33b5b0 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1817,9 +1817,6 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
e_cal_get_local_attachment_store (priv->client));
cal_attachment_bar_set_comp_uid (priv->attachment_bar, g_strdup (uid));
- if (!itip_organizer_is_user (comp, priv->client))
- comp_editor_sensitize_attachment_bar (editor, FALSE);
-
fill_widgets (editor);
priv->changed =FALSE;
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 01ec3936f1..6566f7198c 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -130,6 +130,7 @@ event_editor_construct (EventEditor *ee, ECal *client)
{
EventEditorPrivate *priv;
gboolean read_only = FALSE;
+ guint32 flags = comp_editor_get_flags (COMP_EDITOR (ee));
priv = ee->priv;
@@ -151,19 +152,23 @@ event_editor_construct (EventEditor *ee, ECal *client)
if (!e_cal_is_read_only (client, &read_only, NULL))
read_only = TRUE;
- comp_editor_sensitize_attachment_bar (COMP_EDITOR (ee), !read_only);
+ comp_editor_sensitize_attachment_bar (COMP_EDITOR (ee), !read_only &&
+ (flags & COMP_EDITOR_USER_ORG));
if (priv->is_meeting) {
+
if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
event_page_show_options (priv->event_page);
comp_editor_set_group_item (COMP_EDITOR (ee), TRUE);
- priv->sched_page = schedule_page_new (priv->model);
- g_object_ref (priv->sched_page);
- gtk_object_sink (GTK_OBJECT (priv->sched_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
+ if ((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)) {
+ priv->sched_page = schedule_page_new (priv->model);
+ g_object_ref (priv->sched_page);
+ gtk_object_sink (GTK_OBJECT (priv->sched_page));
+ comp_editor_append_page (COMP_EDITOR (ee),
+ COMP_EDITOR_PAGE (priv->sched_page),
+ _("Scheduling"));
+ }
priv->meet_page = meeting_page_new (priv->model, client);
g_object_ref (priv->meet_page);
@@ -231,7 +236,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
e_meeting_store_remove_all_attendees (priv->model);
/* Set up the attendees */
- if (attendees == NULL && !(comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE)) {
+ if (attendees == NULL && !delegate) {
if (priv->meet_page)
comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));
if (priv->sched_page)
@@ -414,7 +419,6 @@ show_meeting (EventEditor *ee)
priv = ee->priv;
-
event_page_set_meeting (priv->event_page, TRUE);
if (!priv->meeting_shown) {
comp_editor_append_page (COMP_EDITOR (ee),
@@ -428,9 +432,8 @@ show_meeting (EventEditor *ee)
comp_editor_set_changed (COMP_EDITOR (ee), FALSE);
comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown);
}
- if (comp_editor_get_flags (COMP_EDITOR (ee)) & COMP_EDITOR_DELEGATE)
- comp_editor_show_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->meet_page));
-
+ if (comp_editor_get_flags (COMP_EDITOR (ee)) & COMP_EDITOR_DELEGATE)
+ comp_editor_show_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->meet_page));
}
void
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 5c934f338f..3406e52351 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -680,7 +680,6 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
ECalComponentClassification cl;
ECalComponentTransparency transparency;
ECalComponentDateTime start_date, end_date;
- icalcomponent *icalcomp = NULL;
const char *location, *uid = NULL;
const char *categories;
ESource *source;
@@ -802,8 +801,8 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source);
e_cal_component_get_uid (comp, &uid);
- if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE) && e_cal_get_object (COMP_EDITOR_PAGE (epage)->client, uid, NULL, &icalcomp, NULL)) {
- icalcomponent_free (icalcomp);
+ if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE)
+ && !(COMP_EDITOR_PAGE (epage)->flags && COMP_EDITOR_PAGE_NEW_ITEM)) {
event_page_hide_options (epage);
}
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index d37ef722f6..05bedbbd84 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1679,8 +1679,10 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
e_cal_component_commit_sequence (comp);
flags |= COMP_EDITOR_NEW_ITEM;
- if (meeting)
+ if (meeting) {
flags |= COMP_EDITOR_MEETING;
+ flags |= COMP_EDITOR_USER_ORG;
+ }
open_event_with_flags (cal_view, e_cal_model_get_default_client (priv->model),
icalcomp, flags);
@@ -1779,8 +1781,14 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
g_return_if_fail (E_IS_CAL (client));
g_return_if_fail (icalcomp != NULL);
- if (meeting)
+ if (meeting) {
+ ECalComponent *comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
flags |= COMP_EDITOR_MEETING;
+ if (itip_organizer_is_user (comp, client))
+ flags |= COMP_EDITOR_USER_ORG;
+ g_object_unref (comp);
+ }
open_event_with_flags (cal_view, client, icalcomp, flags);
}
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 7cbfbe2b79..6eaf3da250 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -1225,9 +1225,14 @@ freebusy_async (gpointer data)
FreeBusyAsyncData *fbd = data;
EMeetingAttendee *attendee = fbd->attendee;
gchar *default_fb_uri;
+ static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
if (fbd->client) {
+ /* FIXME this a work around for getting all th free busy information for the users
+ we should be able to get free busy asynchronously */
+ g_mutex_lock (&mutex);
e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL);
+ g_mutex_unlock (&mutex);
g_list_foreach (fbd->users, (GFunc)g_free, NULL);
g_list_free (fbd->users);