Revision: 5334 http://geany.svn.sourceforge.net/geany/?rev=5334&view=rev Author: ntrel Date: 2010-10-27 14:20:18 +0000 (Wed, 27 Oct 2010)
Log Message: ----------- Fix notebook tab menu icons using theme for "text/plain" filetypes. Make filetype mime_type "text/plain" instead of NULL.
Modified Paths: -------------- trunk/ChangeLog trunk/src/filetypes.c trunk/src/ui_utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-10-26 18:11:23 UTC (rev 5333) +++ trunk/ChangeLog 2010-10-27 14:20:18 UTC (rev 5334) @@ -1,3 +1,10 @@ +2010-10-27 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/filetypes.c, src/ui_utils.c: + Fix notebook tab menu icons using theme for "text/plain" filetypes. + Make filetype mime_type "text/plain" instead of NULL. + + 2010-10-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, doc/geany.txt, doc/geany.html, geany.glade:
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2010-10-26 18:11:23 UTC (rev 5333) +++ trunk/src/filetypes.c 2010-10-27 14:20:18 UTC (rev 5334) @@ -517,8 +517,10 @@ /* list will be sorted later */ filetypes_by_title = g_slist_prepend(filetypes_by_title, ft);
- if (ft->mime_type) - ft->icon = ui_get_mime_icon(ft->mime_type, GTK_ICON_SIZE_MENU); + if (!ft->mime_type) + ft->mime_type = g_strdup("text/plain"); + + ft->icon = ui_get_mime_icon(ft->mime_type, GTK_ICON_SIZE_MENU); }
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2010-10-26 18:11:23 UTC (rev 5333) +++ trunk/src/ui_utils.c 2010-10-27 14:20:18 UTC (rev 5334) @@ -2379,13 +2379,9 @@
base_name = g_path_get_basename(DOC_FILENAME(doc)); menu_item = gtk_image_menu_item_new_with_label(base_name); - if (doc->file_type->icon) - image = gtk_image_new_from_pixbuf(doc->file_type->icon); - else - image = gtk_image_new_from_stock(GTK_STOCK_FILE, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_pixbuf(doc->file_type->icon); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image);
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM (menu_item), image); - gtk_widget_show(menu_item); gtk_container_add(GTK_CONTAINER(menu), menu_item); g_signal_connect(menu_item, "activate", callback, doc);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.