SF.net SVN: geany:[3398] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Dec 18 17:28:11 UTC 2008


Revision: 3398
          http://geany.svn.sourceforge.net/geany/?rev=3398&view=rev
Author:   ntrel
Date:     2008-12-18 17:28:11 +0000 (Thu, 18 Dec 2008)

Log Message:
-----------
On quitting, sort list of active plugins by plugin name.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/plugins.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-12-18 16:26:26 UTC (rev 3397)
+++ trunk/ChangeLog	2008-12-18 17:28:11 UTC (rev 3398)
@@ -2,6 +2,8 @@
 
  * tagmanager/html.c:
    Also parse headings with tags inside header tag.
+ * src/plugins.c:
+   On quitting, sort list of active plugins by plugin name.
 
 
  2008-12-17  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c	2008-12-18 16:26:26 UTC (rev 3397)
+++ trunk/src/plugins.c	2008-12-18 17:28:11 UTC (rev 3398)
@@ -856,6 +856,15 @@
 }
 
 
+static gint cmp_plugin_names(gconstpointer a, gconstpointer b)
+{
+	const Plugin *pa = a;
+	const Plugin *pb = b;
+
+	return strcmp(pa->info.name, pb->info.name);
+}
+
+
 static void update_active_plugins_pref(void)
 {
 	gint i = 0;
@@ -870,6 +879,10 @@
 		return;
 	}
 
+	/* sort the list so next time tools menu items are sorted by plugin name
+	 * (not ideal to do here, but better than nothing) */
+	active_plugin_list = g_list_sort(active_plugin_list, cmp_plugin_names);
+
 	active_plugins_pref = g_new0(gchar*, count + 1);
 
 	for (list = g_list_first(active_plugin_list); list != NULL; list = list->next)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list