From: Eugene Gagarin Date: Fri, 27 Feb 2009 08:08:51 +0000 (+0300) Subject: startpath by platform X-Git-Tag: releases/0.1.0~8^2~6 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=e1bf8c8605511a4afd5c1e46fecc543da3514ecc;hp=c0493d9f452ce87b3379fd1593be1d401b89e693;p=findit startpath by platform --- 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()