aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-page.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-06-08 23:58:12 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-06-08 23:58:12 +0800
commit7601e9e71eb0f412b7671954c8724e1820e519cd (patch)
tree412e8c2d6396369899c4cebd0d1f217b07bffd66 /calendar/gui/dialogs/event-page.c
parentc2d7dc57764bc05a28d3b765f50ccff901524fba (diff)
downloadgsoc2013-evolution-7601e9e71eb0f412b7671954c8724e1820e519cd.tar.gz
gsoc2013-evolution-7601e9e71eb0f412b7671954c8724e1820e519cd.tar.zst
gsoc2013-evolution-7601e9e71eb0f412b7671954c8724e1820e519cd.zip
do not set the private client here, it is set in comp-editor.c.
2004-06-08 Rodrigo Moya <rodrigo@novell.com> * gui/dialogs/comp-editor-page.c (comp_editor_page_notify_client_changed): do not set the private client here, it is set in comp-editor.c. * gui/dialogs/event-page.c (sensitize_widgets): new function. (source_changed_cb): call sensitize_buttons(). * gui/dialogs/recurrence-page.c (sensitize_buttons): new function, to deal correctly with the sensitivity of all widgets in the page. (recurrence_page_fill_widgets, type_toggled_cb, client_changed_cb): call sensitize_buttons() instead of sensitize_recur_widgets(). (recurrence_page_construct): g_signal_connect_after for "client_changed", to get notifications after CompEditorPage gets his. * gui/dialogs/alarm-page.c (sensitize_buttons): sensitize the missing widgets in the page. (alarm_page_construct): g_signal_connect_after for "client_changed", to get notifications after CompEditorPage gets his. svn path=/trunk/; revision=26254
Diffstat (limited to 'calendar/gui/dialogs/event-page.c')
-rw-r--r--calendar/gui/dialogs/event-page.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index cd7bbe12ce..abdc84aa34 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -408,6 +408,33 @@ clear_widgets (EventPage *epage)
e_dialog_editable_set (priv->categories, NULL);
}
+static void
+sensitize_widgets (EventPage *epage)
+{
+ gboolean read_only;
+ EventPagePrivate *priv;
+
+ priv = epage->priv;
+
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (epage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_widget_set_sensitive (priv->summary, !read_only);
+ gtk_widget_set_sensitive (priv->location, !read_only);
+ gtk_widget_set_sensitive (priv->start_time, !read_only);
+ gtk_widget_set_sensitive (priv->start_timezone, !read_only);
+ gtk_widget_set_sensitive (priv->end_time, !read_only);
+ gtk_widget_set_sensitive (priv->end_timezone, !read_only);
+ gtk_widget_set_sensitive (priv->all_day_event, !read_only);
+ gtk_widget_set_sensitive (priv->description, !read_only);
+ gtk_widget_set_sensitive (priv->classification_public, !read_only);
+ gtk_widget_set_sensitive (priv->classification_private, !read_only);
+ gtk_widget_set_sensitive (priv->classification_confidential, !read_only);
+ gtk_widget_set_sensitive (priv->show_time_as_free, !read_only);
+ gtk_widget_set_sensitive (priv->show_time_as_busy, !read_only);
+ gtk_widget_set_sensitive (priv->categories_btn, !read_only);
+ gtk_widget_set_sensitive (priv->categories, !read_only);
+}
/* fill_widgets handler for the event page */
static gboolean
@@ -532,6 +559,8 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->updating = FALSE;
+ sensitize_widgets (epage);
+
return validated;
}
@@ -1269,6 +1298,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
gtk_widget_destroy (dialog);
} else {
comp_editor_page_notify_client_changed (COMP_EDITOR_PAGE (epage), client);
+ sensitize_widgets (epage);
}
}
}