Re: GIO application integration with Nautilus

2009-05-20 Thread Bastien Nocera
On Wed, 2009-05-20 at 08:00 -0400, Gravis wrote:
> On Tue, 2009-05-19 at 08:22 -0400, Dr. Michael J. Chudobiak wrote:
> > > When I use "Open With Other Application..." it launches the program but
> > > does not pass in any arguments.
> > 
> > Not sure, but perhaps the line "supported_uri_schemes=file" is the problem.
> > 
> > - Mike
> 
> That was my first thought when I couldn't get it working.  However,
> that's the same way GIMPs entry is done.  Looking around the file, I
> found that EoG has a slightly different entry and Mozilla and even more
> different one.  I tried each style for my entry but alas, no luck.
> 
> 
> === excerpts: /usr/share/application-registry/gnome-vfs.applications ===

I think the path name should give you a good clue as to why this doesn't
do anything to GIO...


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: GIO application integration with Nautilus

2009-05-20 Thread Gravis
On Tue, 2009-05-19 at 08:22 -0400, Dr. Michael J. Chudobiak wrote:
> > When I use "Open With Other Application..." it launches the program but
> > does not pass in any arguments.
> 
> Not sure, but perhaps the line "supported_uri_schemes=file" is the problem.
> 
> - Mike

That was my first thought when I couldn't get it working.  However,
that's the same way GIMPs entry is done.  Looking around the file, I
found that EoG has a slightly different entry and Mozilla and even more
different one.  I tried each style for my entry but alas, no luck.


=== excerpts: /usr/share/application-registry/gnome-vfs.applications ===

eog
command=eog
name=Eye of Gnome
can_open_multiple_files=true
expects_uris=true
uses_gnomevfs=true
requires_terminal=false

mime_types=image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/x-xpixmap,image/x-bmp,image/x-png,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap


gimp
command=gimp-remote --new
name=The GIMP
can_open_multiple_files=true
expects_uris=non-file
requires_terminal=false
supported_uri_schemes=file

mime_types=image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/x-xpixmap,image/x-bmp,image/x-png,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap,image/x-psd,image/x-xbitmap,image/x-xcf


mozilla
command=mozilla
name=Mozilla
can_open_multiple_files=true
expects_uris=true
requires_terminal=false
supported_uri_schemes=file,http,ftp,telnet,gopher

mime_types=text/html,x-directory/webdav,x-directory/webdav-prefer-directory,image/gif,image/jpeg,text/xml

=== end ===


To test that perhaps it was the executable itself, I put my executable
(/usr/bin/qiv2) in place of GIMP (/usr/bin/gimp-2.6) and EoG
(/usr/bin/eog) which worked flawlessly.


so... what's the deal and what's with all the different entry formats?


-- 
Gravis 

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: GIO application integration with Nautilus

2009-05-20 Thread Tomeu Vizoso
On Tue, May 19, 2009 at 14:22, Dr. Michael J. Chudobiak
 wrote:
> Gravis wrote:
>>
>> It works fine with Nautilus when opening files on a local
>> filesystem. -- http://i44.tinypic.com/t9gzye.jpg
>>
>> The problem I've run into is that Nautilus will not allow me to open
>> files on remote filesystems (eg sftp virtually mounted file system) with
>> my application (doesnt appear on the context menu list). --
>> http://i44.tinypic.com/20gfpzd.jpg
>>
>> When I use "Open With Other Application..." it launches the program but
>> does not pass in any arguments.
>
> Not sure, but perhaps the line "supported_uri_schemes=file" is the problem.

No idea, but I have found the nautilus code quite readable in the past.

Regards,

Tomeu

> - Mike
> ___
> 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


Re: GIO application integration with Nautilus

2009-05-19 Thread Dr. Michael J. Chudobiak

Gravis wrote:

It works fine with Nautilus when opening files on a local
filesystem. -- http://i44.tinypic.com/t9gzye.jpg

