We have 2 different models having their own set of columns.
https://bugzilla.gnome.org/show_bug.cgi?id=661805
enum /* blocked-contacts columns */
{
enum /* blocked-contacts columns */
{
- COL_IDENTIFIER,
- COL_HANDLE,
- COL_TEXT,
- N_COLUMNS
+ COL_BLOCKED_IDENTIFIER,
+ COL_BLOCKED_HANDLE,
+ N_BLOCKED_COLUMNS
+};
+
+enum /* completion_contacts columns */
+{
+ COL_COMPLETION_IDENTIFIER,
+ COL_COMPLETION_TEXT,
+ N_COMPLETION_COLUMNS
TpHandle handle = g_array_index (handles, TpHandle, i);
gtk_list_store_insert_with_values (priv->blocked_contacts, NULL, -1,
TpHandle handle = g_array_index (handles, TpHandle, i);
gtk_list_store_insert_with_values (priv->blocked_contacts, NULL, -1,
- COL_IDENTIFIER, identifier,
- COL_HANDLE, handle,
+ COL_BLOCKED_IDENTIFIER, identifier,
+ COL_BLOCKED_HANDLE, handle,
TpHandle handle;
gtk_tree_model_get (model, &iter,
TpHandle handle;
gtk_tree_model_get (model, &iter,
+ COL_BLOCKED_HANDLE, &handle,
-1);
if (tp_intset_is_member (removed_set, handle))
-1);
if (tp_intset_is_member (removed_set, handle))
continue;
gtk_tree_model_get (model, &iter,
continue;
gtk_tree_model_get (model, &iter,
+ COL_BLOCKED_HANDLE, &handle,
-1);
g_array_append_val (handles, handle);
-1);
g_array_append_val (handles, handle);
gtk_list_store_insert_with_values (self->priv->completion_contacts,
NULL, -1,
gtk_list_store_insert_with_values (self->priv->completion_contacts,
NULL, -1,
- COL_IDENTIFIER, empathy_contact_get_id (contact),
- COL_TEXT, tmpstr,
+ COL_COMPLETION_IDENTIFIER, empathy_contact_get_id (contact),
+ COL_COMPLETION_TEXT, tmpstr,
if (model == NULL || iter == NULL)
return FALSE;
if (model == NULL || iter == NULL)
return FALSE;
- gtk_tree_model_get (model, iter, COL_TEXT, &str, -1);
+ gtk_tree_model_get (model, iter, COL_COMPLETION_TEXT, &str, -1);
lower = g_utf8_strdown (str, -1);
if (strstr (lower, key))
{
lower = g_utf8_strdown (str, -1);
if (strstr (lower, key))
{
g_free (str);
g_free (lower);
g_free (str);
g_free (lower);
- gtk_tree_model_get (model, iter, COL_IDENTIFIER, &str, -1);
+ gtk_tree_model_get (model, iter, COL_COMPLETION_IDENTIFIER, &str, -1);
lower = g_utf8_strdown (str, -1);
if (strstr (lower, key))
{
lower = g_utf8_strdown (str, -1);
if (strstr (lower, key))
{
if (iter == NULL || model == NULL)
return FALSE;
if (iter == NULL || model == NULL)
return FALSE;
- gtk_tree_model_get (model, iter, COL_IDENTIFIER, &id, -1);
+ gtk_tree_model_get (model, iter, COL_COMPLETION_IDENTIFIER, &id, -1);
gtk_entry_set_text (GTK_ENTRY (self->priv->add_contact_entry), id);
DEBUG ("Got selected match **%s**", id);
gtk_entry_set_text (GTK_ENTRY (self->priv->add_contact_entry), id);
DEBUG ("Got selected match **%s**", id);
G_CALLBACK (contact_blocking_dialog_view_selection_changed), self);
/* build the contact entry */
G_CALLBACK (contact_blocking_dialog_view_selection_changed), self);
/* build the contact entry */
- self->priv->completion_contacts = gtk_list_store_new (N_COLUMNS,
+ self->priv->completion_contacts = gtk_list_store_new (N_COMPLETION_COLUMNS,
G_TYPE_STRING, /* id */
G_TYPE_UINT, /* handle */
G_TYPE_STRING); /* text */
completion = gtk_entry_completion_new ();
gtk_entry_completion_set_model (completion,
GTK_TREE_MODEL (self->priv->completion_contacts));
G_TYPE_STRING, /* id */
G_TYPE_UINT, /* handle */
G_TYPE_STRING); /* text */
completion = gtk_entry_completion_new ();
gtk_entry_completion_set_model (completion,
GTK_TREE_MODEL (self->priv->completion_contacts));
- gtk_entry_completion_set_text_column (completion, COL_TEXT);
+ gtk_entry_completion_set_text_column (completion, COL_COMPLETION_TEXT);
gtk_entry_completion_set_match_func (completion,
contact_selector_dialog_match_func,
NULL, NULL);
gtk_entry_completion_set_match_func (completion,
contact_selector_dialog_match_func,
NULL, NULL);