Bug 81

Summary: Gigedits file dialog do not remember current directory
Product: gigedit Reporter: Anders Dahnielson <anders>
Component: gigeditAssignee: Andreas Persson <andreas56>
Status: CLOSED FIXED    
Severity: enhancement CC: devin
Priority: P2    
Version: SVN Trunk   
Hardware: PC   
OS: Linux   
Attachments: mainwindow.cpp diff
mainwindow.h diff

Description Anders Dahnielson 2008-02-09 20:03:04 CET
It would be nice if the file dialog could remember the current dialog instead of
returning to the users home directory. The extra clicking required is a little
bit annoying when adding samples to different groups for instance.
Comment 1 Devin Anderson 2008-04-24 07:01:49 CEST
Here are diffs against the CVS version of gigedit that solve this issue.  The
diffs also rename "current_dir" to "current_gig_dir" for clarity.



src/gigedit/mainwindow.cpp diff:



627,628c627,628
<     if (current_dir != "") {
<         dialog.set_current_folder(current_dir);
---
>     if (current_gig_dir != "") {
>         dialog.set_current_folder(current_gig_dir);
635c635
<         current_dir = Glib::path_get_dirname(filename);
---
>         current_gig_dir = Glib::path_get_dirname(filename);
766c766
<             if (current_dir != "") dialog.set_current_folder(current_dir);
---
>             if (current_gig_dir != "") dialog.set_current_folder(current_gig_dir);
802c802
<             current_dir = Glib::path_get_dirname(filename);
---
>             current_gig_dir = Glib::path_get_dirname(filename);
1417a1418,1420
>     if (current_sample_dir != "") {
>         dialog.set_current_folder(current_sample_dir);
>     }
1418a1422
>         current_sample_dir = dialog.get_current_folder();
1567a1572,1574
>     if (current_sample_dir != "") {
>         dialog.set_current_folder(current_sample_dir);
>     }
1578a1586
>         current_sample_dir = dialog.get_current_folder();



src/gigedit/mainwindow.h diff:



354c354,355
<     std::string current_dir;
---
>     std::string current_gig_dir;
>     std::string current_sample_dir;
Comment 2 Devin Anderson 2008-04-25 10:06:16 CEST
Created attachment 24 [details]
mainwindow.cpp diff

Posting patch properly ...
Comment 3 Devin Anderson 2008-04-25 10:06:46 CEST
Created attachment 25 [details]
mainwindow.h diff
Comment 4 Andreas Persson 2008-04-26 11:01:51 CEST
Thank you! Patch applied.