[gtk+] Revert "gtk_entry_completion_get_cells: revert returning NULL"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "gtk_entry_completion_get_cells: revert returning NULL"
- Date: Mon, 3 Mar 2014 11:03:42 +0000 (UTC)
commit c243ad8f49f9201bd99a575caf043f519132982f
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 3 05:50:34 2014 -0500
Revert "gtk_entry_completion_get_cells: revert returning NULL"
This reverts commit a9a6fb045a0faedb30ffdad4ed979f380c483ebd.
gtk/gtkentrycompletion.c | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 6305721..7b22ecd 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -843,21 +843,20 @@ gtk_entry_completion_clear_text_column_renderer (GtkEntryCompletion *completion)
static GList *
gtk_entry_completion_get_cells (GtkCellLayout *cell_layout)
{
- static gboolean warned = FALSE;
-
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (cell_layout);
- GtkCellArea *area;
- if (!warned && completion->priv->text_column != -1)
+ if (completion->priv->text_column == -1)
{
- g_warning ("GtkEntryCompletion: don't call gtk_cell_layout_get_cells() to get "
- "the cell renderer that was created by setting 'text-column'.");
- warned = TRUE;
- }
-
- area = gtk_entry_completion_get_area (cell_layout);
+ GtkCellArea *area;
- return gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (area));
+ area = gtk_entry_completion_get_area (cell_layout);
+ return gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (area));
+ }
+ else
+ {
+ /* Don't expose the internally created cell renderer */
+ return NULL;
+ }
}
static void
@@ -1475,9 +1474,6 @@ gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
* to have a list displaying all (and just) strings in the completion list,
* and to get those strings from @column in the model of @completion.
*
- * The cell renderer added by this function is managed internally. Do
- * not access or modify it.
- *
* Any cell renderers that were added to @completion before calling this
* function will be removed.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]