# HG changeset patch # User Richard Laager # Date 1182048071 0 # Node ID 1a282f3d8057699bbc82d32090085f7e9eb94ad7 # Parent 695cb303f68895c6d0f85cf83976defa1e3d5f89 Use dynamic string manipulation to get rid of a MAXPATHLEN. References #1635 diff -r 695cb303f688 -r 1a282f3d8057 pidgin/gtkutils.c --- 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);