- gtk_box_pack_start(GTK_BOX(dlg->action_area), w, TRUE, TRUE, 0);
-
-#else
- /*
- * In GTK 2, the action area is now a GtkHButtonBox and its
- * layout behaviour seems to be different: it doesn't stretch
- * to cover the full width of the window, but instead finds its
- * own preferred width and right-aligns that within the window.
- * This isn't what we want, because we have both left-aligned
- * and right-aligned buttons coming out of the above call to
- * layout_ctrls(), and right-aligning the whole thing will
- * result in the former being centred and looking weird.
- *
- * So instead we abandon the dialog's action area completely:
- * we gtk_widget_hide() it in the below code, and we also call
- * gtk_dialog_set_has_separator() to remove the separator above
- * it. We then insert our own action area into the end of the
- * dialog's main vbox, and add our own separator above that.
- *
- * (Ideally, if we were a native GTK app, we would use the
- * GtkHButtonBox's _own_ innate ability to support one set of
- * buttons being right-aligned and one left-aligned. But to do
- * that here, we would have to either (a) pick apart our cross-
- * platform layout structures and treat them specially for this
- * particular set of controls, which would be painful, or else
- * (b) develop a special and simpler cross-platform
- * representation for these particular controls, and introduce
- * special-case code into all the _other_ platforms to handle
- * it. Neither appeals. Therefore, I regretfully discard the
- * GTKHButtonBox and go it alone.)
- */
-
- GtkWidget *align;
- align = gtk_alignment_new(0, 0, 1, 1);
- gtk_container_add(GTK_CONTAINER(align), w);
- /*
- * The purpose of this GtkAlignment is to provide padding
- * around the buttons. The padding we use is twice the padding
- * used in our GtkColumns, because we nest two GtkColumns most
- * of the time (one separating the tree view from the main
- * controls, and another for the main controls themselves).
- */
-#if GTK_CHECK_VERSION(2,4,0)
- gtk_alignment_set_padding(GTK_ALIGNMENT(align), 8, 8, 8, 8);
-#endif
- gtk_widget_show(align);
- gtk_box_pack_end(GTK_BOX(gtk_dialog_get_content_area(dlg)),
- align, FALSE, TRUE, 0);
- w = gtk_hseparator_new();
- gtk_box_pack_end(GTK_BOX(gtk_dialog_get_content_area(dlg)),
- w, FALSE, TRUE, 0);
- gtk_widget_show(w);
- gtk_widget_hide(gtk_dialog_get_action_area(dlg));
- gtk_dialog_set_has_separator(dlg, FALSE);