startpath by platform
authorEugene Gagarin <mosfet07@ya.ru>
Fri, 27 Feb 2009 08:08:51 +0000 (11:08 +0300)
committerWall <wall@gmail.com>
Sat, 28 Feb 2009 09:49:21 +0000 (09:49 +0000)
src/findit.py

index d1f40d7..5e0d196 100755 (executable)
@@ -7,10 +7,11 @@ import gobject
 import pango
 from os import walk
 from os.path import join, abspath, normcase, basename, \
-                    isdir, getsize, getatime, getmtime
+                    isdir, getsize, getatime, getmtime, expanduser
 from heapq import nlargest
 import gettext
 import time
+from sys import platform
 
 try: import hildon; hildonFound = True
 except: hildonFound = False
@@ -327,6 +328,11 @@ class MainWindow(gtk.Window):
 
 if __name__ == '__main__':
     gobject.set_application_name( _('FindIT') )
-    app = MainWindow(575, 345, '/home')
-    app.run()
 
+    if platform == 'win32':
+        startpath = 'c:\\'
+    else:
+        startpath = expanduser('~')
+
+    app = MainWindow(575, 345, startpath)
+    app.run()