[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to associate gworkspace Icon with an application
From: |
Enrico Sersale |
Subject: |
Re: How to associate gworkspace Icon with an application |
Date: |
Tue, 10 Jul 2001 13:20:26 +0300 (EEST) |
On Mon, 9 Jul 2001, "Peron, Stéphane" wrote:
> Hi,
>
> I would like to run application when I click on icons in Gworkspace's browse
> window.
> I came into the status window of files but no application is proposed to
> bind it to the selected file.
>
> How can I add applications in this status window or how can I set parameters
> of GWorkspace for running, for example, gqview for all files having ".jpg"
> as extension when they are cliqued on ?
>
> Many thanks for your answers
>
>
> Stéphane PERON
>
On GNUstep, it is not the user that associates an app with a file extension.
Every application, declares, together with some other things, the
extensions for its files in a file nemed "Info-gnustep.plist".
This file is read by a tool, "make_services", that puts all these
informations in some files in $HOME/GNUstep/Services/.
Every GNUstep app (also GWorkspace does so) can have an istance of the
NSWorkspace class [NSWorkspace sharedWorkspace] that is able to get that
information and to rerturn, for example, the appropriate icon for a file.
Now, the problem: actually, GNUstep doesn't have many applications, so, to
continue to use your X applications, you must create some wrappers.
In the GWorkspace distribution, there already are some of theese wrappers.
They are in the folder "Apps_wrappers" and wrap these X apps:
Acrobat, ghostview, LyX, netscape, xfig, emacs, gimp,
nedit, vi and xv.
You must put them in a place where make_services looks for applications,
for example, $GNUSTEP_SYSTEM_ROOT/Apps.
So, if you want to use gqview for the .jpg files, you can duplicate one of
these wrappers, look into it and change what is needed to make it a
wrapper for gqview.
Now type:
". $GNUSTEP_SYSTEM_ROOT/Makefiles/GNUstep.sh"
to run make_services and chose Tools->Inspectors->Tools (alt 3) from
the GWorkspace menu.
Here you can set the default app, wrapper or not, for your files.
I hope my poor English was sufficent...
Ciao,
Enrico