Use GtkComboBox instead of GtkCombo in testsocket

This commit is contained in:
Christian Dywan 2010-03-31 17:24:50 +02:00 committed by Javier Jardón
parent 464eeda24c
commit 187e49992d
2 changed files with 16 additions and 21 deletions

View File

@ -19,8 +19,6 @@
* Boston, MA 02111-1307, USA.
*/
#undef GTK_DISABLE_DEPRECATED
#include "config.h"
#include <gtk/gtk.h>

View File

@ -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;
GtkComboBox *combo;
GtkWidget *entry;
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_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");
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);
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);
}