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]> |
Hi, I would like to be able to have some of my ROX apps use drag-and-drop to set where generated results are to be saved. Alas I am still clueless about Python. And my programs tend to be in 'C'. So I'd welcome some help with the following. I have found the tutorial example at http://roscidus.com/desktop/Tutorials/Saving and that makes sense. (It is also a lot easier than my struggles to work out how to use this on a more 'primitive' level with GTK+ in 'C' ! :-) ) However the above isn't quite want I need for two reasons. 1) It generates a limited amount of data first, then saves it using the drag-and-drop. 2) The entire example is in Python. I want to be able to do as follows. When the ROX app is started it presents a drag-and-drop save box so the user can give the file a name and drop its icon onto the filer window for the directory where the user wants the results to be saved. The icon should have the correct filetype. (e.g. Wave or Veusz as relevant). The app then passes this name to an executable which I have written in 'C' and compiled with GCC. Thus letting me do all the number-bashing using code I'm more familiar with (and am tendeding to produce by modifying existing 'C' code from my Iyonix). I assume that Python can use the drag and drop to return the full pathname of the file to which later saving is to be made. I also assume it can pass this as a variable using the normal 'command and environment' method'. But being clueless I have no idea how to do this for a ROX app. I've looked at various 'tutorials' and 'guides' on the web for Python but not found what I am after. So I'm asking here as I suspect this is where I'm most likely to find someone who already knows the answers. :-) I have now put up some ROX apps for sound at http://www.audiomisc.co.uk/software/index.html some of these do save data, but by a method that is rather crude and inflexible since it takes the output location from a 'settings' file the user has to edit before use. So I'd prefer the above as I suspect users will find it rather easier and more convenient. 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