From: Tristan Van Berkom Date: Mon, 13 Dec 2010 10:34:26 +0000 (+0900) Subject: Added new constructors gtk_combo_box_new_with_area and gtk_combo_box_new_with_area_an... X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=57857f13dfed9cc31da0a12e7ca3d3786a977ce6;p=~andy%2Fgtk Added new constructors gtk_combo_box_new_with_area and gtk_combo_box_new_with_area_and_entry. --- diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index b4405791f..9b28579f8 100644 --- a/docs/reference/gtk/gtk3-sections.txt +++ b/docs/reference/gtk/gtk3-sections.txt @@ -827,6 +827,8 @@ 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_new_with_area +gtk_combo_box_new_with_area_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 ab2bf1838..0c5c01d28 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -626,6 +626,8 @@ gtk_combo_box_get_title gtk_combo_box_get_type G_GNUC_CONST gtk_combo_box_get_wrap_width gtk_combo_box_new +gtk_combo_box_new_with_area +gtk_combo_box_new_with_area_and_entry gtk_combo_box_new_with_entry gtk_combo_box_new_with_model gtk_combo_box_new_with_model_and_entry diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index eb8dea45b..84ed7c47f 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -3780,6 +3780,40 @@ gtk_combo_box_new (void) return g_object_new (GTK_TYPE_COMBO_BOX, NULL); } +/** + * gtk_combo_box_new_with_area: + * @area: the #GtkCellArea to use to layout cell renderers + * + * Creates a new empty #GtkComboBox using @area to layout cells. + * + * Return value: A new #GtkComboBox. + */ +GtkWidget * +gtk_combo_box_new_with_area (GtkCellArea *area) +{ + return g_object_new (GTK_TYPE_COMBO_BOX, "cell-area", area, NULL); +} + +/** + * gtk_combo_box_new_with_area_and_entry: + * @area: the #GtkCellArea to use to layout cell renderers + * + * Creates a new empty #GtkComboBox with an entry. + * + * The new combo box will use @area to layout cells. + * + * Return value: A new #GtkComboBox. + */ +GtkWidget * +gtk_combo_box_new_with_area_and_entry (GtkCellArea *area) +{ + return g_object_new (GTK_TYPE_COMBO_BOX, + "has-entry", TRUE, + "cell-area", area, + NULL); +} + + /** * gtk_combo_box_new_with_entry: * diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h index 1c674b9c0..30a976940 100644 --- a/gtk/gtkcombobox.h +++ b/gtk/gtkcombobox.h @@ -67,6 +67,8 @@ 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_area (GtkCellArea *area); +GtkWidget *gtk_combo_box_new_with_area_and_entry (GtkCellArea *area); 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);