[anjuta] plugin-manager: Don't destroy available_plugins order in populate_plugin_model().
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] plugin-manager: Don't destroy available_plugins order in populate_plugin_model().
- Date: Tue, 27 Nov 2012 20:46:23 +0000 (UTC)
commit b8bd6371705ad02bcc0a895ba988e73fee092de9
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sun Nov 25 21:23:46 2012 +0100
plugin-manager: Don't destroy available_plugins order in populate_plugin_model().
The available_plugins list is sorted in dependency order so we should not destroy the ordering
by sorting it by name in populate_plugin_model().
https://bugzilla.gnome.org/show_bug.cgi?id=689054
libanjuta/anjuta-plugin-manager.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libanjuta/anjuta-plugin-manager.c b/libanjuta/anjuta-plugin-manager.c
index 8e26ea8..7ddcfdd 100644
--- a/libanjuta/anjuta-plugin-manager.c
+++ b/libanjuta/anjuta-plugin-manager.c
@@ -953,14 +953,15 @@ populate_plugin_model (AnjutaPluginManager *plugin_manager,
gboolean show_all)
{
AnjutaPluginManagerPriv *priv;
- GList *l;
+ GList *sorted_plugins, *l;
priv = plugin_manager->priv;
gtk_list_store_clear (store);
+
+ sorted_plugins = g_list_copy (priv->available_plugins);
+ sorted_plugins = g_list_sort (sorted_plugins, sort_plugins);
- priv->available_plugins = g_list_sort (priv->available_plugins, sort_plugins);
-
- for (l = priv->available_plugins; l != NULL; l = l->next)
+ for (l = sorted_plugins; l != NULL; l = l->next)
{
AnjutaPluginHandle *plugin = l->data;
@@ -1008,6 +1009,8 @@ populate_plugin_model (AnjutaPluginManager *plugin_manager,
}
}
}
+
+ g_list_free (sorted_plugins);
}
static GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]