Re: feature request: xffm: multi-rename
edscott wilson garcia <[email protected]> Fri, 16 Jan 2004 16:47:33 -0600
| Newsgroups | gmane.comp.xfce.devel |
|---|---|
| Organization | xfce |
| Message-ID | <[email protected]> |
On Fri, 2004-01-16 at 16:20, [email protected] wrote: > it is often very useful to be able to rename sets of files with 1 command. > > there is a simple CLI utility 'rename' (Gentoo sys-apps/util-linux ), > with syntax 'rename fromstring tostring filespec', > which will rename eg files 'test1.txt' 'test2.txt' 'test3.txt' > to 'test11.txt' 'test12.txt' 'test13.txt' via 'rename st st1 test*.txt'. > with KDE -- whose pgms i'm willing to use if necessary -- , > there is Krusader as file-manager, which calls Krename to do this job: > all v efficient, but rather heavyweight, in the best German trad'n (grin). > > it wb nice to be able to do this kind of job with Xffm, > but AFAIK at present there is no means of accomplishing it. > can i encourage someone to give it a try ? > if the answer is "Do it yourself!", what do i need to know beyone K&R 'C': > eg how do i start to learn re Gtk ? Due to limited time for all current developers, if you can come up with a patch that would be great. To learn GTK, just follow the cut, paste and modify road. Take a place where you would want the new code to appear, say in the popup menu with a multiple selection. So use xffm to search all files in the xffm tree where the "Properties" string appears. Then start duplicating the code you find until you have two "properties" elements in the popup when selecting multiple elements in xffm. Then just modify the texts and callback functions so that it does what you want it to do. Submit the patch and the development team will probably clean it up a bit before commit to CVS. If you wonder what the gtk functions do, check the gtk API documentation which is very illustrative.