[evolution-patches] patch for #67403 (calendar) for 2.0.x



-- 
Rodrigo Moya <rodrigo novell com>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2570
diff -u -p -r1.2570 ChangeLog
--- ChangeLog	29 Nov 2004 09:03:43 -0000	1.2570
+++ ChangeLog	1 Dec 2004 12:20:26 -0000
@@ -1,4 +1,16 @@
+2004-12-01  Rodrigo Moya <rodrigo novell com>
+
+	Fixes #67403
+
+	* gui/dialogs/event-page.c (sensitize_widgets): don't unsensitize
+	the 'Customize' button, to allow users to look at the alarm list
+	for read only events.
+
+	* gui/dialogs/alarm-list-dialog.c (sensitize_buttons): unsensitize
+	buttons if the event is read only.
+
 2004-11-29  Chenthill Palanisamy  <pchenthill novell com>
+
 	* calendar-errors.xml.h: committng this file. Missed to
 	commit this one.
 
Index: gui/dialogs/event-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.c,v
retrieving revision 1.75
diff -u -p -r1.75 event-page.c
--- gui/dialogs/event-page.c	13 Oct 2004 18:37:05 -0000	1.75
+++ gui/dialogs/event-page.c	1 Dec 2004 12:20:26 -0000
@@ -611,7 +611,7 @@ sensitize_widgets (EventPage *epage)
 	gtk_widget_set_sensitive (priv->show_time_as_busy, !read_only);
 	gtk_widget_set_sensitive (priv->alarm, !read_only);
 	gtk_widget_set_sensitive (priv->alarm_time, !read_only && !custom && alarm);
-	gtk_widget_set_sensitive (priv->alarm_custom, !read_only && alarm);
+	gtk_widget_set_sensitive (priv->alarm_custom, alarm);
 	if (custom)
 		gtk_widget_show (priv->alarm_warning);
 	else
Index: gui/dialogs/alarm-list-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/alarm-list-dialog.c,v
retrieving revision 1.3
diff -u -p -r1.3 alarm-list-dialog.c
--- gui/dialogs/alarm-list-dialog.c	24 Jun 2004 21:35:43 -0000	1.3
+++ gui/dialogs/alarm-list-dialog.c	1 Dec 2004 12:20:26 -0000
@@ -93,16 +93,19 @@ sensitize_buttons (Dialog *dialog)
 {
 	GtkTreeSelection *selection;
 	GtkTreeIter iter;
-	gboolean have_selected;
+	gboolean have_selected, read_only;
+
+	if (!e_cal_is_read_only (dialog->ecal, &read_only, NULL))
+		read_only = TRUE;
 
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list));
 	have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
 
-	if (e_cal_get_one_alarm_only (dialog->ecal) && have_selected)
+	if ((e_cal_get_one_alarm_only (dialog->ecal) && have_selected) || read_only)
 		gtk_widget_set_sensitive (dialog->add, FALSE);
 	else
 		gtk_widget_set_sensitive (dialog->add, TRUE);
-	gtk_widget_set_sensitive (dialog->delete, have_selected);
+	gtk_widget_set_sensitive (dialog->delete, have_selected && !read_only);
 }
 
 /* Callback used for the "add reminder" button */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]