Strip whitespace from found lines to prevent listview rows from being two lines tall.
[rox-find.git] / AppRun
blob7ca35c8af335a60de6f2ebc625e1d4c2d8030dee
1 #!/usr/bin/env python
3 import findrox; findrox.version(2,0,0)
4 import rox, os, sys
6 try:
7 __builtins__._ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages'))
9 import filefind
11 from optparse import OptionParser
13 parser = OptionParser()
15 parser.add_option("--options", action="store_true", dest="options",
16 default=False, help=_("display options dialog"))
18 parser.add_option("-p", "--path", type="string", dest="path",
19 default=None, help=_("specify search path"))
21 parser.add_option("-t", "--text", type="string", dest="text",
22 default=None, help=_("specify search text"))
24 parser.add_option("-f", "--files", type="string", dest="files",
25 default=None, help=_("specify files to search in"))
27 (options, args) = parser.parse_args()
29 if options.options:
30 rox.edit_options()
31 else:
32 if len(sys.argv) > 1:
33 path = sys.argv[1]
34 else:
35 path = options.path
37 win = filefind.FindWindow(path, options.text, options.files)
38 win.show()
40 rox.mainloop()
41 except:
42 rox.report_exception()