Method

GtkDialogset_alternative_button_order

Declaration [src]

void
gtk_dialog_set_alternative_button_order (
  GtkDialog* dialog,
  gint first_response_id,
  ...
)

Description [src]

Sets an alternative button order. If the GtkSettings: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 GtkMessageDialogs 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);
Available since:2.6
Deprecated since:3.10

Deprecated.

Parameters

first_response_id gint
 

A response id used by one dialog’s buttons.

... none
 

A list of more response ids of dialog’s buttons, terminated by -1