[gtk+/gtk-2-24] GtkComboBox: Add a constructor that takes a model and adds an entry
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] GtkComboBox: Add a constructor that takes a model and adds an entry
- Date: Wed, 10 Nov 2010 14:01:05 +0000 (UTC)
commit 779f4e10bec42a9d8a2a4a734c404d3382ca6f94
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 29 12:28:42 2010 -0400
GtkComboBox: Add a constructor that takes a model and adds an entry
https://bugzilla.gnome.org/show_bug.cgi?id=633050
docs/reference/gtk/gtk-sections.txt | 1 +
gtk/gtk.symbols | 1 +
gtk/gtkcombobox.c | 17 +++++++++++++++++
gtk/gtkcombobox.h | 9 +++++----
4 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index 5251f29..3dc22cf 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -934,6 +934,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
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 34834e3..f7355a9 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -959,6 +959,7 @@ gtk_combo_box_new
gtk_combo_box_new_text
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_prepend_text
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index a0cc432..e687366 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -4828,6 +4828,23 @@ gtk_combo_box_new_with_model (GtkTreeModel *model)
}
/**
+ * 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
*
diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h
index d6cca12..bc9d532 100644
--- a/gtk/gtkcombobox.h
+++ b/gtk/gtkcombobox.h
@@ -67,10 +67,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]