aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-10-17 20:47:58 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:47:58 +0800
commit267b0d11945a8ee6bbde005e48d11533b24ea1cf (patch)
treec729d756620f499ea6f49892524c3078bd0eeb3f /src
parentc4b5e9a954982bcfe89f44762987485791b9a6e2 (diff)
downloadgsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar.gz
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar.bz2
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar.lz
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar.xz
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.tar.zst
gsoc2013-empathy-267b0d11945a8ee6bbde005e48d11533b24ea1cf.zip
Do not store the account data in a G_TYPE_POINTER GValue but straight in the list store as a gpointer. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1633
Diffstat (limited to 'src')
-rw-r--r--src/empathy-import-dialog.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/empathy-import-dialog.c b/src/empathy-import-dialog.c
index 8567706ea..e31a8c4eb 100644
--- a/src/empathy-import-dialog.c
+++ b/src/empathy-import-dialog.c
@@ -425,18 +425,15 @@ import_dialog_tree_model_foreach (GtkTreeModel *model,
EmpathyImportDialog *dialog = (EmpathyImportDialog *) user_data;
gboolean to_import;
AccountData *data;
- GValue *value;
gtk_tree_model_get (model, iter,
COL_IMPORT, &to_import,
- COL_ACCOUNT_DATA, &value,
+ COL_ACCOUNT_DATA, &data,
-1);
if (!to_import)
return FALSE;
- data = g_value_get_pointer (value);
-
if (!import_dialog_add_account (data))
dialog->not_imported = TRUE;
@@ -524,15 +521,12 @@ import_dialog_add_accounts_to_model (EmpathyImportDialog *dialog)
for (account = dialog->accounts; account; account = account->next)
{
- GValue *value, *account_data;
+ GValue *value;
AccountData *data = (AccountData *) account->data;
gboolean import;
GList *accounts;
McProfile *profile;
- account_data = tp_g_value_slice_new (G_TYPE_POINTER);
- g_value_set_pointer (account_data, data);
-
value = g_hash_table_lookup (data->settings, "account");
/* Get the profile of the account we're adding to get all current
@@ -557,7 +551,7 @@ import_dialog_add_accounts_to_model (EmpathyImportDialog *dialog)
COL_PROTOCOL, data->protocol,
COL_NAME, g_value_get_string (value),
COL_SOURCE, "Pidgin",
- COL_ACCOUNT_DATA, account_data,
+ COL_ACCOUNT_DATA, data,
-1);
}
}
@@ -592,7 +586,7 @@ import_dialog_set_up_account_list (EmpathyImportDialog *dialog)
GtkCellRenderer *cell;
store = gtk_list_store_new (COL_COUNT, G_TYPE_BOOLEAN, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VALUE);
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->treeview),
GTK_TREE_MODEL (store));