Re: [jokosher-devel] [PATCH] new project complains if project dir doesn't exist
- From: Laszlo Pandy <laszlok2 gmail com>
- To: Josh Steiner <josh vitriolix com>
- Cc: jokosher-devel-list gnome org
- Subject: Re: [jokosher-devel] [PATCH] new project complains if project dir doesn't exist
- Date: Sun, 11 Nov 2007 20:51:08 -0500
Josh Steiner wrote:
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)
Committed. Thanks dude. :)
Next time can you send the patch as a file attachment. It looks like
your text wrapping mangled the patch above and I had to apply it by hand.
Laszlo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]