Dialog Question



Greetings,

I am experiencing some strange behavior with the default
button on a gnome_dialog.  I set the default button to be
the first button in a gnome_message_box.  When the dialog
appears, the first button (Yes) has the default visual indicator 
set on it, but the last button (Cancel) is still the "selected"
button, and is activated when return is pressed (instead of the 
default button).  Here is the relevant source code:

    conf_dlg = gnome_message_box_new("Save changes?",
				     GNOME_MESSAGE_BOX_QUESTION,
				     GNOME_STOCK_BUTTON_YES,
				     GNOME_STOCK_BUTTON_NO,
				     GNOME_STOCK_BUTTON_CANCEL,
				     NULL);
    
    gtk_window_set_modal(GTK_WINDOW(conf_dlg), TRUE);
    gnome_dialog_set_default(GNOME_DIALOG (conf_dlg), 0);

    response = gnome_dialog_run_and_close(
        GNOME_DIALOG (conf_dlg));

Thanks,

Jamie Squires




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