Re: Using BonoboControl directly in Nautilus (was Re: Is this meant to happen?)

Martin Sevior <[email protected]>
Newsgroups gmane.comp.gnome.components
Message-ID <Pine.LNX.4.44.0304011140200.32535-200000@baker1.ph.unimelb.edu.au>
On Mon, 31 Mar 2003, Jason Hildebrand wrote:

> On Mon, 2003-03-31 at 09:18, Jens Finke wrote:
> 
> > Eog is a bad example in this case. The Nautilus bug Alex refers to affect
> > only NautilusView objects. Eog doesn't expose this interface (only
> > BonoboControl) and is wrapped with a NautilusView by Nautilus itself.
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> I wasn't aware that this capability existed.  How do you get Nautilus to
> display a BonoboControl in the "View as..." list?  I played with this,
> but couldn't get Vim to show up in the list until I added a NautilusView
> interface to my .server file.
> 

Here is the AbiWord .server file.

You just need to add the magic line:

<oaf_attribute name="nautilus:view_as_name" type="string" _value="VIM 
Editor"/>

In your factory definition.

I spotted this in the EOG server file and put it in the AbiWord one and 
hey - presto AbiWord was in Nautilus. If I wasn't in Japan I would 
have fallen off my chair :-)

Cheers

Martin

PS. Since we used the same technique as EOG I think the the problem with
Nautilus must be AbiWord's fault.
GNOME_AbiWord_Control_2_0.server (text/plain, 2 KB)
<?xml version="1.0"?>
<oaf_info>
  <oaf_server iid="OAFIID:GNOME_AbiWord_ControlFactory" type="exe" location="/home/msevior/abidir/bin/AbiWord-2.0">
    <oaf_attribute name="repo_ids" type="stringv">
      <item value="IDL:Bonobo/GenericFactory:1.0"/>
    </oaf_attribute>
    <oaf_attribute name="name" type="string" _value="AbiWord Viewer Factory"/>
    <oaf_attribute name="description" type="string" _value="AbiWord Viewer Factory"/>
  </oaf_server>
  <oaf_server iid="OAFIID:GNOME_AbiWord_Control" type="factory" location="OAFIID:GNOME_AbiWord_ControlFactory">
    <oaf_attribute name="name" type="string" _value="AbiWord Viewer"/>
    <oaf_attribute name="description" type="string" _value="Word Processor Viewer"/>
    <oaf_attribute name="repo_ids" type="stringv">
      <item value="IDL:Bonobo/Control:1.0"/>
      <item value="IDL:Bonobo/Embeddable:1.0"/>
      <item value="IDL:Bonobo/Persist:1.0"/>
      <item value="IDL:Bonobo/PersistFile:1.0"/>
      <item value="IDL:Bonobo/PersistStream:1.0"/>
      <item value="IDL:Bonobo/Print:1.0"/>
      <item value="IDL:Bonobo/PropertyBag:1.0"/>
      <item value="IDL:Bonobo/Unknown:1.0"/>
      <item value="IDL:Bonobo/Zoomable:1.0"/>
    </oaf_attribute>
    <oaf_attribute name="bonobo:editable" type="boolean" value="true"/>
    <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
      <item value="application/x-abiword"/>
      <item value="application/msword"/>
      <item value="application/rtf"/>
      <item value="application/wordperfect5.1"/>
      <item value="application/x-applix-word"/>
      <item value="application/vnd.palm"/>
      <item value="application/x-palm-database"/>
      <item value="text/abiword"/>
      <item value="text/plain"/>
      <item value="text/richtext"/>
      <item value="text/rtf"/>
      <item value="text/vnd.wap.wml"/>
      <item value="text/*"/>
    </oaf_attribute>
    <oaf_attribute name="nautilus:view_as_name" type="string" _value="AbiWord Document"/>
  </oaf_server>
</oaf_info>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.