summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2010-03-31 17:24:50 +0200
committerJavier Jardón <jjardon@gnome.org>2010-05-03 01:51:22 +0200
commit187e49992d25c1ba11652b777aad03dfa7f415f8 (patch)
treec3fa4df185c7dceda2a1888b6c55419833f1afd2 /tests
parent464eeda24c55cd04ddaee598bc86698f4fa574f6 (diff)
downloadgtk+-187e49992d25c1ba11652b777aad03dfa7f415f8.tar.gz
Use GtkComboBox instead of GtkCombo in testsocket
Diffstat (limited to 'tests')
-rw-r--r--tests/testsocket.c2
-rw-r--r--tests/testsocket_common.c39
2 files changed, 18 insertions, 23 deletions
diff --git a/tests/testsocket.c b/tests/testsocket.c
index 1493215b3b..657fa8af80 100644
--- a/tests/testsocket.c
+++ b/tests/testsocket.c
@@ -19,8 +19,6 @@
* Boston, MA 02111-1307, USA.
*/
-#undef GTK_DISABLE_DEPRECATED
-
#include "config.h"
#include <gtk/gtk.h>
diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c
index 148b03320a..d2e1d2f804 100644
--- a/tests/testsocket_common.c
+++ b/tests/testsocket_common.c
@@ -18,8 +18,6 @@
* Boston, MA 02111-1307, USA.
*/
-#undef GTK_DISABLE_DEPRECATED
-
#include "config.h"
#include <gtk/gtk.h>
#if defined (GDK_WINDOWING_X11)
@@ -134,25 +132,24 @@ add_buttons (GtkWidget *widget, GtkWidget *box)
static GtkWidget *
create_combo (void)
{
- GList *cbitems;
- GtkCombo *combo;
-
- cbitems = NULL;
- cbitems = g_list_append (cbitems, "item0");
- cbitems = g_list_append (cbitems, "item1 item1");
- cbitems = g_list_append (cbitems, "item2 item2 item2");
- cbitems = g_list_append (cbitems, "item3 item3 item3 item3");
- cbitems = g_list_append (cbitems, "item4 item4 item4 item4 item4");
- cbitems = g_list_append (cbitems, "item5 item5 item5 item5 item5 item5");
- cbitems = g_list_append (cbitems, "item6 item6 item6 item6 item6");
- cbitems = g_list_append (cbitems, "item7 item7 item7 item7");
- cbitems = g_list_append (cbitems, "item8 item8 item8");
- cbitems = g_list_append (cbitems, "item9 item9");
-
- combo = GTK_COMBO (gtk_combo_new ());
- gtk_combo_set_popdown_strings (combo, cbitems);
- gtk_entry_set_text (GTK_ENTRY (combo->entry), "hello world");
- gtk_editable_select_region (GTK_EDITABLE (combo->entry), 0, -1);
+ GtkComboBox *combo;
+ GtkWidget *entry;
+
+ combo = GTK_COMBO_BOX (gtk_combo_box_entry_new_text ());
+ gtk_combo_box_append_text (combo, "item0");
+ gtk_combo_box_append_text (combo, "item1 item1");
+ gtk_combo_box_append_text (combo, "item2 item2 item2");
+ gtk_combo_box_append_text (combo, "item3 item3 item3 item3");
+ gtk_combo_box_append_text (combo, "item4 item4 item4 item4 item4");
+ gtk_combo_box_append_text (combo, "item5 item5 item5 item5 item5 item5");
+ gtk_combo_box_append_text (combo, "item6 item6 item6 item6 item6");
+ gtk_combo_box_append_text (combo, "item7 item7 item7 item7");
+ gtk_combo_box_append_text (combo, "item8 item8 item8");
+ gtk_combo_box_append_text (combo, "item9 item9");
+
+ entry = gtk_bin_get_child (GTK_BIN (combo));
+ gtk_entry_set_text (GTK_ENTRY (entry), "hello world");
+ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
return GTK_WIDGET (combo);
}