Hi List!
As I'm currently working on the "Ask user to save unsaved files before
closing" topic, I had a look at the simple_dialog() function.
This has some strange things, I would like to change.
This dialog is currently used for simple dialogs ;-), only showing some
text on the screen and a button to close the dialog again.
It currently has no way for the developer to get an event when a button
is pressed.
I would like to add a function to register a callback function, which is
called when one of the dialog buttons is pressed.
The callback will return the button pressed and an additional parameter
with some user specific data (like in a lot of GTK callbacks).
In addition to this, I would like to change the btn_mask parameter of
the simple_dialog function from a gint pointer to a gint.
The gint pointer was intended to return the pressed button (I think).
But this isn't used anywhere in the code,
maybe just because as a developer you don't know *when* a button was
pressed, so you cannot read it.
As the callback I mentioned can easily return the pressed button,
there's no need to use a pointer here.
I will also add some more buttons, like "Yes" and "No", which can be
used for standard questions.
Any comments?
Regards, ULFL