[evolution-patches] fix for the bug 73879 [calendar]



Hi,
   Have attached a fix for the bug.

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2706
diff -u -p -r1.2706 ChangeLog
--- ChangeLog	31 Mar 2005 05:26:27 -0000	1.2706
+++ ChangeLog	31 Mar 2005 07:10:19 -0000
@@ -1,5 +1,17 @@
 2005-03-31  Chenthill Palanisamy  <pchenthill novell com>
 
+	Fixes #73879
+	* gui/dialogs/comp-editor.[ch]:
+	(comp_editor_sensitize_attachment_bar): Added a function
+	to sensitize/desensitize the attachment bar.
+	(comp_editor_notify_client_changed): When client changes
+	sensitize the attachment bar.
+	* gui/dialogs/event-editor.c: (event_editor_construct): 
+	* gui/dialogs/task-editor.c: (task_editor_construct): Sensitize
+	the attachment bar.
+
+2005-03-31  Chenthill Palanisamy  <pchenthill novell com>
+
 	Fixes #73969
 	* gui/e-calendar-view.c: (delete_event): Remove the
 	recurrence id property if its present.
Index: gui/dialogs/comp-editor.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.h,v
retrieving revision 1.25
diff -u -p -r1.25 comp-editor.h
--- gui/dialogs/comp-editor.h	4 Feb 2005 15:49:15 -0000	1.25
+++ gui/dialogs/comp-editor.h	31 Mar 2005 07:10:19 -0000
@@ -99,6 +99,7 @@ void          comp_editor_focus         
 
 void          comp_editor_notify_client_changed (CompEditor *editor, ECal *client);
 
+void comp_editor_sensitize_attachment_bar (CompEditor *editor, gboolean set);
 
 
 G_END_DECLS
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.125
diff -u -p -r1.125 comp-editor.c
--- gui/dialogs/comp-editor.c	8 Mar 2005 07:59:02 -0000	1.125
+++ gui/dialogs/comp-editor.c	31 Mar 2005 07:10:21 -0000
@@ -990,6 +990,20 @@ setup_widgets (CompEditor *editor)
 	
 }
 
+void
+comp_editor_sensitize_attachment_bar (CompEditor *editor, gboolean  set)
+{
+	CompEditorPrivate *priv;
+
+	g_return_if_fail (IS_COMP_EDITOR (editor));
+
+	priv = editor->priv;
+	
+	gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_bar),  set);
+	gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_scrolled_window),  set);
+	gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_expander),  set);
+}
+	
 /* Object initialization function for the calendar component editor */
 static void
 comp_editor_init (CompEditor *editor)
@@ -2014,7 +2028,7 @@ comp_editor_notify_client_changed (CompE
 
 	if (!e_cal_is_read_only (client, &read_only, NULL))
 		read_only = TRUE;
-
+	comp_editor_sensitize_attachment_bar (editor, !read_only);
 	gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_OK, !read_only);
 }
 
Index: gui/dialogs/event-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-editor.c,v
retrieving revision 1.60
diff -u -p -r1.60 event-editor.c
--- gui/dialogs/event-editor.c	21 Mar 2005 15:34:37 -0000	1.60
+++ gui/dialogs/event-editor.c	31 Mar 2005 07:10:21 -0000
@@ -129,6 +129,7 @@ EventEditor *
 event_editor_construct (EventEditor *ee, ECal *client)
 {
 	EventEditorPrivate *priv;
+	gboolean read_only = FALSE;
 
 	priv = ee->priv;
 
@@ -147,6 +148,10 @@ event_editor_construct (EventEditor *ee,
 	comp_editor_append_page (COMP_EDITOR (ee),
 				 COMP_EDITOR_PAGE (priv->recur_page),
 				 _("Recurrence"));
+
+	if (!e_cal_is_read_only (client, &read_only, NULL))
+			read_only = TRUE;
+	comp_editor_sensitize_attachment_bar (COMP_EDITOR (ee), !read_only);
 	
 	if (priv->is_meeting) {
 		if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
Index: gui/dialogs/task-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-editor.c,v
retrieving revision 1.82
diff -u -p -r1.82 task-editor.c
--- gui/dialogs/task-editor.c	21 Mar 2005 15:34:37 -0000	1.82
+++ gui/dialogs/task-editor.c	31 Mar 2005 07:10:21 -0000
@@ -125,6 +125,7 @@ TaskEditor *
 task_editor_construct (TaskEditor *te, ECal *client, gboolean is_assigned)
 {
 	TaskEditorPrivate *priv;
+	gboolean read_only = FALSE;
 	
 	priv = te->priv;
 
@@ -144,6 +145,11 @@ task_editor_construct (TaskEditor *te, E
 	comp_editor_append_page (COMP_EDITOR (te),
 				 COMP_EDITOR_PAGE (priv->task_details_page),
 				 _("Status"));
+	
+	if (!e_cal_is_read_only (client, &read_only, NULL))
+			read_only = TRUE;
+	comp_editor_sensitize_attachment_bar (COMP_EDITOR (te), !read_only);
+
 	if (priv->is_assigned) {
 		if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
 			task_page_show_options (priv->task_page);


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