Gtk FileChooserDialog doesn't seem to react on button input.
I wanna make an application using Glade and Gtk so that the users can use a graphical user interface. But I don't get the FileChooserDialog to work. Currently I use the stock FileChooserDialog from within glade and I do the following:
All the code seems to work fine but the program doesn't react on the buttons Save and Cancel. It's only when I press the close button of the Dialog that the app print's out the appropriate string. E.g. I open the Dialog and I click cancel. Nothing happens but If I close the Dialog "Cancel clicked" will be printed to console.
builder->get_widget("filechooserdialogSave",pSaveDialog); //filechooserdialogSave is defined in .glade file
/* The Dialog opens when btnOutput is clicked */
int result = pSaveDialog->run();
std::cout << "Folder Selected: "<< pSaveDialog->get_uri() <<std::endl;
std::cout << "Cancel clicked." << std::endl;
std::cout<< "Unexpected program flow"<<std::endl;
In the dialog the stock buttons (e.g. creating a new folder) do work the way I want, so I only got the problem with the buttons I defined.
First I added Save button in glade but then I had the same problem. It looks like a problem with a thread who only starts after the dialog is finished but I can't seem to find the problem.
I hope anybody can help me.
A man may fight for many things. His country, his friends, his principles, the glistening ear on the cheek of a golden child. But personally, I'd mud-wrestle my own mother for a ton of cash, an amusing clock and a sack of French porn. - Blackadder -