xffm: Image Preview

edscott wilson garcia edscott at prodigy.net.mx
Thu Oct 30 03:40:08 CET 2003


On Wed, 2003-10-29 at 17:54, Danny Milosavljevic wrote:
> Hi edscott :)
> 
> I've found a small thing which bugs me...
> 
> When previewing images in xffm, and there is a wiiiide image which does
> not have much height, then the image resizes the column to be very very
> very wide...
> 
> I found it to be in libs/icons.c, create_preview.
> The check is for picture_width > w AND picture_height > h, then scale.
> Now this image has low height and high width -> hence the weirdness...
> 
> I modified the function a bit... want it ? :)

Sure. Wide image previews kind of bug me too because they move the
columns too far apart. Maybe there should be a maximum width to which an
image can be previewed? Maybe a maximum height too? If you want to
commit your changes, go ahead. Just make sure the changes do not
generate any of those ugly gtk warnings to stdout.

> 
> btw, in modules_export/mime.c, what's S_IFWHT ? I don't have that O_o
> 

from struct stat.st_mode:
   #define S_IFREG  0100000  /* regular */
   #define S_IFLNK  0120000  /* symbolic link */
   #define S_IFSOCK 0140000  /* socket */
   #define S_IFWHT  0160000  /* whiteout */

I have no idea what it is, but I only want to determine mime type by
magic rules on regular files. Since I do a stat instead of lstat, I
don't have to worry about S_IFLNK.

regards,

Edscott


> cheers,
>    Danny
> 
> 
> 
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://moongroup.com/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list