Re: Using drag and drop to set where data should be saved

Jim Lesurf <[email protected]>
Newsgroups gmane.comp.desktop.rox.user
Message-ID <[email protected]>
In article <[email protected]>, Stephen
Watson <[email protected]> wrote:
> Jim Lesurf <[email protected]> wrote:

> > 
> > It gives me "The program 'pkg-config' is not currently installed" and
> tells
> > me to use sudo apt-get install to get it.

> Well, that would be your answer then.
[snip]


> Distros tend to split libraries into two packages: Y and Y-devel.  Y
> contains the shared libraries and some other files, Y-devel the header
> files and static libraries.  You only need pkg-config if you're using
> the Y-devel package because pkg-config is used to locate the header
> files and libraries.
[snip]

> > Given this I am wondering if it might be simpler for me to revert to
> > my 'Plan A'. This would be that I found out how to write a simple
> > AppRun in Python that
> > 
> > A) detected when the app icon was clicked or an input file was dropped
> > on it.
> > 
> > B) Gave me a savebox to drag and drop so I could use that to place and
> name
> > the output file.
> > 
> > C) then passed that name (and the name of the input file) to the
> executable
> > compiled 'C' to recover the names and do the actual processing, and
> > then save the file contents.
> > 
> > I assume that would then work with the normal ROX desktops without
> > user needing ROX-Clib? 

> They would need ROX-Lib instead.

Yes, fair enough.  :-)   However I think what surprises me here is that so
far as I can recall ROX-Lib installed without any problems. Yet IIUC CLib
seems to require even users of developed apps that use it to install a
'development' item (pkg-config) which seems absent from a distro as common
as Xubuntu.

Anyway, thinking about this I feel I do prefer (if it is possible and I can
work out how to do it) to use the approach of using python (and ROX-Lib) to
provide the drag-and-drop, and have it then call the object I've compiled
from 'C'. 

One reason for this is I want the main code to be easily accessible by
non-ROX users via a terminal or just issuing the usual sort of <object>
<variable> command.

Another is that I've played with the python example at
http://roscidus.com/desktop/Tutorials/Saving

and it works quite nicely for A and B above. So I'm hoping that there is a
simple way to extract the full pathname of the file created by the
drag-and-drop and then pass that on to launching the main code. Is there
not a method for reading this name from the class of object for 'box'. etc?

Either way I clearly have a lot to learn! So me feeling of preferring
python here may well be a mistake on my part. But I am tending to feel I
should learn more about python anyway, so that is another reason for seeing
if that route is possible. 

So if anyone can advise on how to extract the pathname of the saved file
from the SaveBox (as above example) and then how to issue the command, I'd
welcome the help. In the meantime I'll keep experimenting and trying to
learn.

Thanks,

Jim

-- 
Electronics  http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
Armstrong Audio  http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc  http://www.audiomisc.co.uk/index.html


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
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.