summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-09 02:06:31 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-09 02:06:31 -0400
commit2746a2d929615231af10f221fc2ab416537285f3 (patch)
tree2fe7c5c26a7100cba3b3b397dec7bf9e9efd0200 /gtk/gtkfilechooserdialog.c
parente31bacf7be3dcc5295c89f8e929b53636976ebaa (diff)
downloadgtk+-2746a2d929615231af10f221fc2ab416537285f3.tar.gz
filechooser: Drop the ::selection-changed signal
This signal does not work on native file choosers, and it exposes internals of the widget that should not be public. And it is just not very interesting.
Diffstat (limited to 'gtk/gtkfilechooserdialog.c')
-rw-r--r--gtk/gtkfilechooserdialog.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index 8e8e70c1d6..a7bc1dd15f 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -267,8 +267,6 @@ static void gtk_file_chooser_dialog_size_allocate (GtkWidget *wid
int baseline);
static void file_chooser_widget_response_requested (GtkWidget *widget,
GtkFileChooserDialog *dialog);
-static void file_chooser_widget_selection_changed (GtkWidget *widget,
- GtkFileChooserDialog *dialog);
static void response_cb (GtkDialog *dialog,
gint response_id);
@@ -309,7 +307,6 @@ gtk_file_chooser_dialog_class_init (GtkFileChooserDialogClass *class)
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_bind_template_callback (widget_class, file_chooser_widget_selection_changed);
}
static void
@@ -365,26 +362,6 @@ is_accept_response_id (gint response_id)
}
static void
-file_chooser_widget_selection_changed (GtkWidget *widget,
- GtkFileChooserDialog *dialog)
-{
- GtkFileChooserDialogPrivate *priv = gtk_file_chooser_dialog_get_instance_private (dialog);
- GtkWidget *button;
- GListModel *files;
- gboolean sensitive;
-
- button = get_accept_action_widget (GTK_DIALOG (dialog), FALSE);
- if (button == NULL)
- return;
-
- files = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (priv->widget));
- sensitive = (g_list_model_get_n_items (files) > 0);
- gtk_widget_set_sensitive (button, sensitive);
-
- g_object_unref (files);
-}
-
-static void
file_chooser_widget_response_requested (GtkWidget *widget,
GtkFileChooserDialog *dialog)
{