Bug 81 - Gigedits file dialog do not remember current directory
Summary: Gigedits file dialog do not remember current directory
Status: CLOSED FIXED
Alias: None
Product: gigedit
Classification: Unclassified
Component: gigedit (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P2 enhancement
Assignee: Andreas Persson
URL:
Depends on:
Blocks:
 
Reported: 2008-02-09 20:03 CET by Anders Dahnielson
Modified: 2008-11-30 13:39 CET (History)
1 user (show)

See Also:


Attachments
mainwindow.cpp diff (1012 bytes, patch)
2008-04-25 10:06 CEST, Devin Anderson
Details
mainwindow.h diff (120 bytes, patch)
2008-04-25 10:06 CEST, Devin Anderson
Details

Note You need to log in before you can comment on or make changes to this bug.
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.