need to set default directory in Composer

VERIFIED FIXED in mozilla0.9.9

Status

SeaMonkey
Composer
VERIFIED FIXED
17 years ago
14 years ago

People

(Reporter: Mitch Green, Assigned: Charles Manske)

Tracking

({pp})

Trunk
mozilla0.9.9
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2)
Gecko/20010726 Netscape6/6.1
BuildID:    Netscape 6.1 PR 1

I dislike not being able to preset a default directory location in Composer. 
This feature was included in older versions and should be included in this version.
Having this feature would make Composer more user friendly.  Currently,
everytime I want to change a webpage, I must traverse through a stack of
directories on the appropriate drive to find the files I want to use.  My web
page files are kept in a single location.

Reproducible: Always
Steps to Reproduce:
1. try
2.
3.

Actual Results:  doesn't save default

Expected Results:  should
(Reporter)

Updated

17 years ago
Keywords: nsenterprise

Comment 1

17 years ago
-->editor

As a workaround, you might use the "recently edited pages" (under the File menu) 
if it's for files you regularly edit.
Assignee: kmcclusk → beppe
Component: Compositor → Editor
Keywords: 4xp, pp
QA Contact: petersen → sujay

Comment 2

17 years ago
I don't recall a setting in preferences where you set a default directory on
your HD, can you point me to the preference setting?
(Assignee)

Comment 3

17 years ago
I agree -- I implemented the feature in 4.7 and liked it very much.
It is not a user preference. What I did was remember the last directory you save
to in a pref when you save a file, and use that as the initial directory for
further file open/saves. Thus if you change the "default directory" via another
program or by doing a file open/save from the browser, it doesn't upset the 
"last used" Composer directory.
Assignee: beppe → cmanske
Target Milestone: --- → mozilla1.0

Comment 4

17 years ago
that is really odd, on win98 when I edit a document and save it in directory
C:/foo/bar and then edit another page and select save, that is the directory
that is initially displayed. If I close out the app and then do a save, the
default directory is the directory location that the app is in. Are you tlaking
about across edit sessions, or in the same edit session Charley?
(Assignee)

Comment 5

17 years ago
Beth: Are describing behavior in 4.7 or 6.x?
Status: NEW → ASSIGNED

Comment 6

17 years ago
Removing nsenterprise nomination, adding nsBranch.
Keywords: nsenterprise → nsBranch

Comment 7

17 years ago
Since is targeted for 1.0, marking as nsbranch- for this round.
Keywords: nsbranch → nsbranch-

Comment 8

17 years ago
spam composer change
Component: Editor: Core → Editor: Composer

Updated

17 years ago
Blocks: 107067

Updated

17 years ago
Keywords: nsbranch-
(Assignee)

Comment 9

17 years ago
load balancing
Target Milestone: mozilla1.0 → mozilla0.9.8
(Assignee)

Comment 10

17 years ago
*** Bug 115806 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 11

17 years ago
Created attachment 62295 [details] [diff] [review]
fix

Notes:
editor.js: Set/Get Unichar prefs code was moved to editorUtilities -- these 
should be used for URL string prefs.
Changes in ComposerCommands.js are in nsOpenCommand code and
PromptForSaveLocation(), which is used when saving files. 
General strategy is to save the last-used directory to a pref for each filetype

used by Composer. gFilePickerDirectory in the editor window is used to save and

reset the current directory used by other modules.
(Assignee)

Updated

17 years ago
Keywords: patch, review
Whiteboard: FIX IN HAND, need r=,sr=

Comment 12

17 years ago
Comment on attachment 62295 [details] [diff] [review]
fix

looks ok, r=syd
Attachment #62295 - Flags: review+
(Assignee)

Updated

17 years ago
Whiteboard: FIX IN HAND, need r=,sr= → FIX IN HAND, need sr=

Comment 13

17 years ago
Comment on attachment 62295 [details] [diff] [review]
fix

sr=hewitt
Attachment #62295 - Flags: superreview+
(Assignee)

Comment 14

17 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, need sr=

Comment 15

17 years ago
I don't think this bug was fixed correctly.  On Macintosh, we might be pointing
to the wrong location (which could be *very* annoying).  We shouldn't save the
preference as a string but as whatever the equivalent of an nsIFile is (if
possible).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 16

17 years ago
I don't understand how we can be pointing to the "wrong location". It saves the
last location used by the Open File dialog and saves them as UniChar pref strings
just as we do for the Recent Files menu.
Do you have an example where it doesn't work?

Comment 17

17 years ago
Strings are a "lossy" format on Mac for file locations.  That is exactly why we
have nsIFile / nsILocalFile.  A better fix will use that type of preference
instead of a string.
(Assignee)

Comment 18

17 years ago
Created attachment 64094 [details] [diff] [review]
Save directory as nsILocalFile

Previous patch (checked in) was still valid for all callers of
Set/SaveSetFilePickerDirectory(). This patch enhances those methods to save
pref
as nsILocalFile instead of the "file:" URL, as Brade suggested.
Kathy: Can you please test this on Mac?
Attachment #62295 - Attachment is obsolete: true
(Assignee)

Updated

17 years ago
Status: REOPENED → ASSIGNED
Whiteboard: FIX IN HAND, need r=,sr=
(Assignee)

Comment 19

17 years ago
Well, I could have sworn this worked on Windows in initial testing, but now I'm
finding that the filepicker's "displayDirectory" returned is always my VC++
project directory, not the one I used to select a file. Weird.
(Assignee)

Comment 20

17 years ago
moving milestone.
Note that the existing fix checked in no longer works because of a new bug in
FilePicker (bug to be filed soon).
Target Milestone: mozilla0.9.8 → mozilla0.9.9
(Assignee)

Comment 21

17 years ago
Created attachment 66220 [details] [diff] [review]
Updated fix to use nsILocalFile for prefs

This uses the filePicker.file.parent to get the directory of the file picked
by user, which gets around current problems in filepicker (displayDirectory
is *not* the last user location; Bill Law is fixing this in Windows but it's
not
clear if displayDirectory should do that anyway!)
(Assignee)

Updated

17 years ago
Attachment #64094 - Attachment is obsolete: true

Comment 22

17 years ago
Comment on attachment 66220 [details] [diff] [review]
Updated fix to use nsILocalFile for prefs

r=law
Attachment #66220 - Flags: review+
(Assignee)

Updated

17 years ago
Whiteboard: FIX IN HAND, need r=,sr= → FIX IN HAND, need sr=
Comment on attachment 66220 [details] [diff] [review]
Updated fix to use nsILocalFile for prefs

sr=dveditz
Attachment #66220 - Flags: superreview+
(Assignee)

Comment 24

17 years ago
checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago17 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, need sr=

Comment 25

17 years ago
Verified on Win 2k using the 01-27 trunk build, and Mac OSX using the 01-28
trunk build.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.