diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2008-07-17 16:28:50 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-06-12 00:06:29 +0800 |
commit | 9f7e19517623ea663dcd54b84b3839fbbf2c582c (patch) | |
tree | d8eb41152e5f9c248152cc873c386bfe1de09bac /libempathy-gtk/empathy-ui-utils.c | |
parent | 41e4816144f6e9ace93b0497f35c6aee480fa1c5 (diff) | |
download | gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar.gz gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar.bz2 gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar.lz gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar.xz gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.tar.zst gsoc2013-empathy-9f7e19517623ea663dcd54b84b3839fbbf2c582c.zip |
Add path in EmpathySmiley
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index f30c58aad..cf423de41 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -558,6 +558,29 @@ empathy_pixbuf_from_icon_name (const gchar *icon_name, return empathy_pixbuf_from_icon_name_sized (icon_name, size); } +gchar * +empathy_filename_from_icon_name (const gchar *icon_name, + GtkIconSize icon_size) +{ + GtkIconTheme *icon_theme; + GtkIconInfo *icon_info; + gint w, h; + gint size = 48; + gchar *ret; + + icon_theme = gtk_icon_theme_get_default (); + + if (gtk_icon_size_lookup (icon_size, &w, &h)) { + size = (w + h) / 2; + } + + icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, size, 0); + ret = g_strdup (gtk_icon_info_get_filename (icon_info)); + gtk_icon_info_free (icon_info); + + return ret; +} + /* Stolen from GtkSourceView, hence the weird intendation. Please keep it like * that to make it easier to apply changes from the original code. */ |