[evolution-patches] HACKFEST: Fix for 237844



Hi,

Patch to solve problems while creating appointments with blank summary.
Please review it. Fixes #237844

Thanks,
Sankar 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2727
diff -u -p -r1.2727 ChangeLog
--- ChangeLog	10 May 2005 08:14:41 -0000	1.2727
+++ ChangeLog	12 May 2005 06:51:41 -0000
@@ -1,3 +1,13 @@
+2005-05-12  Sankar P <psankar novell com>
+
+	* gui/dialogs/comp-editor.c (response_cb):
+	Changed the way in which calendars having null summary are handled.
+	Fixes #237844
+
+	*calendar-errors.xml
+	Changed the button label from Send to Save
+	
+
 2005-05-09  Rodrigo Moya <rodrigo novell com>
 
 	Fixes #301350
Index: calendar-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar-errors.xml,v
retrieving revision 1.12
diff -u -p -r1.12 calendar-errors.xml
--- calendar-errors.xml	6 May 2005 05:17:05 -0000	1.12
+++ calendar-errors.xml	12 May 2005 06:51:41 -0000
@@ -185,7 +185,7 @@
   <primary>Are you sure you want to send the appointment without a summary?</primary>
   <secondary>Adding a meaningful Summary to your appointment will give your recipients an idea of what your appointment is about.</secondary>
   <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
-  <button label="_Send" response="GTK_RESPONSE_YES"/>
+  <button label="_Save" response="GTK_RESPONSE_YES"/>
  </error>
 
  <error id="prompt-send-no-subject-task" type="question" default="GTK_RESPONSE_YES">
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.127
diff -u -p -r1.127 comp-editor.c
--- gui/dialogs/comp-editor.c	6 May 2005 03:29:56 -0000	1.127
+++ gui/dialogs/comp-editor.c	12 May 2005 06:51:41 -0000
@@ -780,34 +780,35 @@ response_cb (GtkWidget *widget, int resp
 	CompEditor *editor = COMP_EDITOR (data);
 	CompEditorPrivate *priv;
 	ECalComponentText text;
-	
+	ECalComponent *comp;
+
 	priv = editor->priv;
 
+	g_print ("\n\aCOMING TO RESPONSE_CB FUNCTION");
 	switch (response) {
-	case GTK_RESPONSE_OK:
-		commit_all_fields (editor);
-		
-		if (e_cal_component_is_instance (priv->comp))
-			if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
-				return;
-	
-		if (save_comp_with_send (editor)) {
-	
-			e_cal_component_get_summary (priv->comp, &text);
-		
-			if (!text.value) {
+		case GTK_RESPONSE_OK:
+			commit_all_fields (editor);
+
+			if (e_cal_component_is_instance (priv->comp))
+				if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
+					return;
+
+			comp = comp_editor_get_current_comp (editor);
+			e_cal_component_get_summary (comp, &text);
+			g_object_unref (comp);
+			
+			if (!text.value) 
 				if (!send_component_prompt_subject ((GtkWindow *) editor, priv->client, priv->comp))
 					return;
-			}
-			close_dialog (editor);
-		}
-
-		break;
-	case GTK_RESPONSE_HELP:
-		comp_editor_show_help (editor);
 
-		break;
-	case GTK_RESPONSE_CANCEL:
+			if (save_comp_with_send (editor)) 
+				close_dialog (editor);
+			break;
+		case GTK_RESPONSE_HELP:
+			comp_editor_show_help (editor);
+
+			break;
+		case GTK_RESPONSE_CANCEL:
 		commit_all_fields (editor);
 		
 		if (prompt_to_save_changes (editor, TRUE))


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