[evolution-patches] [Calendar] Fix for #329710, #328389



Hi,
Sending patch for review

Rajeev

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Index: publish-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/publish-calendar/publish-calendar.c,v
retrieving revision 1.3
diff -u -p -r1.3 publish-calendar.c
--- publish-calendar.c	25 Jan 2006 07:29:18 -0000	1.3
+++ publish-calendar.c	9 Feb 2006 13:21:47 -0000
@@ -273,6 +273,12 @@ url_list_enable_toggled (GtkCellRenderer
 		gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
 
 		url->enabled = !url->enabled;
+
+		if (url->enabled)
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Disable");
+		else	
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Enable");
+
 		gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, url->enabled, -1);
 	}
 
@@ -284,11 +290,19 @@ selection_changed (GtkTreeSelection *sel
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter;
+	EPublishUri *url = NULL;
 
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+		gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
 		gtk_widget_set_sensitive (ui->url_edit, TRUE);
 		gtk_widget_set_sensitive (ui->url_remove, TRUE);
 		gtk_widget_set_sensitive (ui->url_enable, TRUE);
+		
+		if (url->enabled)
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Disable");
+		else	
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Enable");
+
 	} else {
 		gtk_widget_set_sensitive (ui->url_edit, FALSE);
 		gtk_widget_set_sensitive (ui->url_remove, FALSE);
@@ -422,12 +436,18 @@ url_enable_clicked (GtkButton *button, P
 	GtkTreeSelection *selection;
 	GtkTreeModel *model;
 	GtkTreeIter iter;
-
+	
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
 		gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
 		url->enabled = !url->enabled;
-		gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_URL_COLUMN, url->enabled, -1);
+
+		if(url->enabled)
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Disable");			
+		else
+			gtk_button_set_label ((GtkButton *)ui->url_enable, "Enable");
+
+		gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, url->enabled, -1);
 		gtk_tree_selection_select_iter (selection, &iter);
 		url_list_changed (ui);
 	}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/publish-calendar/ChangeLog,v
retrieving revision 1.12
diff -u -p -r1.12 ChangeLog
--- ChangeLog	30 Jan 2006 10:49:25 -0000	1.12
+++ ChangeLog	9 Feb 2006 13:21:53 -0000
@@ -1,3 +1,9 @@
+2006-02-09  Rajeev ramanathan <rajeevramanathan_2004 yahoo co in>
+
+	Fixes #328389, #329710
+	* publish-calendar.c: Changed label of Enable button to Disable 
+	for Enabled Url.
+
 2006-01-30  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #328413


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