From e0602fd6a864c52ab4d9950ce55c1bc2c4382dbe Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 31 Mar 2010 15:32:03 +0200 Subject: [PATCH] Remove obsolete GtkText test from testgtk --- tests/testgtk.c | 178 ------------------------------------------------ 1 file changed, 178 deletions(-) diff --git a/tests/testgtk.c b/tests/testgtk.c index 51b422f448..18b0f08f5f 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -6850,183 +6850,6 @@ struct { int ntext_colors = sizeof(text_colors) / sizeof(text_colors[0]); -/* - * GtkText - */ -void -text_insert_random (GtkWidget *w, GtkText *text) -{ - int i; - char c; - for (i=0; i<10; i++) - { - c = 'A' + rand() % ('Z' - 'A'); - gtk_text_set_point (text, rand() % gtk_text_get_length (text)); - gtk_text_insert (text, NULL, NULL, NULL, &c, 1); - } -} - -void -create_text (GtkWidget *widget) -{ - int i, j; - - static GtkWidget *window = NULL; - GtkWidget *box1; - GtkWidget *box2; - GtkWidget *hbox; - GtkWidget *button; - GtkWidget *check; - GtkWidget *separator; - GtkWidget *scrolled_window; - GtkWidget *text; - - FILE *infile; - - if (!window) - { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_screen (GTK_WINDOW (window), - gtk_widget_get_screen (widget)); - - gtk_widget_set_name (window, "text window"); - g_object_set (window, "allow_shrink", TRUE, "allow_grow", TRUE, NULL); - gtk_widget_set_size_request (window, 500, 500); - - g_signal_connect (window, "destroy", - G_CALLBACK (gtk_widget_destroyed), - &window); - - gtk_window_set_title (GTK_WINDOW (window), "test"); - gtk_container_set_border_width (GTK_CONTAINER (window), 0); - - - box1 = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (window), box1); - gtk_widget_show (box1); - - - box2 = gtk_vbox_new (FALSE, 10); - gtk_container_set_border_width (GTK_CONTAINER (box2), 10); - gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); - gtk_widget_show (box2); - - - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_box_pack_start (GTK_BOX (box2), scrolled_window, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_NEVER, - GTK_POLICY_ALWAYS); - gtk_widget_show (scrolled_window); - - text = gtk_text_new (NULL, NULL); - gtk_text_set_editable (GTK_TEXT (text), TRUE); - gtk_container_add (GTK_CONTAINER (scrolled_window), text); - gtk_widget_grab_focus (text); - gtk_widget_show (text); - - - gtk_text_freeze (GTK_TEXT (text)); - - for (i=0; i