]> Pileus Git - ~andy/gtk/commitdiff
GtkComboBox: Add a constructor that takes a model and adds an entry
authorMatthias Clasen <mclasen@redhat.com>
Fri, 29 Oct 2010 16:28:42 +0000 (12:28 -0400)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sat, 30 Oct 2010 08:37:02 +0000 (17:37 +0900)
https://bugzilla.gnome.org/show_bug.cgi?id=633050

docs/reference/gtk/gtk3-sections.txt
gtk/gtk.symbols
gtk/gtkcombobox.c
gtk/gtkcombobox.h

index aeef317eb234d42789d4b80a6ca26993ed3f0ad2..ddda75340de022f4eeab14dfc9369a19a75fe17d 100644 (file)
@@ -779,6 +779,7 @@ GtkComboBox
 gtk_combo_box_new
 gtk_combo_box_new_with_entry
 gtk_combo_box_new_with_model
+gtk_combo_box_new_with_model_and_entry
 gtk_combo_box_get_wrap_width
 gtk_combo_box_set_wrap_width
 gtk_combo_box_get_row_span_column
index 6ae374f013efc3d46775191e38587b48357fe4ee..26b99be38e2d9db7e33980a9b901fcbd525575be 100644 (file)
@@ -821,6 +821,7 @@ gtk_combo_box_get_wrap_width
 gtk_combo_box_new
 gtk_combo_box_new_with_entry
 gtk_combo_box_new_with_model
+gtk_combo_box_new_with_model_and_entry
 gtk_combo_box_popdown
 gtk_combo_box_popup
 gtk_combo_box_popup_for_device
index c17326e3df9968cc304eff9432c404c7e308ea88..d5ec3e757b5f59a5e1e5ab42378ae5636d26009c 100644 (file)
@@ -4882,6 +4882,23 @@ gtk_combo_box_new_with_model (GtkTreeModel *model)
   return GTK_WIDGET (combo_box);
 }
 
+/**
+ * gtk_combo_box_new_with_model_and_entry:
+ *
+ * Creates a new empty #GtkComboBox with an entry
+ * and with the model initialized to @model.
+ *
+ * Return value: A new #GtkComboBox
+ */
+GtkWidget *
+gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model)
+{
+  return g_object_new (GTK_TYPE_COMBO_BOX,
+                       "has-entry", TRUE,
+                       "model", model,
+                       NULL);
+}
+
 /**
  * gtk_combo_box_get_wrap_width:
  * @combo_box: A #GtkComboBox
index c5b6a3c1e078a8d0d88e140f7368e4b6878c3dad..c8931eb3b302a296e0875bc211c2010879838b86 100644 (file)
@@ -65,10 +65,11 @@ struct _GtkComboBoxClass
 
 
 /* construction */
-GType         gtk_combo_box_get_type         (void) G_GNUC_CONST;
-GtkWidget    *gtk_combo_box_new              (void);
-GtkWidget    *gtk_combo_box_new_with_entry   (void);
-GtkWidget    *gtk_combo_box_new_with_model   (GtkTreeModel    *model);
+GType         gtk_combo_box_get_type                 (void) G_GNUC_CONST;
+GtkWidget    *gtk_combo_box_new                      (void);
+GtkWidget    *gtk_combo_box_new_with_entry           (void);
+GtkWidget    *gtk_combo_box_new_with_model           (GtkTreeModel *model);
+GtkWidget    *gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model);
 
 /* grids */
 gint          gtk_combo_box_get_wrap_width         (GtkComboBox *combo_box);