bugGNU Octave - Bugs: bug #45844, Make double click in file explorer...

 
 

bug #45844: Make double click in file explorer open files with default app by default

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Sat 29 Aug 2015 03:20:33 PM UTC  
 
Category: GUISeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 19 Nov 2015 10:48:41 AM UTC, comment #16:

Indeed:

Avinoam Kalma <avinoam>
Project Member
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.

Pantxo Diribarne <pantxo>
Project Member
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.

Avinoam Kalma <avinoam>
Project Member
Thu 19 Nov 2015 06:39:55 AM UTC, comment #13:

attached problematic png file

(file #35497)

Avinoam Kalma <avinoam>
Project Member
Thu 19 Nov 2015 06:22:17 AM UTC, comment #12:

@Avinoam: can you attach th failing png?

Pantxo Diribarne <pantxo>
Project Member
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.

Avinoam Kalma <avinoam>
Project Member
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?

Pantxo Diribarne <pantxo>
Project Member
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.

Avinoam Kalma <avinoam>
Project Member
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.

Pantxo Diribarne <pantxo>
Project Member
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?

Torsten <ttl>
Project Member
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)

Pantxo Diribarne <pantxo>
Project Member
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.

Pantxo Diribarne <pantxo>
Project Member
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)

Torsten <ttl>
Project Member
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)

Pantxo Diribarne <pantxo>
Project Member
Sat 29 Aug 2015 11:44:46 PM UTC, comment #2:

+1, sounds like a good idea to me.

Rik <rik5>
Project Administrator
Sat 29 Aug 2015 06:34:09 PM UTC, comment #1:

Something for a user preference?

Philip Nienhuis <philipnienhuis>
Project Member
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.
Pantxo Diribarne <pantxo>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #35497:  foo.png added by avinoam (276KiB - image/png)
file #35463:  default_open_v3.patch added by pantxo (13KiB - application/x-download)
file #35415:  default_open_v2.patch added by ttl (13KiB - text/x-diff)
file #35374:  default_open.patch added by pantxo (15KiB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by ttl (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Nov 2015 06:39:55 AM UTCavinoamAttached File-=>Added foo.png, #35497
    Sun 15 Nov 2015 08:43:27 PM UTCpantxoStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 14 Nov 2015 05:29:52 PM UTCpantxoAttached File-=>Added default_open_v3.patch, #35463
    Sun 08 Nov 2015 02:48:29 PM UTCttlAttached File-=>Added default_open_v2.patch, #35415
    Tue 03 Nov 2015 06:37:37 PM UTCpantxoAttached File-=>Added default_open.patch, #35374

    Back to the top


    Powered by Savane 3.1-cleanup1