Gloobus API ?

Asked by Jostein

Would it be possible to use Gloobus as an API for me to get preview-images of files from inside my own applications?

(Keep up the good work! Things are looking good.)

Question information

Language:
English Edit question
Status:
Solved
For:
Gloobus Edit question
Assignee:
No assignee Edit question
Solved by:
BadChoice
Solved:
Last query:
Last reply:
Revision history for this message
Best BadChoice (guitarboy000) said :
#1

Well.. there is no api now, but you can preview you apps running the command gloobus-preview /path/to/file
And then the preview will be launched,

Cause, what would you like the api to do exactly?

BTW wich app are you doing?

Revision history for this message
Jostein (josteinaj) said :
#2

I'm not doing an app at the moment, but I was thinking that it would be useful for comparing different versions of a file to decide which one to keep:

http://brainstorm.ubuntu.com/idea/23128/

If something like "gloobus-preview /path/to/file --tostdout > /path/to/img.png" were possible it would probably suffice.

Revision history for this message
Jostein (josteinaj) said :
#3

Thanks BadChoice, that solved my question.

Revision history for this message
BadChoice (guitarboy000) said :
#4

i could give you a pixbuf but, there are files that doesn't use images.. that use text or gtktreelist, or in music a gstreamer stream...

So its hard to provide it...
If you have a better idea we can try to add this feature!

Revision history for this message
BadChoice (guitarboy000) said :
#5

What if I give you a gtkwidget? with the file displayed inside?

Revision history for this message
Jostein (josteinaj) said :
#6

I haven't used GTK before, but I guess it sounds like a good feature. Don't spend too much time on it though, I would prefer a better Gloobus over a gtkwidget or similar :). The application I had in mind don't really need the fancy features that Gloobus has... a pixbuf for supported filetypes would do.

After a bit of googling I found that there's work being done on implementing thumbnail generation over DBus which sounds perfect for what I had in mind. Maybe it would be of use for Gloobus too when it is available.