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:

> > In article <[email protected]>,
> > Stephen Watson <[email protected]> wrote:
> > > Jim Lesurf <[email protected]> wrote:
>
> to
> > use it open an xterm that - I assume - is trying to build or compile
> > the relevant support. But this fails.
> > 
> > I get a lost list of 'checking' items. Some seem to be looking for f77
> > (i.e. fortran... eh??) and report a 'no'. Then it gets to saying I
> > don't have GCC 4... This also says 'no'.
> > 
> > I then get told that pkg-config is missing and I can get this from the
> > development downloads from gtk.org. Then the process fails to continue.

> That should have been installed with the gtk-devel packages with your
> distro.  If it's working then pkg-config --modversion gtk+-2.0 will
> print your version of GTK.

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

[snip bits to ignore]

> > Then, I've visited gtk.org but can't find what I am supposed to
> > download
> or
> > install. I've tried using search phrases on that site (and with
> > synaptic) like 'pkg-config' and variations on gtk+. But can't identify
> > what I'd
> need.
> > 
> > I think I do have gtk+ on the machine since I think other programs use
> > it. So I guess what is missing is some specific aspects of the
> > development support. But I am currently puzzled.

> Are you installing GTK from source?  If not, which distro are you using
> as pkg-config must be a dependency of gtk-devel (and most of the other
> -devel packages).  If you are installing from source, please reconsider.
>  It's not for the faint of heart, or the inexperienced.

I'm not installing from source. I am using Xubuntu 9.04. I've assumed GTK+
was already installed since I assumed some of the apps I've been using
depend on it. There is a gtk-2.0 directory in my user ./config directory.
And items like a directory /usr/lib/gtk-2.0.

> If you have been developing with GTK already, how have you managed to
> link it in?

I haven't done any gtk developing. So I assume the problem is that I lack
pkg-config for that reason.

However when I either click on the directory for ROX-Clib, or use the
command for AppRun detailed in the notes I get what I reported which seems
to need pkg-config. So I assume this means I need to install pkg-config. My
concern at that point was the other 'no' items as I wondered if there were
loads of other things I'd need as well.

> > Also, whilst reporting, can I please check the following? Am I correct
> > to think that a user would not need to install ROX-CLib to be able to
> > use
> what
> > I compiled using it? Or does using it mean the program I write will
> > only work OK for ROX users who have (unlike myself at this point! :-)
> > ) successfully installed ROX-CLib? My worry here is that although I
> > want if
> I
> > can to make the apps easier to use, I want to avoid other barriers to
> > use. At present non-ROX users can exec my AppRun followed by any
> > relevant input filenames.

> It acts like a shared library by default, so the end users must have it
> installed.  You could try linking to the static library, then they
> wouldn't need to install ROX-CLib, but I've not tried that to see if it
> works.

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? My problem, though, is being clueless about Python. The
'tutorials' I've found on the web really don't explain this to me. This may
be because most Linux users don't think in RO-like terms of having output
file destinations defined by drag-and-drop of an output file icon. (The
examples seem obsessed with 'tree views' which are a PITA from my RO-like
preference! :-) )

The closest I've got so far is to look at the 'Archive' app to see how that
does input and output drag-and-drop in the hope I can use the same kind of
code to get and pass the input/output filenames to my own compiled code. If
someone could explain this as well, I'd welcome the help!  At present I am
looking at the code and trying to disentangle what does what! :-)

Slainte,

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.