network-manager-applet r556 - in trunk: . src/connection-editor



Author: dcbw
Date: Mon Feb 25 02:58:55 2008
New Revision: 556
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=556&view=rev

Log:
2008-02-24  Dan Williams  <dcbw redhat com>

	* src/connection-editor/nm-connection-list.c
		- (delete_connection_cb): fix removal of connections from the list
			and internal connection hash



Modified:
   trunk/ChangeLog
   trunk/src/connection-editor/nm-connection-list.c

Modified: trunk/src/connection-editor/nm-connection-list.c
==============================================================================
--- trunk/src/connection-editor/nm-connection-list.c	(original)
+++ trunk/src/connection-editor/nm-connection-list.c	Mon Feb 25 02:58:55 2008
@@ -131,8 +131,8 @@
 	gint result;
 	const char *dir;
 	GError *error = NULL;
-	GtkTreeModel *model = NULL;
-	GtkTreeIter iter;
+	GtkTreeModel *model = NULL, *sorted_model;
+	GtkTreeIter iter, sorted_iter;
 
 	connection = get_connection_for_selection (clist, &model, &iter);
 	g_return_if_fail (connection != NULL);
@@ -170,7 +170,11 @@
 		g_error_free (error);
 	}
 
-	gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+	gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (model),
+	                                                &sorted_iter,
+	                                                &iter);
+	sorted_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (model));
+	gtk_list_store_remove (GTK_LIST_STORE (sorted_model), &sorted_iter);
 
 	if (!g_hash_table_remove (list->connections, dir))
 		g_warning ("%s: couldn't remove connection from hash table.", __func__);



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