Opened 10 years ago
Closed 9 years ago
#11977 closed enhancement (fixed)
Cause SoundRecorder to remember last-saved location (easy)
Reported by: | dsuden | Owned by: | waddlesplash |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | Applications/SoundRecorder | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is probably a pretty small feature addition, but it'd would be a big help!
Right now, SoundRecorder repeatedly defaults to /home as its Save-as location, and doesn't store or remember the previously used Save-as location. So that requires the user to have to browse to the desired location over and over (or drill down through folders in Tracker, and drag the newly-recorded item to the desired destination). If SoundRecorder could just remember the user's last Save-as location, it'd be a huge time-saver to people who use the program regularly.
Attachments (2)
Change History (20)
by , 10 years ago
Attachment: | screenshot2.png added |
---|
comment:1 by , 10 years ago
Summary: | Cause SoundRecorder to remember last-saved location → Cause SoundRecorder to remember last-saved location (easy) |
---|
comment:2 by , 10 years ago
Component: | - General → Applications/SoundRecorder |
---|---|
Owner: | changed from | to
comment:3 by , 10 years ago
Owner: | changed from | to
---|---|
Priority: | normal → low |
Status: | new → assigned |
That patch looks OK, however it doesn't save the setting across launches -- unless I'm misreading something...
comment:4 by , 10 years ago
I don't think the setting should be saved across sessions, this isn't the usual behaviour.
comment:5 by , 10 years ago
For the latter behavior, it'd probably make more sense to add a pref option to set a default starting location if desired.
comment:6 by , 10 years ago
Since the file panel is reused, it would be simpler to set its directory directly when a file is saved, instead of storing that in a separate variable. But I think BFilePanel should already be doing that itself?
comment:7 by , 10 years ago
Looking it seems that the best way is to set it directly in the panel, i can't see side effects. But i'm not sure it should be done automatically by the panel as it may interfere with other behavior unless it's specified in the bebook (but i can't find it).
by , 10 years ago
Attachment: | 0001-SoundRecorder-Remember-last-save-directory-used.patch added |
---|
comment:8 by , 10 years ago
patch: | 0 → 1 |
---|
comment:9 by , 10 years ago
There are other applications with persistent save location: Screenshot, ShowImage, Wonderbrush...
comment:10 by , 10 years ago
The Be Book overview of BFilePanel says this:
Delete the BFilePanel object…or don't. When the user closes a file panel, the object is not automatically deleted; you have to do it yourself. But you may not want to. If you don't delete the panel, you can simply call Show() the next time you want to display it; the state from the previous invocation (the panel's size and location, the directory it points to) is remembered.
So "the directory it points to is remembered". I'm not sure if this means the initially set directory, or the directory the user last navigated to, but I think the latter makes more sense.
comment:11 by , 9 years ago
I have looked at it, and just not found anything that explain why it's not working in SoundRecorder. You are right the directory is remembered usually.
comment:12 by , 9 years ago
Barrett, any further luck on this? I'd sure love to find a solution! Specifically, that SoundRecorder will remember the last-saved-to directory, and default to there until a different saved-to directory is chosen by the user.
comment:13 by , 9 years ago
Apparently, it's right that the FilePanel should do it automatically. There's something in the SoundRecorder code which is forbidding it. I've been a bit lazy on this issue, and since i have a WIP rewrite/refactor of this app, i thought i could postpone it. But if you want to fix this, please do it :-)
comment:14 by , 9 years ago
I ought to give dsuden feedback on this as well, since I blindly encouraged him to "ping" this ticket some time back... The problem is not what everybody expected, indeed.. This should be turned from "enhancement" to "bug", and the "easy" tag removed possibly too..
Reviewed the code in RecorderWindow.cpp and indeed it does everything as it should to remember its state! Same I do in my apps, same as StyledEdit does and others. Yet (just tried to be sure) StyledEdit does remember the last state of the file panel, but SR does not. The only 'extras' that SR calls between panel invokations are SetMessage and SetSaveText, neither of which change the working directory. Weird.
Is the working directory the only thing that is "forgotten", or does the panel also forget its size and position, if you change it between invokations?
Anyway seems this is definitely a bug hunt, not an enhancement. Somebody will need to do the dirty work of tracing/debugging *g*
(edit: would tag myself to this ticket, but was broken last year by #11738 so I'll have to send myself an old fashioned self-adressed email or do another trick to remember to work on this *g*)
(edit2: should look into the below, SkipButtonKeypressFilter::Filter() seems to cast a wide net indeed; though it is AddCommonFilter()ed to the main window, not to the BFilePanel à priori)
comment:15 by , 9 years ago
I looked fastly at the code. I am not 100% sure however, but I think i have found the problem. TransportButton is filtering keys with a BMessageFilter but also BFilePanel is using a similar technique. In particular the B_KEY_DOWN_MESSAGE looks like the source of problems, look in kits/tracker/FilePanelPriv.cpp and TransportButton.cpp of SoundRecorder.
comment:16 by , 9 years ago
I just tried to disable the filter, but at next build i realized that it seems to work OK now. When i save a clip, the next time the panel open at the correct directory.
Except you meant that it should remember the location also the next time you open the app, but as said before i don't think dsduden meant that.
comment:17 by , 9 years ago
Well duh, it works indeed! :-b Maybe it was fixed somewhat by the recent merge of the "tracker layout" branch or something
Dane, do you want to try with a recent hrev? Just tried 3 different use-cases here, and in all cases the file panel remembers its latest directory.
comment:18 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing for now, then. Reopen if you find a way to trigger this again.
(shows the problem)