empathy r2245 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2245 - trunk/src
- Date: Fri, 23 Jan 2009 10:28:58 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 23 10:28:58 2009
New Revision: 2245
URL: http://svn.gnome.org/viewvc/empathy?rev=2245&view=rev
Log:
Add a source field to specify the name of the account source. (Stephane Wirtel)
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/src/empathy-import-dialog.c
trunk/src/empathy-import-dialog.h
trunk/src/empathy-import-pidgin.c
Modified: trunk/src/empathy-import-dialog.c
==============================================================================
--- trunk/src/empathy-import-dialog.c (original)
+++ trunk/src/empathy-import-dialog.c Fri Jan 23 10:28:58 2009
@@ -60,13 +60,16 @@
};
EmpathyImportAccountData *
-empathy_import_account_data_new (void)
+empathy_import_account_data_new (const gchar *source)
{
EmpathyImportAccountData *data;
+ g_return_val_if_fail (!G_STR_EMPTY (source), NULL);
+
data = g_slice_new0 (EmpathyImportAccountData);
data->settings = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
(GDestroyNotify) tp_g_value_slice_free);
+ data->source = g_strdup (source);
return data;
}
@@ -80,6 +83,8 @@
g_object_unref (data->profile);
if (data->settings != NULL)
g_hash_table_destroy (data->settings);
+ if (data->source != NULL)
+ g_free (data->source);
g_slice_free (EmpathyImportAccountData, data);
}
@@ -197,7 +202,7 @@
COL_IMPORT, import,
COL_PROTOCOL, mc_profile_get_display_name (data->profile),
COL_NAME, g_value_get_string (value),
- COL_SOURCE, "Pidgin",
+ COL_SOURCE, data->source,
COL_ACCOUNT_DATA, data,
-1);
}
Modified: trunk/src/empathy-import-dialog.h
==============================================================================
--- trunk/src/empathy-import-dialog.h (original)
+++ trunk/src/empathy-import-dialog.h Fri Jan 23 10:28:58 2009
@@ -32,9 +32,11 @@
GHashTable *settings;
/* The profile to use for this account */
McProfile *profile;
+ /* The name of the account import source */
+ gchar *source;
} EmpathyImportAccountData;
-EmpathyImportAccountData *empathy_import_account_data_new (void);
+EmpathyImportAccountData *empathy_import_account_data_new (const gchar *source);
void empathy_import_account_data_free (EmpathyImportAccountData *data);
void empathy_import_dialog_show (GtkWindow *parent, gboolean warning);
Modified: trunk/src/empathy-import-pidgin.c
==============================================================================
--- trunk/src/empathy-import-pidgin.c (original)
+++ trunk/src/empathy-import-pidgin.c Fri Jan 23 10:28:58 2009
@@ -188,7 +188,7 @@
continue;
/* Create account data struct */
- data = empathy_import_account_data_new ();
+ data = empathy_import_account_data_new ("Pidgin");
/* Parse account's child nodes to fill the account data struct */
for (child = node->children; child; child = child->next)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]