Thu 19 Nov 2015 10:48:41 AM UTC, comment #16:
Indeed:
|
Thu 19 Nov 2015 09:58:26 AM UTC, comment #15:
In Octave 4.0 on linux the GUI tries to open your png in the editor so it means that "is_octave_data_file" returns false on linux while it returns true on windows.
Just to be sure the problem is in load-save.cc, what does those return on windows:
for me it returns the same for both: "error: load: unable to determine file format of 'foo.png'"
I expect that you'll get a different message for the png.
|
Thu 19 Nov 2015 08:27:27 AM UTC, comment #14:
continue of comment #13:
but I do not think that it's a problem of this file.
It seems that Octave is trying to load it.
If I double click on this file with octave 4.0, I get
the same error message.
|
Thu 19 Nov 2015 06:39:55 AM UTC, comment #13:
attached problematic png file
(file #35497)
|
Thu 19 Nov 2015 06:22:17 AM UTC, comment #12:
@Avinoam: can you attach th failing png?
|
Wed 18 Nov 2015 09:32:45 PM UTC, comment #11:
Checking this under windows, the png wasn't open correctly:
other files were open correctly.
|
Wed 18 Nov 2015 08:46:20 PM UTC, comment #10:
We indeed use a function "is_octave_data_file" which may be failing to distinguish some files from Octave data.
At least with files generated from Octave I don't see any failure:
All of those are open in the default application for me. Can you attached a failing file?
|
Wed 18 Nov 2015 08:23:46 PM UTC, comment #9:
Checking this new feature on Windows I get for png and jpg files
+varbatim+
>> error: load: C:/Octave/bugs/a.png: inconsistent number of columns near line 4
>> error: load: C:/Octave/bugs/b.png: inconsistent number of columns near line 4
<< error: load: C:/Octave/bugs/c.jpg: inconsistent number of columns near line 2
-verbatim-
For other jpeg file, the open was OK.
For pdf & ps files it works fine.
It seems to me that Octave is trying to load these files, and not
open them with external software.
|
Sun 15 Nov 2015 08:43:15 PM UTC, comment #8:
Thanks Torsten, I wrapped the changelog to 80 columns and pushed the patch to default:
http://hg.savannah.gnu.org/hgweb/octave/rev/fec7cc73507b
Closing report.
|
Sun 15 Nov 2015 08:06:00 PM UTC, comment #7:
The patch works fine. Could you please wrap the comment lines to a max. width of 80 before pushing?
|
Sat 14 Nov 2015 05:29:52 PM UTC, comment #6:
I attached an updated patch in which I applied Torsten's suggestions. Can I push it to default?
(file #35463)
|
Tue 10 Nov 2015 12:29:50 PM UTC, comment #5:
@Torsten: thanks for the review. I agree with both of your suggestions. I'll update your the patch (starting from your modified version) ASAP.
|
Sun 08 Nov 2015 02:48:29 PM UTC, comment #4:
I have updated the patch to the newest changes in settings-dialog.ui (see attached file). Two questions/remarks:
- Can we drop the menu entry "Open in default application"? I think it is the same as "Open" except for directories where we could add "Open in file explorer" instead of "Open in default application".
- I suggest to put the default suffix list into the two settings->value () calls (settings-dialog and files-dock-widget) instead of adding it to the default settings file. This ensures that the default list is available after an update without generating a new settings file.
(file #35415)
|
Tue 03 Nov 2015 06:37:37 PM UTC, comment #3:
I attached a patch. The default files that opened in the editor would then be m,c,cc,cpp,h,txt. Other files are opened in the default application or loaded if they are data files (there is a function in place to detect that). One can also choose to open files in the editor using right click.
(file #35374)
|
Sat 29 Aug 2015 11:44:46 PM UTC, comment #2:
+1, sounds like a good idea to me.
|
Sat 29 Aug 2015 06:34:09 PM UTC, comment #1:
Something for a user preference?
|
Sat 29 Aug 2015 03:20:33 PM UTC, original submission:
Currently I often find my self closing png or pdf files I mistakingly opened in the editor due to a double click.
I know I can right-click on a file to be able to open it with the default application, but would like the inverse:
- double-click: "open" files (default application), except for .m, .cc and a few other text based passed to "edit", .mat passed to "load". We could eventually make the list of file extensions that should be passed to "edit" modifiable in the preferences.
- right-click: offer the possibility to "edit" or "load" a file.
|