From 623abdedf6c6f4ce7dd7eb3594644b6032c295f5 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Mon, 13 Dec 2010 15:58:07 +0900 Subject: [PATCH] Added gtk_entry_completion_new_with_area() --- docs/reference/gtk/gtk3-sections.txt | 1 + gtk/gtk.symbols | 1 + gtk/gtkentrycompletion.c | 22 ++++++++++++++++++++++ gtk/gtkentrycompletion.h | 2 ++ 4 files changed, 26 insertions(+) diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index dbe4e423e8..5702bdb406 100644 --- a/docs/reference/gtk/gtk3-sections.txt +++ b/docs/reference/gtk/gtk3-sections.txt @@ -1119,6 +1119,7 @@ gtk_entry_buffer_get_type GtkEntryCompletion GtkEntryCompletionMatchFunc gtk_entry_completion_new +gtk_entry_completion_new_with_area gtk_entry_completion_get_entry gtk_entry_completion_set_model gtk_entry_completion_get_model diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index ce41e59b0e..b7c384bd77 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -798,6 +798,7 @@ gtk_entry_completion_insert_action_markup gtk_entry_completion_insert_action_text gtk_entry_completion_insert_prefix gtk_entry_completion_new +gtk_entry_completion_new_with_area gtk_entry_completion_set_inline_completion gtk_entry_completion_set_inline_selection gtk_entry_completion_set_match_func diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 36247dde0f..0808c1059f 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -995,6 +995,28 @@ gtk_entry_completion_new (void) return completion; } +/** + * gtk_entry_completion_new_with_area: + * @area: the #GtkCellArea used to layout cells + * + * Creates a new #GtkEntryCompletion object using the + * specified @area to layout cells in the underlying + * #GtkTreeViewColumn for the drop-down menu. + * + * Return value: A newly created #GtkEntryCompletion object. + * + * Since: 3.0 + */ +GtkEntryCompletion * +gtk_entry_completion_new_with_area (GtkCellArea *area) +{ + GtkEntryCompletion *completion; + + completion = g_object_new (GTK_TYPE_ENTRY_COMPLETION, "cell-area", area, NULL); + + return completion; +} + /** * gtk_entry_completion_get_entry: * @completion: A #GtkEntryCompletion. diff --git a/gtk/gtkentrycompletion.h b/gtk/gtkentrycompletion.h index f120c3a679..a5ba4226c9 100644 --- a/gtk/gtkentrycompletion.h +++ b/gtk/gtkentrycompletion.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -81,6 +82,7 @@ struct _GtkEntryCompletionClass /* core */ GType gtk_entry_completion_get_type (void) G_GNUC_CONST; GtkEntryCompletion *gtk_entry_completion_new (void); +GtkEntryCompletion *gtk_entry_completion_new_with_area (GtkCellArea *area); GtkWidget *gtk_entry_completion_get_entry (GtkEntryCompletion *completion);