[jokosher-devel] [PATCH] new project complains if project dir doesn't exist



Hey guys, my first of hopefully many patches (created with "svn diff") is below.

The new proj dialog seems to try to default to the last folder you saved a project to, but if it doesn't exist the GtkFileChooserButton complains in an ugly fashion... this just checks if it exists, if not it defaults to the users home dir.

-Josh

---

Index: NewProjectDialog.py
===================================================================
--- NewProjectDialog.py    (revision 1477)
+++ NewProjectDialog.py    (working copy)
@@ -92,7 +92,10 @@
        self.okbutton.grab_default()
# Set the default folder of 'folder' (a FileChooserButton) - self.folder.set_current_folder(Globals.settings.general["projectfolder"])
+        if os.path.exists(Globals.settings.general["projectfolder"]):
+ self.folder.set_current_folder(Globals.settings.general["projectfolder"])
+        else:
+            self.folder.set_current_folder(os.path.expanduser("~"))

        self.dlg.resize(350, 300)
        self.dlg.set_icon(self.parent.icon)

--
________________________________________________________________
tasty electronic music vittles      --  bluevitriol.com
the only music blog you need        --  playtherecords.com
you are the dj.  interactive music  --  improbableorchestra.com
random observations of the bizarre  --  vitriolix.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]