comparison icon.c @ 273:add1e454b87f

fixed a breakage in 2f053c23ee50
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 12 Dec 2008 22:00:57 +0900
parents 2f053c23ee50
children 42cdddf0f747
comparison
equal deleted inserted replaced
272:2f053c23ee50 273:add1e454b87f
227 else { 227 else {
228 url = g_match_info_fetch(match_info, 1); 228 url = g_match_info_fetch(match_info, 1);
229 g_match_info_free(match_info); 229 g_match_info_free(match_info);
230 } 230 }
231 231
232 /* find out extension */ 232 /* separate url into basename and the rest */
233 gchar *slash = strrchr(url, '/'); 233 gchar *slash = strrchr(url, '/');
234 *slash = '\0';
235
234 gchar *lower = g_ascii_strdown(slash+1, -1); 236 gchar *lower = g_ascii_strdown(slash+1, -1);
235 237
236 if(strstr(lower, ".png")) 238 if(strstr(lower, ".png"))
237 data->img_type = "png"; 239 data->img_type = "png";
238 else if(strstr(lower, ".gif")) 240 else if(strstr(lower, ".gif"))