mirror of https://github.com/GNOME/gimp.git
app: add the dialog buttons after creating the GimpColorDialog instance
so the "use-header-bar" property is set when the buttons are added, fixes the order of the "OK" and "Reset" buttons.
This commit is contained in:
parent
e7307194cf
commit
8251406b40
|
@ -150,20 +150,6 @@ gimp_color_dialog_class_init (GimpColorDialogClass *klass)
|
||||||
static void
|
static void
|
||||||
gimp_color_dialog_init (GimpColorDialog *dialog)
|
gimp_color_dialog_init (GimpColorDialog *dialog)
|
||||||
{
|
{
|
||||||
gimp_dialog_add_buttons (GIMP_DIALOG (dialog),
|
|
||||||
|
|
||||||
_("_Reset"), RESPONSE_RESET,
|
|
||||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
|
||||||
_("_OK"), GTK_RESPONSE_OK,
|
|
||||||
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
|
||||||
RESPONSE_RESET,
|
|
||||||
GTK_RESPONSE_OK,
|
|
||||||
GTK_RESPONSE_CANCEL,
|
|
||||||
-1);
|
|
||||||
|
|
||||||
dialog->stack = gtk_stack_new ();
|
dialog->stack = gtk_stack_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||||
dialog->stack, TRUE, TRUE, 0);
|
dialog->stack, TRUE, TRUE, 0);
|
||||||
|
@ -467,6 +453,20 @@ gimp_color_dialog_new (GimpViewable *viewable,
|
||||||
"use-header-bar", use_header_bar,
|
"use-header-bar", use_header_bar,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
gimp_dialog_add_buttons (GIMP_DIALOG (dialog),
|
||||||
|
|
||||||
|
_("_Reset"), RESPONSE_RESET,
|
||||||
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||||
|
_("_OK"), GTK_RESPONSE_OK,
|
||||||
|
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||||
|
RESPONSE_RESET,
|
||||||
|
GTK_RESPONSE_OK,
|
||||||
|
GTK_RESPONSE_CANCEL,
|
||||||
|
-1);
|
||||||
|
|
||||||
if (viewable)
|
if (viewable)
|
||||||
{
|
{
|
||||||
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),
|
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),
|
||||||
|
|
Loading…
Reference in New Issue