Re: Gqview et auto file recognition
John Ellis <[email protected]> Wed, 15 Nov 2006 16:04:16 -0500
| Newsgroups | gmane.comp.gnome.apps.gqview.devel |
|---|---|
| Message-ID | <[email protected]> |
depuis wrote: > I sometimes try to browse through browser caches, where there are a lot of > filenames without extension. Using 'file' on the dir can reveal the types: > jpeg, png, ... Would it be possible to include this ability in gqview, that > is: if some dir is opened without pattern (or no dir specified at all), gqview > would infer file type not only from their extension, but also from the 'file' > output, if available. The easiest way to do this would be to turn off 'file filtering' in the preferences and GQview will attempt to open every file as an image. The much harder way would be to change the file listing code to use a 'file' equivalent function, perhaps gdk_pixbuf_get_file_info(). But this would be very slow as you have to read at least a few bytes from every file - if you want GQview to remain responsive the operation would have to be asynchronous. Greetings, John -- John Ellis <[email protected]> http://gqview.sourceforge.net <GQview> | http://hideseek.sourceforge.net http://gqmpeg.sourceforge.net <GQmpeg> | <Preferences Hide and Seek> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV