*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;
}
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);
" <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;