SF.net SVN: geany:[5604] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Mar 17 18:00:20 UTC 2011
Revision: 5604
http://geany.svn.sourceforge.net/geany/?rev=5604&view=rev
Author: ntrel
Date: 2011-03-17 18:00:20 +0000 (Thu, 17 Mar 2011)
Log Message:
-----------
Fix generating tag files and --ft-names option by ensuring GTK is
initialized before calling ui_get_mime_icon().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/filetypes.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-17 17:03:01 UTC (rev 5603)
+++ trunk/ChangeLog 2011-03-17 18:00:20 UTC (rev 5604)
@@ -23,6 +23,9 @@
* src/filetypes.c:
Make special case for filetypes.matlab instead of truncating all
filetype config filenames at slash.
+ * src/filetypes.c:
+ Fix generating tag files and --ft-names option by ensuring GTK is
+ initialized before calling ui_get_mime_icon().
2011-03-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c 2011-03-17 17:03:01 UTC (rev 5603)
+++ trunk/src/filetypes.c 2011-03-17 18:00:20 UTC (rev 5604)
@@ -528,8 +528,6 @@
if (!ft->mime_type)
ft->mime_type = g_strdup("text/plain");
-
- ft->icon = ui_get_mime_icon(ft->mime_type, GTK_ICON_SIZE_MENU);
}
@@ -581,7 +579,8 @@
}
-/* Create the filetypes array and fill it with the known filetypes. */
+/* Create the filetypes array and fill it with the known filetypes.
+ * Warning: GTK isn't necessarily initialized yet. */
void filetypes_init_types()
{
filetype_id ft_id;
@@ -686,8 +685,15 @@
void filetypes_init()
{
+ GSList *node;
+
filetypes_init_types();
-
+ /* this has to be here as GTK isn't initialized in filetypes_init_types(). */
+ foreach_slist(node, filetypes_by_title)
+ {
+ GeanyFiletype *ft = node->data;
+ ft->icon = ui_get_mime_icon(ft->mime_type, GTK_ICON_SIZE_MENU);
+ }
create_set_filetype_menu();
setup_config_file_menus();
}
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