+ boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (boom), 5);
+ gtk_container_add (GTK_CONTAINER (tmp), boom);
+
+ model = create_list_blaat ();
+ combobox = gtk_combo_box_new_with_model (model);
+ gtk_combo_box_set_add_tearoffs (GTK_COMBO_BOX (combobox), TRUE);
+ g_object_unref (model);
+ gtk_container_add (GTK_CONTAINER (boom), combobox);
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ FALSE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+ "pixbuf", 0,
+ NULL);
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ set_sensitive,
+ NULL, NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+ "text", 1,
+ NULL);
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ set_sensitive,
+ NULL, NULL);
+ gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combobox),
+ is_separator, NULL, NULL);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
+
+ /* GtkComboBox dynamic list */
+ tmp = gtk_frame_new ("GtkComboBox (dynamic list)");
+ gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE, FALSE, 0);
+
+ boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (boom), 5);
+ gtk_container_add (GTK_CONTAINER (tmp), boom);
+
+ model = create_empty_list_blaat ();
+ combobox = gtk_combo_box_new_with_model (model);
+ g_signal_connect (combobox, "notify::popup-shown",
+ G_CALLBACK (populate_list_blaat), combobox);
+
+ gtk_combo_box_set_add_tearoffs (GTK_COMBO_BOX (combobox), TRUE);
+ g_object_unref (model);
+ gtk_container_add (GTK_CONTAINER (boom), combobox);
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ FALSE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+ "pixbuf", 0,
+ NULL);
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ set_sensitive,
+ NULL, NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+ "text", 1,
+ NULL);
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
+ renderer,
+ set_sensitive,
+ NULL, NULL);
+ gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combobox),
+ is_separator, NULL, NULL);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
+ gtk_combo_box_set_title (GTK_COMBO_BOX (combobox), "Dynamic list");
+
+ /* GtkComboBox custom entry */
+ tmp = gtk_frame_new ("GtkComboBox (custom)");
+ gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE, FALSE, 0);
+
+ boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);