[Ardour-Dev] Open session startup directory

Jan Depner eviltwin69 at cableone.net
Sun Feb 24 18:07:47 PST 2008


Forgot to mention - that's new_session.cc in gtk2_ardour.


On Sun, 2008-02-24 at 16:46 -0600, Jan Depner wrote:
> Oh well, I took the coward's way out and defined an environment variable
> called ARDOUR_HOME and then modified the code to look for it.  Here's
> the diff if anyone is interested:
> 
> 22a23,26
> > #include <sys/types.h>
> > #include <sys/stat.h>
> > #include <unistd.h>
> > 
> 423c427,438
> < 	m_open_filechooser->set_current_folder(getenv ("HOME"));
> ---
> > 
> >         struct stat ah;
> >         if (getenv ("ARDOUR_HOME") != NULL && stat (getenv ("ARDOUR_HOME"), &ah) == 0)
> >           {
> >             m_open_filechooser->set_current_folder(getenv ("ARDOUR_HOME"));
> >             m_folder->set_current_folder(getenv ("ARDOUR_HOME"));
> >           }
> >         else
> >           {
> >             m_open_filechooser->set_current_folder(getenv ("HOME"));
> >             m_folder->set_current_folder(getenv ("HOME"));
> >           }
> 424a440,441
> > 	m_folder->set_title(_("select directory"));
> > 
> 432,434d448
> < 	m_folder->set_current_folder(getenv ("HOME"));
> < 	m_folder->set_title(_("select directory"));
> < 
> 
>     I still think it would be nice to go to the last used directory (or
> HOME if it is missing) but that would require saving and reading in
> something from a config file somewhere.  This was much easier and it
> works fine for me ;-)
> 
> 
> On Sun, 2008-02-24 at 12:51 -0600, Jan Depner wrote:
> > I can't seem to find any way to get Ardour to start in a specific
> > directory for "Open Session".  After looking at the code it appears that
> > it is hard-wired to $HOME.  I wouldn't think that most people would put
> > all of their work in their home directory especially since that's
> > usually on the root drive and we've been recommending using a separate
> > drive for audio for quite a while.  So, unless I'm mistaken, this would
> > be a feature request - it would be nice if Ardour could save the
> > location of the last used directory in the Open Session menu and return
> > there instead of $HOME the next time it's used.
> > 
> > V/R
-- 
Jan 'Evil Twin' Depner
http://www.thecfband.com


"Microsoft has a new version out, Windows XP, which according to
everybody is the 'most reliable Windows ever.' To me, this is like
saying that asparagus is 'the most articulate vegetable ever.'"

Dave Barry





More information about the Ardour-Dev mailing list