Getting a pointer to a dialog's 'Cancel' button
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Getting a pointer to a dialog's 'Cancel' button
- Date: Wed, 4 May 2011 11:52:10 +0100
GtkWidget *dialog = gtk_dialog_new_with_buttons ("My diaolg", app_main_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
I want to display the above dialog non-modally (after adding its various children) and I want the 'Cancel'
button to close it. This means I can't run the dialog using gtk_dialog_run() because that effectively makes
it modal. The strategy I decided was to attach a signal handler to the 'Cancel' button and use it to destroy
its parent dialog.
Firstly, is that an advisable strategy? Secondly, how do I obtain a pointer to the dialog's 'Cancel' button
so that I can connect a signal handler to it? I looked for functions like gtk_dialog_get_child() or
gtk_window_get_child_with_id() or something similar but I couldn't find anything.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]