forked from AuroraMiddleware/gtk
Use GtkComboBox instead of GtkCombo in testsocket
This commit is contained in:
parent
464eeda24c
commit
187e49992d
@ -19,8 +19,6 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef GTK_DISABLE_DEPRECATED
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef GTK_DISABLE_DEPRECATED
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#if defined (GDK_WINDOWING_X11)
|
#if defined (GDK_WINDOWING_X11)
|
||||||
@ -134,25 +132,24 @@ add_buttons (GtkWidget *widget, GtkWidget *box)
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
create_combo (void)
|
create_combo (void)
|
||||||
{
|
{
|
||||||
GList *cbitems;
|
GtkComboBox *combo;
|
||||||
GtkCombo *combo;
|
GtkWidget *entry;
|
||||||
|
|
||||||
cbitems = NULL;
|
combo = GTK_COMBO_BOX (gtk_combo_box_entry_new_text ());
|
||||||
cbitems = g_list_append (cbitems, "item0");
|
gtk_combo_box_append_text (combo, "item0");
|
||||||
cbitems = g_list_append (cbitems, "item1 item1");
|
gtk_combo_box_append_text (combo, "item1 item1");
|
||||||
cbitems = g_list_append (cbitems, "item2 item2 item2");
|
gtk_combo_box_append_text (combo, "item2 item2 item2");
|
||||||
cbitems = g_list_append (cbitems, "item3 item3 item3 item3");
|
gtk_combo_box_append_text (combo, "item3 item3 item3 item3");
|
||||||
cbitems = g_list_append (cbitems, "item4 item4 item4 item4 item4");
|
gtk_combo_box_append_text (combo, "item4 item4 item4 item4 item4");
|
||||||
cbitems = g_list_append (cbitems, "item5 item5 item5 item5 item5 item5");
|
gtk_combo_box_append_text (combo, "item5 item5 item5 item5 item5 item5");
|
||||||
cbitems = g_list_append (cbitems, "item6 item6 item6 item6 item6");
|
gtk_combo_box_append_text (combo, "item6 item6 item6 item6 item6");
|
||||||
cbitems = g_list_append (cbitems, "item7 item7 item7 item7");
|
gtk_combo_box_append_text (combo, "item7 item7 item7 item7");
|
||||||
cbitems = g_list_append (cbitems, "item8 item8 item8");
|
gtk_combo_box_append_text (combo, "item8 item8 item8");
|
||||||
cbitems = g_list_append (cbitems, "item9 item9");
|
gtk_combo_box_append_text (combo, "item9 item9");
|
||||||
|
|
||||||
combo = GTK_COMBO (gtk_combo_new ());
|
entry = gtk_bin_get_child (GTK_BIN (combo));
|
||||||
gtk_combo_set_popdown_strings (combo, cbitems);
|
gtk_entry_set_text (GTK_ENTRY (entry), "hello world");
|
||||||
gtk_entry_set_text (GTK_ENTRY (combo->entry), "hello world");
|
gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
|
||||||
gtk_editable_select_region (GTK_EDITABLE (combo->entry), 0, -1);
|
|
||||||
|
|
||||||
return GTK_WIDGET (combo);
|
return GTK_WIDGET (combo);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user