set_alternative_button_order


Description:

[ CCode ( sentinel = "-1" ) ]
[ Version ( deprecated = true , deprecated_since = "3.10" , since = "2.6" ) ]
public void set_alternative_button_order (...)

Warning: set_alternative_button_order is deprecated since 3.10.

Sets an alternative button order.

Note:

Deprecated

If the gtk_alternative_button_order setting is set to true, the dialog buttons are reordered according to the order of the response ids passed to this function.

By default, GTK+ dialogs use the button order advocated by the GNOME Human Interface Guidelines with the affirmative button at the far right, and the cancel button left of it. But the builtin GTK+ dialogs and MessageDialogs do provide an alternative button order, which is more suitable on some platforms, e.g. Windows.

Use this function after adding all the buttons to your dialog, as the following example shows:

cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
_("_Cancel"),
GTK_RESPONSE_CANCEL);

ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
_("_OK"),
GTK_RESPONSE_OK);

gtk_widget_grab_default (ok_button);

help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
_("_Help"),
GTK_RESPONSE_HELP);

gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
GTK_RESPONSE_HELP,
-1);

Parameters:

this

a Dialog

...

a list of more response ids of this’s buttons, terminated by -1

first_response_id

a response id used by one this’s buttons