Added accelerator for Delete checkbox.
[rox-archive.git] / AppRun
blobe44db5223b210298be5992d5cb71edb1df706ccb
1 #!/usr/bin/env python
3 import findrox; findrox.version(1, 9, 12)
4 import sys, os, formats
6 import rox
8 try:
9 from rox import g, saving
10 __builtins__._ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages'))
12 if len(sys.argv) != 2:
13 rox.info(_("Drag a file or directory onto Archive to archive it. "
14 "Drag an archive onto it to extract."))
15 sys.exit(0)
17 from box import ArchiveBox
19 path = sys.argv[1]
21 if path != '-':
22 path = rox.get_local_path(path)
23 if not path:
24 rox.croak(_('Sorry, I can only extract/archive local files.'))
25 path = os.path.abspath(path)
27 # Show the savebox, so at least the user knows something is happening...
29 savebox = ArchiveBox()
30 savebox.show()
31 g.gdk.flush()
33 if os.path.isdir(path):
34 data = formats.DirData(path)
35 else:
36 data = formats.FileData(path)
37 savebox.set_data(data)
39 rox.mainloop()
40 except SystemExit:
41 pass
42 except:
43 rox.report_exception()