Revision: 3664 http://geany.svn.sourceforge.net/geany/?rev=3664&view=rev Author: ntrel Date: 2009-03-27 15:52:38 +0000 (Fri, 27 Mar 2009)
Log Message: ----------- Fix Gtk warnings & sort by filetype title, not name.
Modified Paths: -------------- branches/reorder-filetypes/src/filetypes.c branches/reorder-filetypes/src/filetypes.h
Modified: branches/reorder-filetypes/src/filetypes.c =================================================================== --- branches/reorder-filetypes/src/filetypes.c 2009-03-27 15:40:19 UTC (rev 3663) +++ branches/reorder-filetypes/src/filetypes.c 2009-03-27 15:52:38 UTC (rev 3664) @@ -596,7 +596,7 @@ { const GeanyFiletype *ft1 = pft1, *ft2 = pft2;
- return utils_str_casecmp(ft1->name, ft2->name); + return utils_str_casecmp(ft1->title, ft2->title); }
@@ -611,7 +611,8 @@ g_ptr_array_add(filetypes_array, ft); g_hash_table_insert(filetypes_hash, ft->name, ft);
- sorted_filetypes = g_slist_insert_sorted(sorted_filetypes, ft, cmp_filetype); + if (ft->id != GEANY_FILETYPES_NONE) + sorted_filetypes = g_slist_insert_sorted(sorted_filetypes, ft, cmp_filetype); }
@@ -660,7 +661,7 @@ }
-static GtkWidget *group_menus[GEANY_FILETYPE_GROUP_NONE]; +static GtkWidget *group_menus[GEANY_FILETYPE_GROUP_COUNT];
static void create_sub_menu(GtkWidget *parent, gsize group_id, const gchar *title) {
Modified: branches/reorder-filetypes/src/filetypes.h =================================================================== --- branches/reorder-filetypes/src/filetypes.h 2009-03-27 15:40:19 UTC (rev 3663) +++ branches/reorder-filetypes/src/filetypes.h 2009-03-27 15:52:38 UTC (rev 3664) @@ -88,7 +88,8 @@ GEANY_FILETYPE_GROUP_COMPILED, GEANY_FILETYPE_GROUP_SCRIPT, GEANY_FILETYPE_GROUP_MARKUP, - GEANY_FILETYPE_GROUP_MISC + GEANY_FILETYPE_GROUP_MISC, + GEANY_FILETYPE_GROUP_COUNT } GeanyFiletypeGroupID;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.