empathy r1633 - trunk/src



Author: xclaesse
Date: Fri Oct 17 12:47:58 2008
New Revision: 1633
URL: http://svn.gnome.org/viewvc/empathy?rev=1633&view=rev

Log:
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>

Modified:
   trunk/src/empathy-import-dialog.c

Modified: trunk/src/empathy-import-dialog.c
==============================================================================
--- trunk/src/empathy-import-dialog.c	(original)
+++ trunk/src/empathy-import-dialog.c	Fri Oct 17 12:47:58 2008
@@ -425,18 +425,15 @@
   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 @@
 
   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 @@
           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 @@
   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));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]