Re: Dialog Question (Help)



On Mon, 2003-07-14 at 14:42, Harring Figueiredo wrote:
Folks,

 I created a dialog for Preferences as follows:

dialog = gtk_dialog_new_with_buttons
                        ("CDStation2 Preferances", NULL,
                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
                        GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_CLOSE,
                        GTK_RESPONSE_CLOSE, "Reset", 999, NULL);
        build_ui();
        while(1){
                rt = gtk_dialog_run(GTK_DIALOG(settings_ui->dialog));
                if(rt == GTK_RESPONSE_APPLY )
                        g_warning("Apply changes not implemented.");
                else{
                        gtk_widget_destroy(GTK_WIDGET(settings_ui->dialog));
                        break;
                }
        }


 The dialog displays fine; however, while it is running, I press a button to
create a GtkFileSelection. The file selection gets displayed; however, I am
able to get a response from it no matter where I click.

That's because you've made your dialog modal.  Modal dialogs generally
suck, and you shouldn't use them unless you have a really, really good
reason.

--
Shaun





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]