View Single Post
electroaudio's Avatar
Posts: 381 | Thanked: 336 times | Joined on Jan 2011 @ Stockholm, Sweden
#202
So, the deletion of files with singlespaces in them are now solved

Just put the script into the scriptsdirectory and edit the delete file command in fileactions.conf to =python /x/x/delete-file.py @

Code:
import gtk
from os import remove
from sys import argv

# Does anyone have a prettier solution for this filename workaround.
filename=""
for a in argv[1:]:
 filename+=" "+a
filename=filename[1:]

messagedialog=gtk.MessageDialog(None,0,gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, "Confirm deletion of file")
messagedialog.format_secondary_text(filename)
a=messagedialog.run()
messagedialog.destroy()
if a==gtk.RESPONSE_YES:
 remove(filename)
__________________
Deskypplet , a desktop for N900 *RIP*

Last edited by electroaudio; 2012-03-29 at 11:15.