Commit 46085d80 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Support emblem file names that do not start with “emblem-”. Fixes

2008-09-22  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-file.c
	(nautilus_file_get_emblem_icons):
	* libnautilus-private/nautilus-icon-info.c:
	* libnautilus-private/nautilus-icon-info.h:
	Support emblem file names that do not start with “emblem-”. Fixes
	#350643.

svn path=/trunk/; revision=14660
parent f7806ce7
2008-09-22 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-file.c
(nautilus_file_get_emblem_icons):
* libnautilus-private/nautilus-icon-info.c:
* libnautilus-private/nautilus-icon-info.h:
Support emblem file names that do not start with “emblem-”. Fixes
#350643.
2008-09-22 Christian Neumair <cneumair@gnome.org>
* src/nautilus-window-slot.c
......
......@@ -5711,7 +5711,7 @@ nautilus_file_get_emblem_icons (NautilusFile *file,
{
GList *keywords, *l;
GList *icons;
char *icon_name;
char *icon_names[2];
char *keyword;
int i;
GIcon *icon;
......@@ -5753,9 +5753,12 @@ nautilus_file_get_emblem_icons (NautilusFile *file,
}
}
icon_name = nautilus_icon_get_emblem_icon_by_name (keyword);
icon = g_themed_icon_new (icon_name);
g_free (icon_name);
icon_names[0] = g_strconcat ("emblem-", keyword, NULL);
icon_names[1] = keyword;
icon = g_themed_icon_new_from_names (icon_names, 2);
g_free (icon_names[0]);
icons = g_list_prepend (icons, icon);
}
......
......@@ -25,8 +25,6 @@
#include <gio/gio.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#define NAUTILUS_EMBLEM_NAME_PREFIX "emblem-"
struct _NautilusIconInfo
{
GObject parent;
......@@ -645,16 +643,6 @@ nautilus_get_icon_size_for_stock_size (GtkIconSize size)
}
char *
nautilus_icon_get_emblem_icon_by_name (const char *emblem_name)
{
char *name_with_prefix;
name_with_prefix = g_strconcat (NAUTILUS_EMBLEM_NAME_PREFIX, emblem_name, NULL);
return name_with_prefix;
}
guint
nautilus_icon_get_emblem_size_for_icon_size (guint size)
{
......
......@@ -82,7 +82,6 @@ guint nautilus_icon_get_larger_icon_size (guint size);
guint nautilus_icon_get_smaller_icon_size (guint size);
gint nautilus_get_icon_size_for_stock_size (GtkIconSize size);
char *nautilus_icon_get_emblem_icon_by_name (const char *emblem_name);
guint nautilus_icon_get_emblem_size_for_icon_size (guint size);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment