tests: Drop testorientable
authorMatthias Clasen <mclasen@redhat.com>
Thu, 14 May 2020 23:48:08 +0000 (19:48 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 14 May 2020 23:48:08 +0000 (19:48 -0400)
Not really that interesting, and it only
tests a single case of orientable, a box.

See #2738

tests/meson.build
tests/testorientable.c [deleted file]

index b02f4f015d7c7b8bd441f0fe7916fbcc35c8906f..39bc6c2b474aa7f9bda8cc73cd81fe21f57fa21b 100644 (file)
@@ -57,7 +57,6 @@ gtk_tests = [
   ['testmountoperation'],
   ['testnotebookdnd'],
   ['testnouiprint'],
-  ['testorientable'],
   ['testoverlay'],
   ['testoverlaystyleclass'],
   ['testprint', ['testprintfileoperation.c']],
diff --git a/tests/testorientable.c b/tests/testorientable.c
deleted file mode 100644 (file)
index d312ec7..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/* testorientable.c
- * Copyright (C) 2004  Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <gtk/gtk.h>
-
-static void
-orient_toggled (GtkToggleButton *button, gpointer user_data)
-{
-  GList *orientables = (GList *) user_data, *ptr;
-  gboolean state = gtk_toggle_button_get_active (button);
-  GtkOrientation orientation;
-
-  if (state)
-    {
-      orientation = GTK_ORIENTATION_VERTICAL;
-      gtk_button_set_label (GTK_BUTTON (button), "Vertical");
-    }
-  else
-    {
-      orientation = GTK_ORIENTATION_HORIZONTAL;
-      gtk_button_set_label (GTK_BUTTON (button), "Horizontal");
-    }
-
-  for (ptr = orientables; ptr; ptr = ptr->next)
-    {
-      GtkOrientable *orientable = GTK_ORIENTABLE (ptr->data);
-
-      gtk_orientable_set_orientation (orientable, orientation);
-    }
-}
-
-static void
-quit_cb (GtkWidget *widget,
-         gpointer   data)
-{
-  gboolean *done = data;
-
-  *done = TRUE;
-
-  g_main_context_wakeup (NULL);
-}
-
-int
-main (int argc, char **argv)
-{
-  GtkWidget *window;
-  GtkWidget *vbox;
-  GtkWidget *box, *button;
-  GList *orientables = NULL;
-  gboolean done = FALSE;
-
-  gtk_init ();
-
-  window = gtk_window_new ();
-  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-
-  button = gtk_toggle_button_new_with_label ("Horizontal");
-  gtk_box_append (GTK_BOX (vbox), button);
-
-  /* GtkBox */
-  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-  orientables = g_list_prepend (orientables, box);
-  gtk_box_append (GTK_BOX (vbox), box);
-  gtk_box_append (GTK_BOX (box),
-                  gtk_button_new_with_label ("GtkBox 1"));
-  gtk_box_append (GTK_BOX (box),
-                  gtk_button_new_with_label ("GtkBox 2"));
-  gtk_box_append (GTK_BOX (box),
-                  gtk_button_new_with_label ("GtkBox 3"));
-
-  g_signal_connect (button, "toggled",
-                  G_CALLBACK (orient_toggled), orientables);
-
-  gtk_window_set_child (GTK_WINDOW (window), vbox);
-  gtk_widget_show (window);
-
-  g_signal_connect (window, "destroy",
-                  G_CALLBACK (quit_cb), &done);
-
-  while (!done)
-    g_main_context_iteration (NULL, TRUE);
-
-  return 0;
-}