GdkPixbuf *get_pixbuf_file (gchar *fullpath) { GdkPixbuf *pixbuf=NULL; struct stat statbuf; int counter=0; char mychar; char xxx[50]; char *mime_icon_name=NULL; gchar *mime_icon_file=NULL; gchar *test; gchar *file_open; GtkIconTheme *icon_theme; char *ext = strrchr(fullpath, '.'); if (ext==NULL) ... if (strstr(ext,".desktop") && strstr(".desktop",ext)) ... if (strstr(fullpath, "/folder.png") && (fast_mode==0)) ... mime_icon_name=NULL; if ((mime_icon_name=strrchr(fullpath, '.'))==0) .. if ((statbuf.st_mode &S_IXUSR)) ... memset (xxx,0,sizeof(xxx)); for ( counter = 0 ; (counter<= (sizeof(xxx)-0)) && (mime_icon_name[counter]!=0) ; counter++ ){ mychar=mime_icon_name[counter]; xxx[counter]=(tolower(mychar)); } mime_icon_file=g_strconcat ("/home/user/.deskypplet/icons/",xxx+1,".png",NULL); if ((pixbuf=gdk_pixbuf_new_from_file_at_size(mime_icon_file,app->icon_x_size,app->icon_y_size,NULL))!=0) { return pixbuf; } else { pixbuf= gdk_pixbuf_new_from_file_at_size("/home/user/.deskypplet/icons/dummy.png",app->icon_x_size,app->icon_y_size,NULL); return pixbuf; } }