Mercurial > pidgin.yaz
changeset 18144:1a282f3d8057
Use dynamic string manipulation to get rid of a MAXPATHLEN.
References #1635
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 17 Jun 2007 02:41:11 +0000 |
parents | 695cb303f688 |
children | b2438a35c5f7 5653692dcf79 |
files | pidgin/gtkutils.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkutils.c Sun Jun 17 02:35:55 2007 +0000 +++ b/pidgin/gtkutils.c Sun Jun 17 02:41:11 2007 +0000 @@ -525,7 +525,7 @@ { PurplePluginProtocolInfo *prpl_info; const char *protoname = NULL; - char buf[MAXPATHLEN]; + char *tmp; char *filename = NULL; GdkPixbuf *pixbuf; @@ -541,12 +541,14 @@ * Status icons will be themeable too, and then it will look up * protoname from the theme */ - g_snprintf(buf, sizeof(buf), "%s.png", protoname); + tmp = g_strconcat(protoname, ".png", NULL); filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols", size == PIDGIN_PRPL_ICON_SMALL ? "16" : size == PIDGIN_PRPL_ICON_MEDIUM ? "22" : "48", - buf, NULL); + tmp, NULL); + g_free(tmp); + pixbuf = gdk_pixbuf_new_from_file(filename, NULL); g_free(filename);