[gtk/file-chooser-api-cleanup-2: 1/2] tests: Stop using file chooser apis that are going away
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/file-chooser-api-cleanup-2: 1/2] tests: Stop using file chooser apis that are going away
- Date: Wed, 8 Jul 2020 14:59:26 +0000 (UTC)
commit 4557992eeb4680807b0435aee4dba0774eee7046
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 8 10:12:09 2020 -0400
tests: Stop using file chooser apis that are going away
gtk_file_chooser_[un]select_all are going away, stop
using them.
tests/testfilechooser.c | 25 -------------------------
tests/testfilechooserbutton.c | 12 ------------
2 files changed, 37 deletions(-)
---
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index d3378d472a..eace90337c 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -262,18 +262,6 @@ kill_dependent (GtkWindow *win, GtkWidget *dep)
gtk_window_destroy (GTK_WINDOW (dep));
}
-static void
-notify_multiple_cb (GtkWidget *dialog,
- GParamSpec *pspec,
- GtkWidget *button)
-{
- gboolean multiple;
-
- multiple = gtk_file_chooser_get_select_multiple (GTK_FILE_CHOOSER (dialog));
-
- gtk_widget_set_sensitive (button, multiple);
-}
-
int
main (int argc, char **argv)
{
@@ -443,19 +431,6 @@ main (int argc, char **argv)
vbbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_window_set_child (GTK_WINDOW (control_window), vbbox);
- button = gtk_button_new_with_mnemonic ("_Select all");
- gtk_widget_set_sensitive (button, multiple);
- gtk_box_append (GTK_BOX (vbbox), button);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_file_chooser_select_all), dialog);
- g_signal_connect (dialog, "notify::select-multiple",
- G_CALLBACK (notify_multiple_cb), button);
-
- button = gtk_button_new_with_mnemonic ("_Unselect all");
- gtk_box_append (GTK_BOX (vbbox), button);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_file_chooser_unselect_all), dialog);
-
button = gtk_button_new_with_label ("set_current_folder (\"/nonexistent\")");
gtk_box_append (GTK_BOX (vbbox), button);
g_signal_connect (button, "clicked",
diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c
index 270cd3194a..4053eb5cf3 100644
--- a/tests/testfilechooserbutton.c
+++ b/tests/testfilechooserbutton.c
@@ -104,13 +104,6 @@ del_pwds_parent_as_shortcut_clicked_cb (GtkWidget *button,
g_object_unref (path);
}
-static void
-unselect_all_clicked_cb (GtkWidget *button,
- gpointer user_data)
-{
- gtk_file_chooser_unselect_all (user_data);
-}
-
static void
tests_button_clicked_cb (GtkButton *real_button,
gpointer user_data)
@@ -148,11 +141,6 @@ tests_button_clicked_cb (GtkButton *real_button,
G_CALLBACK (del_pwds_parent_as_shortcut_clicked_cb), user_data);
gtk_box_append (GTK_BOX (box), button);
- button = gtk_button_new_with_label ("Unselect all");
- g_signal_connect (button, "clicked",
- G_CALLBACK (unselect_all_clicked_cb), user_data);
- gtk_box_append (GTK_BOX (box), button);
-
g_object_set_data (user_data, "tests-dialog", tests);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]