[evolution-patches] patch for #73787 (shared-folder plugin)



hi,

the attached patch fixes
https://bugzilla.innerweb.novell.com/show_bug.cgi?id=73787&x=0&y=0

the changes are made in plugins/shared-folder/share-folder.c

Thanks,

Vivek Jain

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/shared-folder/ChangeLog,v
retrieving revision 1.12
diff -u -p -r1.12 ChangeLog
--- ChangeLog	10 Mar 2005 09:19:48 -0000	1.12
+++ ChangeLog	20 Mar 2005 11:41:58 -0000
@@ -1,3 +1,12 @@
+2005-03-20  Vivek Jain <jvivek novell com>
+	
+	**Fixes #73787 (bugzilla innerweb.novell)
+	* share-folder.c : 
+	(add_right_clicked)
+	(edit_right_clicked)
+	(delete_right_clicked) : use path passed in the callback to get the
+	current iterator
+
 2005-03-10  Vivek Jain <jvivek novell com>
 	
 	**Fixes #73201
Index: share-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/shared-folder/share-folder.c,v
retrieving revision 1.7
diff -u -p -r1.7 share-folder.c
--- share-folder.c	24 Jan 2005 14:52:32 -0000	1.7
+++ share-folder.c	20 Mar 2005 11:41:58 -0000
@@ -565,10 +565,11 @@ add_right_clicked (GtkCellRenderer *rend
 	SharedUser *usr = NULL;
 	EShUsers *user = NULL;
 	char *email = NULL;
-	GtkTreeSelection *selection = NULL;
-	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (sf->user_list));
-	gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
-	if (! gtk_tree_selection_get_selected (selection, &(sf->model), &(sf->iter)));
+	GtkTreePath *path = NULL;
+
+	path = gtk_tree_path_new_from_string (arg1);
+	if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path))
+		return ;
 	gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 1, &right , -1);
 	usr = find_node(sf->users_list, email);
 	if (!usr)
@@ -593,6 +594,11 @@ edit_right_clicked(GtkCellRenderer *rend
 	SharedUser *usr = NULL;
 	EShUsers *user = NULL;
 	char *email = NULL;
+	GtkTreePath *path = NULL;
+
+	path = gtk_tree_path_new_from_string (arg1);
+	if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path))
+		return;
 	gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 2, &right , -1);
 	usr = find_node(sf->users_list, email);
 	if(! usr->flag)  /* if user was already existing one change the flag to update*/
@@ -616,6 +622,11 @@ delete_right_clicked(GtkCellRenderer *re
 	SharedUser *usr = NULL;
 	EShUsers *user = NULL;
 	char *email = NULL;
+	GtkTreePath *path = NULL;
+
+	path = gtk_tree_path_new_from_string (arg1);
+	if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path))
+		return;
 	gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 3, &right , -1);
 	usr = find_node(sf->users_list, email);
 	if(! usr->flag)  /* if user was already existing one change the flag to update*/


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