From e1bf8c8605511a4afd5c1e46fecc543da3514ecc Mon Sep 17 00:00:00 2001 From: Eugene Gagarin Date: Fri, 27 Feb 2009 11:08:51 +0300 Subject: [PATCH] startpath by platform --- src/findit.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/findit.py b/src/findit.py index d1f40d7..5e0d196 100755 --- a/src/findit.py +++ b/src/findit.py @@ -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() -- 1.7.9.5