[evolution-patches] [Calendar] Fix for 312423, 329749



Hi

Attached patch for 312423, 329749

Please review.

Thanks
Johnny
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2999
diff -u -p -r1.2999 ChangeLog
--- ChangeLog	15 Feb 2006 06:40:20 -0000	1.2999
+++ ChangeLog	17 Feb 2006 09:45:32 -0000
@@ -1,3 +1,12 @@
+2006-02-17  Johnny Jacob  <johnnyjacob gmail com>
+
+	Fixes #312423, #329749
+	* gui/dialogs/event-page.c: (sensitize_widgets): Enable/Disable
+	based on read_only status.
+	(alarm_store_changed_cb): Added. Changed signal handler for alarm list.
+	* gui/dialogs/alatm-list-dialog.c: (edit_clicked_cb): Emit changed 
+	signal for alarm list.
+
 2006-02-15  Rajeev ramanathan <rajeevramanathan_2004 yahoo co in>
 
 	* gui/dialogs/memo-page.glade: Changed the layout spacing of memo 
Index: gui/dialogs/event-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.c,v
retrieving revision 1.108
diff -u -p -r1.108 event-page.c
--- gui/dialogs/event-page.c	9 Feb 2006 04:57:51 -0000	1.108
+++ gui/dialogs/event-page.c	17 Feb 2006 09:45:42 -0000
@@ -808,16 +809,16 @@ sensitize_widgets (EventPage *epage)
 		gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6);
 	}
 	
-	gtk_entry_set_editable (GTK_ENTRY (priv->summary), sensitize);
+	gtk_entry_set_editable (GTK_ENTRY (priv->summary), !read_only);
 	gtk_entry_set_editable (GTK_ENTRY (priv->location), sensitize);
 	gtk_widget_set_sensitive (priv->alarm_box, custom);	
 	gtk_widget_set_sensitive (priv->start_time, sensitize);
 	gtk_widget_set_sensitive (priv->start_timezone, sensitize);
 	gtk_widget_set_sensitive (priv->end_time, sensitize);
 	gtk_widget_set_sensitive (priv->end_timezone, sensitize);
-	gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->description), sensitize);
+	gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->description), !read_only);
 	gtk_widget_set_sensitive (priv->alarm_time, !read_only);
-	gtk_widget_set_sensitive (priv->categories_btn, sensitize);
+	gtk_widget_set_sensitive (priv->categories_btn, !read_only);
 	/*TODO implement the for portion of the end time selector */
 	if ( (COMP_EDITOR_PAGE(epage)->flags) & COMP_EDITOR_PAGE_NEW_ITEM ) {
 		if (priv->all_day_event)
@@ -850,7 +851,7 @@ sensitize_widgets (EventPage *epage)
 			, NULL);
 	bonobo_ui_component_set_prop (priv->uic, "/commands/ActionAllDayEvent", "sensitive", sensitize ? "1" : "0"
 			, NULL);
-	bonobo_ui_component_set_prop (priv->uic, "/commands/ActionRecurrence", "sensitive", sensitize ? "1" : "0"
+	bonobo_ui_component_set_prop (priv->uic, "/commands/ActionRecurrence", "sensitive", !read_only ? "1" : "0"
 			, NULL);
 	bonobo_ui_component_set_prop (priv->uic, "/commands/ActionShowTimeBusy", "sensitive", !read_only ? "1" : "0"
 			, NULL);
@@ -2740,6 +2741,12 @@ alarm_store_deleted_cb (EAlarmList *alar
 	field_changed_cb (NULL, data);
 }
 
+static void 
+alarm_store_changed_cb (EAlarmList *alarm_list_store, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+{
+	field_changed_cb (NULL, data);
+}
+
 static void
 alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
 {
@@ -2843,7 +2850,8 @@ init_widgets (EventPage *epage)
 			    G_CALLBACK (alarm_store_inserted_cb), epage);
 	g_signal_connect((GtkTreeModel *)(priv->alarm_list_store), "row-deleted",
 			    G_CALLBACK (alarm_store_deleted_cb), epage);
-
+	g_signal_connect((GtkTreeModel *)(priv->alarm_list_store), "row-changed",
+ 			    G_CALLBACK (alarm_store_changed_cb), epage);
 
 	/* Timezone changed */
 	g_signal_connect((priv->start_timezone), "changed",
Index: gui/dialogs/alarm-list-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/alarm-list-dialog.c,v
retrieving revision 1.9
diff -u -p -r1.9 alarm-list-dialog.c
--- gui/dialogs/alarm-list-dialog.c	30 Jan 2006 09:33:36 -0000	1.9
+++ gui/dialogs/alarm-list-dialog.c	17 Feb 2006 09:45:49 -0000
@@ -170,9 +170,12 @@ edit_clicked_cb (GtkButton *button, gpoi
 	}
 
 	alarm = e_alarm_list_get_alarm (dialog->list_store, &iter);
+	path = gtk_tree_model_get_path (GTK_TREE_MODEL (dialog->list_store), &iter);
 
-	if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm))
+	if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm)) {
 		gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
+		gtk_tree_model_row_changed (GTK_TREE_MODEL (dialog->list_store), path, &iter);
+	}
 }
 
 /* Callback used for the "delete reminder" button */


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