Remove reversing Ok/Cancel button order functionality

This commit is contained in:
Paul Dicker
2025-03-29 15:23:06 +01:00
committed by Stéphane Lesimple
parent 2cee2215af
commit 2bb0774538
6 changed files with 0 additions and 88 deletions

View File

@@ -436,7 +436,6 @@ static gboolean modal_idle_func(gpointer data)
if(mi->button_fn)
mi->button_fn(GTK_DIALOG(dialog));
else GuiReverseCancelOK(GTK_DIALOG(dialog));
response = gtk_dialog_run(GTK_DIALOG(dialog));
@@ -537,34 +536,6 @@ void GuiSetText(PangoLayout *layout, char *text, int *w, int *h)
*h = rect.height;
}
/*
* Rearrange buttons to OK Cancel order
* in file dialogs
*
* gtk_dialog_set_alternative_button_order()
* has been introduced since gtk+2.6,
* but does not seem to work correctly.
*/
void GuiReverseCancelOK(GtkDialog *dialog)
{ GtkWidget *box, *button ;
if(!Closure->guiMode || !Closure->reverseCancelOK)
return;
box = dialog->action_area;
button = ((GtkBoxChild*)(g_list_first(GTK_BOX(box)->children)->data))->widget;
gtk_box_reorder_child(GTK_BOX(box), button, 1);
#if 0
gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
#endif
}
/*
* Get the width of a label text
*/
@@ -644,7 +615,6 @@ static void insert_button(GtkDialog *dialog)
gtk_widget_show(align);
gtk_widget_show(check);
GuiReverseCancelOK(GTK_DIALOG(dialog));
}
int GuiConfirmImageDeletion(char *file)