closing window



Hi,

I have function for creation modal message window:

void
create_window_message (gchar * message)
{
        dialog = gtk_window_new (GTK_WINDOW_DIALOG);
        gtk_window_set_modal (GTK_WINDOW (dialog_oznam), TRUE);
        
        ...
        
        gtk_widget_show (dialog);
        
        GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);
        gtk_widget_grab_default (button_ok);
        
        gtk_main ();
}

void
on_message_button_ok_clicked (GtkWidget * but, GtkWidget * dialog)
{
        gtk_widget_destroy (dialog);
        gtk_main_quit ();
}



Sometimes it is not possible to click on button OK. But ENTER closes the
window. Why?


Any advices ?
Thank you.





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