The problem I've run into is that Nautilus will not allow me to open
files on remote filesystems (eg sftp virtually mounted file system) with
my application (doesnt appear on the context menu list). --
http://i44.tinypic.com/20gfpzd.jpg

When I use "Open With Other Application..." it launches the program but
does not pass in any arguments.


Not sure, but perhaps the line "supported_uri_schemes=file" is the problem.

- Mike
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


GIO application integration with Nautilus

2009-05-19 Thread Gravis
I've asked the Nautilus dev and Gnome hackers mailing list but they dont
really know much on the issue, so here I am.  By the way, I'm using
Debian and (of course) Gnome.



I've written a GTK+ application that uses the GIO API for file IO
operations and I added it as the default application to open images, in
this case a jpeg. -- http://i42.tinypic.com/2yzeg4i.jpg


It works fine with Nautilus when opening files on a local
filesystem. -- http://i44.tinypic.com/t9gzye.jpg

The problem I've run into is that Nautilus will not allow me to open
files on remote filesystems (eg sftp virtually mounted file system) with
my application (doesnt appear on the context menu list). --
http://i44.tinypic.com/20gfpzd.jpg

When I use "Open With Other Application..." it launches the program but
does not pass in any arguments.


I have no problems opening files via CLI (eg appname
sftp://u...@server.com/dir/image.jpg ).

Does anyone know how to solve this problem?  Is there any documentation
on how to add a GIO application to Nautilus for opening remote
filesystems?



On Mon, 2009-05-11 at 10:47 -0400, Matthias Clasen wrote:
> On Mon, May 11, 2009 at 8:41 AM, Gravis
 wrote:
> 
> > Does anyone know how to solve this problem?  Is there any
documentation
> > on how to add a GIO application to Nautilus for opening remote
> > filesystems?
> 
> I'm not sure I fully understood what problem you have, but the way to
> inform the desktop about the capabilities of your application is to
> set the
> MimeType key in your desktop file appropriately, and use an Exec line
> that has a %f or %u in it.



To clarify what's happening, I've made some screenshots to show my
problem in action.

list of available applications: http://i42.tinypic.com/2yzeg4i.jpg
context menu for remote directory: http://i44.tinypic.com/20gfpzd.jpg
context menu for local directory: http://i44.tinypic.com/t9gzye.jpg



As for desktop files, here is the list of files I created/modified, all
based on entries/files for GIMP.

modified: /usr/share/application-registry/gnome-vfs.applications
created: /usr/share/applications/qiv2.desktop
created: /usr/share/app-install/desktop/qiv2.desktop



=== excerpt /usr/share/application-registry/gnome-vfs.applications ===

qiv2
command=qiv2
name=Quick Image Viewer 2
can_open_multiple_files=true
expects_uris=non-file
requires_terminal=false
supported_uri_schemes=file

mime_types=image/bmp;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/tiff;image/jpeg;image/png;image/x-icon;image/x-xpixmap;image/svg+xml;

== end of excerpt ==



== file /usr/share/applications/qiv2.desktop ==

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Name=Quick Image Viewer 2
GenericName=Quick Image Viewer 2
Comment=View images with ease
Exec=qiv2 %U
TryExec=qiv2
Icon=qiv2
Terminal=false
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
StartupNotify=true
MimeType=image/bmp;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/tiff;image/jpeg;image/png;image/x-icon;image/x-xpixmap;image/svg+xml

== end of file ==



== file /usr/share/app-install/desktop/qiv2.desktop ==

[Desktop Entry]
X-AppInstall-Package=qiv2
X-AppInstall-Popcon=11741
X-AppInstall-Section=main

Version=1.0
Encoding=UTF-8
Type=Application
Name=Quick Image Viewer 2
GenericName=Quick Image Viewer 2
Comment=View images with ease
Exec=qiv2 %U
TryExec=qiv2
Icon=qiv2
Terminal=false
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
StartupNotify=true
MimeType=image/bmp;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/tiff;image/jpeg;image/png;image/x-icon;image/x-xpixmap;image/svg+xml

== end of file ==



-- 
Gravis 

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list