Thu 19 Feb 2015 04:50:24 AM UTC, comment #11:
The latest save/save as panel looks just fine!
|
Wed 18 Feb 2015 04:12:57 AM UTC, comment #10:
Rik: I should have mentioned that this is all in CLI mode.
|
Wed 18 Feb 2015 04:09:42 AM UTC, comment #9:
Rik: This is a big improvement. Of course, one more
item showed up when I tried the new features. When selecting
"save" or "save as" the window that appears
shows, in the "Filename" box, the
the first 57 characters of full path which ends with the
filename "untitled.pdf". However,
if the path including the filename is longer than 57
characters, the end of the string is not shown. Thus, for long
paths, the filename is not visible at all. Resizing the window
will reveal the whole path and name, but this is not
immediately obvious. Choices:
1. resize the window depending on the string length, or
2. Display the last part of the string so that the filename
is visible.
3. Any better idea!
This is just "user friendliness", but still important.
|
Wed 18 Feb 2015 02:55:51 AM UTC, comment #8:
The bug with the directory for Save As being above the pwd() is fixed with this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/ca6fc882177d). I think the rest of the items have also been resolved. Closing report.
|
Mon 09 Feb 2015 09:07:36 PM UTC, comment #7:
I checked in the following change for Qt:
http://hg.savannah.gnu.org/hgweb/octave/rev/7335cc071ab0
|
Mon 09 Feb 2015 08:27:32 PM UTC, comment #6:
Oh, wait, figure already has a "filename" property.
|
Mon 09 Feb 2015 05:42:27 PM UTC, comment #5:
@jwe: I'm reviewing a cset from Panxto which fixes subplot handling. He has gone ahead and used appdata to store information so we might as well do that here too.
For saveas formats, maybe just implement what we have and come back later if it is insufficient. I agree that from a UI perspective most people would expect a color plot when they save.
|
Mon 09 Feb 2015 05:18:41 PM UTC, comment #4:
I'm working on this now for Qt plotting. I'll save the filename in the figure object somehow. Guidata seems like an OK thing do use, except that someone might already be using it and it doesn't seem to be allowed to have a name. So setting appdata on the figure handle with the name _save_filename_ (or similar) seems like a more reasonable thing because it shouldn't conflict with something a user does. Or, we can just add a hidden _save_filename_ property to the figure properties.
The output format can (mostly) be detected from the file name, but should there also be some way to specify print options? For example, saving to "foo.ps" will generate a monochrome plot by default. How to select the -dpsc device instead?
|
Sun 08 Feb 2015 03:20:25 PM UTC, comment #3:
To temporarily store the name of the file that the figure has been saved in it appears that the functions guidata or setappdata would be appropriate. I think I have a slight preference for using guidata. Since guidata only holds a single variable the variable stored should be a container variable such as a struct with a particular field that refers to the filename. I would use something like "__figure_filename" which has the internal prefix and is descriptive.
|
Sat 07 Feb 2015 07:10:19 PM UTC, comment #2:
According to
http://www.mathworks.com/help/matlab/creating_plots/saving-your-work.html
the `File` menu does have both `Save` and `Save As` items. It says that `Save` launches the `Save As` dialog if it's the first time saving. That implies that something is remembered and choosing `Save` again just overwrites the previously saved file.
I don't see any reference as to whether they suggest a default file name or not in the `Save As` dialog.
|
Tue 03 Feb 2015 09:06:21 PM UTC, comment #1:
What does Matlab do? Do they even have a 'Save' menu option or is it always 'Save As' because a filename needs to be specified? If they do have 'Save', what is the default filename?
|
Tue 03 Feb 2015 06:58:42 PM UTC, original submission:
First, using fltk in either GUI or CLI:
if you click on the figure box
file -> save or save as (both behave the same way -- is this
intended??) you get a dialog box which shows under "look in"
the directory just ABOVE the current directory and in the box
for "filename" it shows the name of the current directory. If you
accept these defaults the plot is written to the directory above
the current one with the name "current_dir".pdf. This does not seem to be a
helpful default setting. And, I could not find a way
to cause the directory to be changed to the current directory.
Changes in this area should be coordinated with qt GUI options.
|