[gtk/filechooser-save-again] Make file chooser saving work again



commit a88d0a7009aaae478b7b2712d3136667f9f441cb
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 2 01:08:21 2019 +0000

    Make file chooser saving work again
    
    I was a little overzealous when going
    for the new default handling here. We
    can't switch to gtk_widget_activate_default
    before we actually handle the default.activate
    action.

 gtk/gtkfilechooserdialog.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index de42a77c70..cb5cf88b82 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -395,9 +395,16 @@ static void
 file_chooser_widget_response_requested (GtkWidget            *widget,
                                         GtkFileChooserDialog *dialog)
 {
+  GtkButton *button;
+
   dialog->priv->response_requested = TRUE;
 
-  gtk_widget_activate_default (widget);
+  button = get_accept_action_widget (GTK_DIALOG (dialog), TRUE);
+  if (button)
+    {
+      gtk_widget_activate (button);
+      return;
+    }
 
   dialog->priv->response_requested = FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]