STR #1565

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 ]

STR #1565

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_File_Chooser doesn't tell in callback of beeing closed by ok button
Version:1.1.7
Created By:Ed
Assigned To:mike
Fix Version:1.1-current (SVN: v5644)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text top right image
 
#1 Ed
12:34 Jan 18, 2007
The Fl_File_Chooser callback is called, when there was a new directory choosen and when the File_Chooser was closed by ok button. Inside the callback function it is not possible to see, whether the callback came from navigation or from ok button. The ok button hides the window, but in the moment hide() is called after callback:

void Fl_File_Chooser::cb_okButton_i(Fl_Return_Button*, void*) {
  // Do any callback that is registered...
if (callback_)
  (*callback_)(this, data_);

window->hide();
}

This should be changed to:

void Fl_File_Chooser::cb_okButton_i(Fl_Return_Button*, void*) {
window->hide();
  // Do any callback that is registered...
if (callback_)
  (*callback_)(this, data_);
}

This way it is possible to recognize the ok button event by checking if Fl_File_Chooser is visible(). If !visible() the callback was made by ok button.
 
 
#2 mike
11:42 Jan 28, 2007
Fixed in Subversion repository.

Used your proposed fix...
 
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.