summaryrefslogtreecommitdiff
path: root/gtk/gtkentrycompletion.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-08 11:34:28 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-09 13:31:00 -0400
commit331c28b369edae9aa3df2a24833ccb02ef8d7152 (patch)
tree375664bb7f7bdce223604460624a8353c0009cb9 /gtk/gtkentrycompletion.c
parent07af47ce3e74a1efd4537cedc5ffbd0345295d8f (diff)
downloadgtk+-331c28b369edae9aa3df2a24833ccb02ef8d7152.tar.gz
GtkEntryCompletion: Use G_PARAM_EXPLICIT_NOTIFY
Also, use the setter for text-column, internally.
Diffstat (limited to 'gtk/gtkentrycompletion.c')
-rw-r--r--gtk/gtkentrycompletion.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index ff6ceba4d2..66db4af337 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -334,7 +334,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
0,
G_MAXINT,
1,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkEntryCompletion:text-column:
*
@@ -351,7 +351,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
-1,
G_MAXINT,
-1,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkEntryCompletion:inline-completion:
@@ -369,7 +369,8 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
P_("Inline completion"),
P_("Whether the common prefix should be inserted automatically"),
FALSE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
+
/**
* GtkEntryCompletion:popup-completion:
*
@@ -384,7 +385,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
P_("Popup completion"),
P_("Whether the completions should be shown in a popup window"),
TRUE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkEntryCompletion:popup-set-width:
@@ -400,7 +401,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
P_("Popup set width"),
P_("If TRUE, the popup window will have the same size as the entry"),
TRUE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkEntryCompletion:popup-single-match:
@@ -418,7 +419,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
P_("Popup single match"),
P_("If TRUE, the popup window will appear for a single match."),
TRUE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkEntryCompletion:inline-selection:
*
@@ -433,7 +434,7 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
P_("Inline selection"),
P_("Your description here"),
FALSE,
- GTK_PARAM_READWRITE));
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -653,7 +654,7 @@ gtk_entry_completion_set_property (GObject *object,
break;
case PROP_TEXT_COLUMN:
- priv->text_column = g_value_get_int (value);
+ gtk_entry_completion_set_text_column (completion, g_value_get_int (value));
break;
case PROP_INLINE_COMPLETION:
@@ -1408,6 +1409,9 @@ gtk_entry_completion_set_text_column (GtkEntryCompletion *completion,
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
g_return_if_fail (column >= 0);
+ if (completion->priv->text_column == column)
+ return;
+
completion->priv->text_column = column;
cell = gtk_cell_renderer_text_new ();