fixed usage of global variable app
authorWall <wall@gmail.com>
Sat, 28 Feb 2009 22:07:28 +0000 (22:07 +0000)
committerWall <wall@gmail.com>
Sat, 28 Feb 2009 22:07:28 +0000 (22:07 +0000)
src/findit.py

index c3aba4c..41b773c 100755 (executable)
@@ -94,7 +94,7 @@ def on_key_press(obj, event):
 class PropertiesDialog(gtk.Dialog):
     """File property dialog window."""
 
-    def __init__(self, path, size, bytesize):
+    def __init__(self, app, path, size, bytesize):
         """Create&show file properties dialog."""
         gtk.Dialog.__init__(self)
         self.set_title( _('File properties') )
@@ -213,7 +213,7 @@ class MainWindow(gtk.Window):
         except (TypeError, ValueError):
             self.mess_window('error', _('Please select file') )
             return
-        PropertiesDialog(path, size, bytesize)
+        PropertiesDialog(self, path, size, bytesize)
 
     ### Window initialization ##################################################
 
@@ -353,8 +353,7 @@ def main():
     else:
         startpath = expanduser('~')
 
-    app = MainWindow(575, 345, startpath)
-    app.run()
+    MainWindow(575, 345, startpath).run()
 
 if __name__ == '__main__':
     main()