bugGNU Octave - Bugs: bug #32190, fixes for uigetfile and uigetdir

 
 

bug #32190: fixes for uigetfile and uigetdir

Submitter:  Petr Mikulik <mikulik>
Submitted:  Thu 20 Jan 2011 02:40:20 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 27 Jan 2011 10:18:55 AM UTC, comment #13: 

Ok,

attached is a new Changeset, including Petr's fix and John's remarks. Thanks!

I plan to push this change and close this bug later today.

Kai


(file #22532)

Kai Habel <kahacjde>
Group Member
Wed 26 Jan 2011 08:56:17 PM UTC, comment #12: 

Kai, would you like to submit a new patch, or should I go with the one you submitted previously plus the change suggested by Petr?

John W. Eaton <jwe>
Group administrator
Wed 26 Jan 2011 04:49:18 PM UTC, comment #11: 

It seems there should be Fl::flush() instead of fc->hide(). With this change, the dialog disappears correctly, thus all works as expected.

Petr Mikulik <mikulik>
Tue 25 Jan 2011 10:24:45 PM UTC, comment #10: 

No, it still does not work. It seems that  fc->hide()  only clears the canvas of the dialog window, but does not remove the window.

Petr Mikulik <mikulik>
Tue 25 Jan 2011 09:22:09 PM UTC, comment #9: 

I have a few comments about coding style.  Please see the attached file.

(file #22513)

John W. Eaton <jwe>
Group administrator
Tue 25 Jan 2011 08:12:16 PM UTC, comment #8: 

You were right - I have "graphics_toolkit fltk" in my startup and I did not try it with "graphics_toolkit gnuplot". Sorry for the confusion.

Can you try the modified Changeset.

Kai

(file #22511)

Kai Habel <kahacjde>
Group Member
Mon 24 Jan 2011 10:48:52 PM UTC, comment #7: 

I have tried OpenSUSE 11.1 with fltk 1.1.9 and 1.1.10, and OpenSUSE 11.3 with fltk 1.1.9. In all cases, the dialog box does not disappear after choosing file or directory and clicking the OK button.

It works only if "graphics_toolkit fltk" or "graphics_toolkit fltk; graphics_toolkit gnuplot" is issued. Don't you have that command in your start-up?

Octave did not compile with fltk-1.3.x-r8295.tar.bz2 -- "make" reported some errors.

Petr Mikulik <mikulik>
Mon 24 Jan 2011 11:07:17 AM UTC, comment #6: 

You don't need to upgrade to the 1.3. series but fltk 1.1.10 is the most recent of the stable series.

Kai (not logged in)

Anonymous
Mon 24 Jan 2011 11:05:35 AM UTC, comment #5: 

Do you have a chance to update fltk? I have tested all ui file functions yesterday and they worked for me. But my setup is more recent.

OpenSuse 11.3/fltk1.3.???

Kai (not logged in)

Anonymous
Mon 24 Jan 2011 10:38:07 AM UTC, comment #4: 

I have recompiled Octave with the patch. Now uigetdir and uigetfile work immediately.

Unfortunately I see the same problem I had before:
I type "a=uigetdir", then file dialog opens, I choose directory, click "OK". Now "a" is filled with the chosen directory, but the dialog box remains on screen with OK button clicked - it does not disappear. The dialog box is inactive, it does not replot itself; its title bar contains "Choose directory?" and its box contains copy of the screen where it is, it can be moved, and then gets into contents.

I tried this on OpenSUSE 11.1 under KDE as well as Gnome; fltk is 1.1.9.

Petr Mikulik <mikulik>
Sun 23 Jan 2011 08:29:26 PM UTC, comment #3: 

Ihave reopened this 'bug' and prepared a Changeset including your proposed changes. Can you please test it. I don't see the problem with the remaining file dialog. Can you give more details if you still see the problem?

Kai

(file #22501)

Kai Habel <kahacjde>
Group Member
Fri 21 Jan 2011 08:59:37 AM UTC, comment #2: 

Currently functions uigetfile and uigetdir require to issue command "backend fltk" (actually ... it looks like is has changed to "graphics_toolkit fltk") which unfortunately changes the graphics. I propose to make them behave independently. Therefore I have extracted function _fltk_uigetfile_() from _init_fltk_.cc
into an independent file _fltk_uigetfile_.cc.

Thus uigetfile.m and uigetdir.m can test just for
  if (exist('__fltk_uigetfile__', 'file') == 3)
and it will work whenever Octave has been compiled with fltk.

Can you please test the patch? It is strange that the file dialog remains on screen after "OK" is clicked.



(file #22477)

Petr Mikulik <mikulik>
Thu 20 Jan 2011 07:37:52 PM UTC, comment #1: 

Petr,
I have just pushed a fix for the reported bug. I have added the file separator at DLD-FUNCTIONS/__init_fltk__.cc (_fltk_uigetfile_) to fix this issue for uiputfile as well.

Thanks.

Kai

Kai Habel <kahacjde>
Group Member
Thu 20 Jan 2011 02:40:20 PM UTC, original submission:  

Enclosed are small fixes for:

1. uigetfile.m ... missing trailing file separator in the return value of b in [a,b]=uigetfile

2. uigetdir ... typo in the 2nd input parameter


Petr Mikulik <mikulik>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22532:  Changeset.uifilefun_sep added by kahacjde (10KiB - application/octet-stream)
file #22513:  comments added by jwe (3KiB - application/octet-stream)
file #22511:  Changeset.uifilefun_sep added by kahacjde (10KiB - application/octet-stream)
file #22501:  Changeset.uifilefun_sep added by kahacjde (10KiB - application/octet-stream - Changeset)
file #22477:  alone_uiget_dir_file.zip added by mikulik (16KiB - application/zip - patch for _fltk_uigetfile_.cc)
file #22467:  uiget_file_dir_diff.zip added by mikulik (2KiB - application/zip - patches)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by kahacjde (Posted a comment)
  • -email is unavailable- added by mikulik (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-27 kahacjde Open/ClosedOpen Closed
    2011-01-27 kahacjde Attached File- Added Changeset.uifilefun_sep, #22532
    2011-01-25 jwe Attached File- Added comments, #22513
    2011-01-25 kahacjde Attached File- Added Changeset.uifilefun_sep, #22511
    2011-01-23 kahacjde Attached File- Added Changeset.uifilefun_sep, #22501
        Open/ClosedClosed Open
    2011-01-21 mikulik Attached File- Added alone_uiget_dir_file.zip, #22477
    2011-01-20 kahacjde Open/ClosedOpen Closed
    2011-01-20 mikulik Attached File- Added uiget_file_dir_diff.zip, #22467

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code