Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#824 closed defect (fixed)

file dialog needs directory mode

Reported by: Juergen Spitzmueller Owned by: Juergen Spitzmueller
Priority: high Milestone: 1.3.0
Component: dialogs Version: 1.3.0cvs
Severity: normal Keywords: ui patch VERIFIED
Cc:

Description

In both frontends, you cannot choose a directory (directly) with the file
dialog. I.e., in pref->paths, the user can select files but no directories,
while the opposite is necessary.
We need something like a browseDir function in controllers/helper_funcs.C. In
qt, switching to "Mode OnlyDirectory" is rather trivial. Is there something
similar for xforms?

Attachments (3)

browsedir.diff (7.5 KB ) - added by Juergen Spitzmueller 21 years ago.
fix (not yet for xforms)
xforms-compile.diff (676 bytes ) - added by Juergen Spitzmueller 21 years ago.
xforms compile fix
xforms-browsedir.diff (6.6 KB ) - added by Juergen Spitzmueller 21 years ago.
fix for xforms

Download all attachments as: .zip

Change History (9)

comment:1 by levon, 21 years ago

Keywords: ui added
Milestone: 1.3.0

OK, here's what you should need :

1) change frontends/FileDialog.h to add a new method :

77 Result const opendir(string const & path = string(),
79 string const & suggested = string());

2) implement opendir in qt2/FileDialog.C to set the necessary flag

3) implement opendir in xforms (dunno what to set if needed)

4) add browseDir in controllers/helper_funcs.C that calls this version

5) change the needed browseFiles to browseDirs

Does that help ?

comment:2 by Juergen Spitzmueller, 21 years ago

Thanks, John, that helped a lot. I will upload the patch which implements
opendir in qt. Works fine. Please review.
However, I have not an inkling how to implement this in xforms (I just don't
understand xforms' file dialog).

Angus?

btw. since opendir is not implemented in xforms, it should not break (though I
have not compliled it with xforms).

by Juergen Spitzmueller, 21 years ago

Attachment: browsedir.diff added

fix (not yet for xforms)

comment:3 by levon, 21 years ago

Keywords: patch added
Owner: changed from leeming to Juergen Spitzmueller

looks ok

by Juergen Spitzmueller, 21 years ago

Attachment: xforms-compile.diff added

xforms compile fix

comment:4 by Juergen Spitzmueller, 21 years ago

Status: newassigned

by Juergen Spitzmueller, 21 years ago

Attachment: xforms-browsedir.diff added

fix for xforms

comment:5 by Juergen Spitzmueller, 21 years ago

Resolution: fixed
Status: assignedclosed

it's in.

comment:6 by levon, 21 years ago

Keywords: VERIFIED added

mass verify. grep -v ApplesWin

Note: See TracTickets for help on using tickets.