Re: GTK dialog ESC key problem

Tim Müller wrote:

It should actually act as if you clicked the Cancel button, ie. emit a dialog response with GTK_RESPONSE_CANCEL and return that as value in gtk_dialog_run() if you are using gtk_dialog_run(). In other words: you probably need to fix your code to check the response values correctly.

static GtkWidget *prefs_window = NULL;
        prefs_window = prefs();
gtk_dialog_set_default_response (GTK_DIALOG (prefs_window), GTK_RESPONSE_CANCEL);
        response = gtk_dialog_run ( GTK_DIALOG ( prefs_window ) );
        if ( response == GTK_RESPONSE_CANCEL)
                gtk_widget_destroy ( prefs_window );
                //It goes here, where is my mistake ??
                gtk_widget_destroy ( prefs_window );
                switch (ChoosenArchiveType)

Cpsed, a Linux OpenGL 3D scene editor

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