summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-04-28 18:33:27 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-04-28 23:20:13 +0000
commit3d1fdf77dc656b906f29067625dd6b87100f8a73 (patch)
tree87950fa3db6c893df2733f743005af0c5348bd1f /gtk/gtkfilechooserdialog.c
parent0ae71cacb41cd19e0b055dabfd72afce688dbeb2 (diff)
downloadgtk+-3d1fdf77dc656b906f29067625dd6b87100f8a73.tar.gz
file chooser: Stop using gtk_window_activate_default
Instead, use the new way of activating default. I think most of the default handling in GtkFileChooserDialog should be dropped, but for now this keeps things working.
Diffstat (limited to 'gtk/gtkfilechooserdialog.c')
-rw-r--r--gtk/gtkfilechooserdialog.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index ce29143f8b..6ce4414ea7 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -341,17 +341,7 @@ static void
file_chooser_widget_file_activated (GtkFileChooser *chooser,
GtkFileChooserDialog *dialog)
{
- GtkWidget *widget;
-
- if (gtk_window_activate_default (GTK_WINDOW (dialog)))
- return;
-
- /* There probably isn't a default widget, so make things easier for the
- * programmer by looking for a reasonable button on our own.
- */
- widget = get_accept_action_widget (GTK_DIALOG (dialog), TRUE);
- if (widget)
- gtk_widget_activate (widget);
+ gtk_widget_activate_default (GTK_WIDGET (chooser));
}
static void
@@ -405,22 +395,9 @@ static void
file_chooser_widget_response_requested (GtkWidget *widget,
GtkFileChooserDialog *dialog)
{
- GtkWidget *button;
-
dialog->priv->response_requested = TRUE;
- if (gtk_window_activate_default (GTK_WINDOW (dialog)))
- return;
-
- /* There probably isn't a default widget, so make things easier for the
- * programmer by looking for a reasonable button on our own.
- */
- button = get_accept_action_widget (GTK_DIALOG (dialog), TRUE);
- if (button)
- {
- gtk_widget_activate (button);
- return;
- }
+ gtk_widget_activate_default (widget);
dialog->priv->response_requested = FALSE;
}