Revision: 1372
http://geeqie.svn.sourceforge.net/geeqie/?rev=1372&view=rev
Author: zas_
Date: 2009-02-03 08:41:21 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
editor_list_get() now returns a sorted list, this way items appear in the same
order in all menus.
Modified Paths:
--------------
trunk/src/editors.c
trunk/src/layout_util.c
Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-02-02 20:32:59 UTC (rev 1371)
+++ trunk/src/editors.c 2009-02-03 08:41:21 UTC (rev 1372)
@@ -372,10 +372,24 @@
*listp = g_list_prepend(*listp, editor);
}
+static gint editor_sort(gconstpointer a, gconstpointer b)
+{
+ const EditorDescription *ea = a;
+ const EditorDescription *eb = b;
+ int ret;
+
+ ret = strcmp(ea->menu_path, eb->menu_path);
+ if (ret != 0) return ret;
+
+ return g_utf8_collate(ea->name, eb->name);
+}
+
GList *editor_list_get(void)
{
GList *editors_list = NULL;
g_hash_table_foreach(editors, editor_list_add_cb, &editors_list);
+ editors_list = g_list_sort(editors_list, editor_sort);
+
return editors_list;
}
Modified: trunk/src/layout_util.c
===================================================================
--- trunk/src/layout_util.c 2009-02-02 20:32:59 UTC (rev 1371)
+++ trunk/src/layout_util.c 2009-02-03 08:41:21 UTC (rev 1372)
@@ -1512,18 +1512,6 @@
g_string_free(desc, TRUE);
}
-static gint layout_actions_editor_sort(gconstpointer a, gconstpointer b)
-{
- const EditorDescription *ea = a;
- const EditorDescription *eb = b;
- int ret;
-
- ret = strcmp(ea->menu_path, eb->menu_path);
- if (ret != 0) return ret;
-
- return g_utf8_collate(ea->name, eb->name);
-}
-
static GList *layout_actions_editor_menu_path(EditorDescription *editor)
{
gchar **split = g_strsplit(editor->menu_path, "/", 0);
@@ -1617,7 +1605,6 @@
" <menubar name='MainMenu'>");
editors_list = editor_list_get();
- editors_list = g_list_sort(editors_list, layout_actions_editor_sort);
old_path = NULL;
work = editors_list;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn