From 42d2869230bcf0557ea0addb9b17f1fc7c9dc7d2 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 22 Jul 2004 13:05:20 +0000 Subject: Fixes #61738 2004-07-21 JP Rosevear Fixes #61738 * gui/dialogs/meeting-page.c (clear_widgets): by default we have a user as organizer (sensitize_widgets): use user_org to determine widget sensitivity (meeting_page_fill_widgets): set user_org value appropriately (change_clicked_cb): set user_org to TRUE svn path=/trunk/; revision=26701 --- calendar/ChangeLog | 10 ++++++++++ calendar/gui/dialogs/meeting-page.c | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index de88784aa0..e80cb59db7 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2004-07-21 JP Rosevear + + Fixes #61738 + + * gui/dialogs/meeting-page.c (clear_widgets): by default we have a + user as organizer + (sensitize_widgets): use user_org to determine widget sensitivity + (meeting_page_fill_widgets): set user_org value appropriately + (change_clicked_cb): set user_org to TRUE + 2004-07-21 JP Rosevear Fixes #61779 diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 712ffe47ef..f39e373012 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -85,6 +85,7 @@ struct _MeetingPagePrivate { gint row; /* For handling who the organizer is */ + gboolean user_org; gboolean existing; gboolean updating; @@ -316,12 +317,13 @@ clear_widgets (MeetingPage *mpage) gtk_widget_hide (priv->existing_organizer_table); priv->existing = FALSE; + priv->user_org = TRUE; } static void sensitize_widgets (MeetingPage *mpage) { - gboolean read_only; + gboolean read_only, user_org; MeetingPagePrivate *priv = mpage->priv; if (!e_cal_is_read_only (COMP_EDITOR_PAGE (mpage)->client, &read_only, NULL)) @@ -329,9 +331,9 @@ sensitize_widgets (MeetingPage *mpage) gtk_widget_set_sensitive (priv->organizer, !read_only); gtk_widget_set_sensitive (priv->existing_organizer_btn, !read_only); - gtk_widget_set_sensitive (priv->add, !read_only); - gtk_widget_set_sensitive (priv->remove, !read_only); - gtk_widget_set_sensitive (priv->invite, !read_only); + gtk_widget_set_sensitive (priv->add, !read_only && priv->user_org); + gtk_widget_set_sensitive (priv->remove, !read_only && priv->user_org); + gtk_widget_set_sensitive (priv->invite, !read_only && priv->user_org); gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only); } @@ -379,6 +381,7 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) page->client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) gtk_widget_hide (priv->existing_organizer_btn); + priv->user_org = TRUE; } else { if (e_cal_get_static_capability ( page->client, @@ -387,6 +390,7 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) gtk_widget_set_sensitive (priv->invite, FALSE); gtk_widget_set_sensitive (priv->add, FALSE); gtk_widget_set_sensitive (priv->remove, FALSE); + priv->user_org = FALSE; } if (organizer.cn != NULL) @@ -580,6 +584,7 @@ change_clicked_cb (GtkWidget *widget, gpointer data) comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage)); priv->existing = FALSE; + priv->user_org = TRUE; } static void -- cgit