aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget-irc.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-07 15:59:52 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-07 18:04:23 +0800
commit9d8d7a2e4f9cd772fe69dae15c4c21728e974df3 (patch)
tree17a2409f7b366531c7e54164a5ab4df795190804 /libempathy-gtk/empathy-account-widget-irc.c
parentd51deb6864802a780f7d013dda5bb3c715768bfc (diff)
downloadgsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar.gz
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar.bz2
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar.lz
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar.xz
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.tar.zst
gsoc2013-empathy-9d8d7a2e4f9cd772fe69dae15c4c21728e974df3.zip
remove empathy_account_settings_set_* functions
They don't buy us much so let's just pass the GVariant directly. Fix some string leaks in empathy-account-widget-irc.c as well. https://bugzilla.gnome.org/show_bug.cgi?id=677545
Diffstat (limited to 'libempathy-gtk/empathy-account-widget-irc.c')
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index a4343e161..b4d5673a8 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -67,22 +67,23 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
fullname = empathy_account_settings_get_string (ac_settings,
"fullname");
- if (!nick)
+ if (nick == NULL)
{
- nick = g_strdup (g_get_user_name ());
- empathy_account_settings_set_string (ac_settings,
- "account", nick);
+ nick = g_get_user_name ();
+
+ empathy_account_settings_set (ac_settings,
+ "account", g_variant_new_string (nick));
}
- if (!fullname)
+ if (fullname == NULL)
{
- fullname = g_strdup (g_get_real_name ());
- if (!fullname)
- {
- fullname = g_strdup (nick);
- }
- empathy_account_settings_set_string (ac_settings,
- "fullname", fullname);
+ fullname = g_get_real_name ();
+
+ if (fullname == NULL)
+ fullname = nick;
+
+ empathy_account_settings_set (ac_settings,
+ "fullname", g_variant_new_string (fullname));
}
}
@@ -114,8 +115,8 @@ set_password_prompt_if_needed (EmpathyAccountSettings *ac_settings,
"password-prompt"))
return FALSE;
- empathy_account_settings_set_boolean (ac_settings, "password-prompt",
- prompt);
+ empathy_account_settings_set (ac_settings, "password-prompt",
+ g_variant_new_boolean (prompt));
return TRUE;
}