summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-12 12:14:32 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-12 12:15:08 -0400
commit0145809a94667c75ed4a446b977bcc83c79b5d33 (patch)
tree494967f23295aa256514e00b7b406b8f4d114b3c /gtk/gtkfilechooserdialog.c
parent2e6b8810c03755404609d8f32417df71180bacff (diff)
downloadgtk+-0145809a94667c75ed4a446b977bcc83c79b5d33.tar.gz
filechooserdialog: Stop using ::response-requested
Replace the ::response-requested signal by an action.
Diffstat (limited to 'gtk/gtkfilechooserdialog.c')
-rw-r--r--gtk/gtkfilechooserdialog.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index 094a25f15b..f7a16057cc 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -263,8 +263,9 @@ static void gtk_file_chooser_dialog_size_allocate (GtkWidget *wid
int width,
int height,
int baseline);
-static void file_chooser_widget_response_requested (GtkWidget *widget,
- GtkFileChooserDialog *dialog);
+static void gtk_file_chooser_dialog_activate_response (GtkWidget *widget,
+ const char *action_name,
+ GVariant *parameters);
static void response_cb (GtkDialog *dialog,
gint response_id);
@@ -304,7 +305,8 @@ gtk_file_chooser_dialog_class_init (GtkFileChooserDialogClass *class)
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserDialog, widget);
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserDialog, buttons);
gtk_widget_class_bind_template_callback (widget_class, response_cb);
- gtk_widget_class_bind_template_callback (widget_class, file_chooser_widget_response_requested);
+
+ gtk_widget_class_install_action (widget_class, "response.activate", NULL, gtk_file_chooser_dialog_activate_response);
}
static void
@@ -360,9 +362,11 @@ is_accept_response_id (gint response_id)
}
static void
-file_chooser_widget_response_requested (GtkWidget *widget,
- GtkFileChooserDialog *dialog)
+gtk_file_chooser_dialog_activate_response (GtkWidget *widget,
+ const char *action_name,
+ GVariant *parameters)
{
+ GtkFileChooserDialog *dialog = GTK_FILE_CHOOSER_DIALOG (widget);
GtkFileChooserDialogPrivate *priv = gtk_file_chooser_dialog_get_instance_private (dialog);
GtkWidget *button;