Re: Proposal: "Preview" shell for EoG/gpdf/ggv



On Mon, 2003-02-10 at 12:12, Biswapesh Chattopadhyay wrote:
> How about if all (pre)view components support a particular well-defined
> interface using Bonobo so that any application can (pre)view files of
> any type supported by any of the previewers. I think this is how
> Nautilus currently does it - doesn't it ? We only need to extend the
> interface a bit probably to support the hierarchy concept.

  There is already a set of interfaces for this. These interfaces are:
	1. Bonobo::Control, for actually displaying some file;
	2. Bonobo::PersistStream, for load-save, which of course could be
constrained to loading only, and never saved;
	3. Bonobo::Stream: a stream for an arbitrary URI can easily be created
through monikers [1]:
	 stream = bonobo_get_object("vfs:ftp://server/dir/file.ext";,
"Bonobo/Stream");

	Currently, the EOG shell uses Bonobo::PersistFile instead of (2), but
it can be easily fixed.
	Additionally, the control may need to be informed not to allow changes
to the document, in order to not confusing the user (though the changes
would never get saved anyway, since the shell is the one who controls
this). This information could be a simple property, perhaps.

	However, I just remembered there is an easier way to do this, as
follows. The shell simply does:
	control = bonogo_get_object("vfs:<URI>", "Bonobo/Control")
and the bonobo monikers take care of the rest. Controls register
themselves for handling certain MIME types with 

	<oaf_attribute type="stringv" name="bonobo:supported_mime_types">
	    <item value="MIME-TYPE"/>
	</oaf_attribute>

in the .server file. Simple, isn't it?


[1] Pending bug #105120 for this to work.

> 
> A minimal shell can then be written which uses this interface to act as
> an universal 'file previewer'.
> 
> This will also give other GNOME apps (like Anjuta) more powerful viewing
> capabilities, and might act as a first step towards implementing a
> preview-widget for the file selector.
> 
> Possible candidates for file formats are pdf (Gpdf), ps (GGV) , abw
> (Abiword) , html (GtkHTML2) , images (EOG), archives (File Roller), etc.
> (basically any document format with page/object/other hierarchy).
> 
> Rgds,
> Biswa.
> 
> > 
> > Hi Martin, Jaka and Jens,
> > 
> > So, Martin and Jaka have already posted about the idea of a single shell
> > for
> > viewing PS and PDF files using the ggv and gpdf backends.
> > 
> > It occured to me this afternoon that EoG worked exactly the same way - it's
> > an image viewing component with a minimal shell. Wouldn't it be cool if all
> > three components used the same shell for static document viewing? (It would
> > work very similarly to Apple's "Preview" utility in OS X.) Other apps could
> > easily install components for this shell too... Holy cow -> Bonobo in the
> > real world!
> > 
> > Someone is going to ask the question: "Isn't Nautilus supposed to be this
> > 'super shell', huh?" The only sensible answer to that, of course, is: "You
> > are an idiot." But seriously, Nautilus is really not the best place to be
> > viewing files. Custom file list views, sure. Weird file viewers where files
> > are meant to be, no.
> > 
> > Martin reckons he's ready to do this kind of thing for 2.4... How about it?
> > 
> > Rock on!
> > 
> > - Jeff
> > 
> > --
> >      "I guess there's part of me that's always resented it... to be an
> >    actor, you have to have someone else say yes to you." - Edward Norton
> > _______________________________________________
> > desktop-devel-list mailing list
> > desktop-devel-list gnome org
> > http://mail.gnome.org/mailman/listinfo/desktop-devel-list
> > 
> > 
> 
> 
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
-- 
Gustavo Joćo Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]