I would like to access a dialog button that is created via gtk_dialog_new_with_buttons() in order to set its sensitivity property. As an example, there are times in my program during a runtime operation that I want the user to be able to 'Cancel', but not be able to press 'Ok'. After the operation is complete, then I desire the to have the opposite conditions... 'Cancel' deactivated, and 'Ok' active.
So... something like this...
/* This next function I fabricated... to illustrate what I am inquiring about... */
ok_button = gtk_get_dialog_stock_button( dialog, GTK_STOCK_OK );
/* Then I want to be able to control the particular buttons sensitivity */
gtk_widget_set_sensitive( ok_button, FALSE );
Perhaps I am just being stubborn and just need to accept that I need to initially create the dialog without any buttons... and then add them manually [presumably using gtk_dialiog_add_button() ]. That method, would of course, allow me to reference them directly. I would just like to know if this is actually necessary or are the buttons created via the very convenient function gtk_dialog_new_with_buttons() accessible?