aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-08 18:35:43 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-08 23:17:42 +0800
commit96fad6a1159582a3e8792dd3308ce1fbeb178234 (patch)
tree8890b1c4f420b2053af80d586b0a112f772c1097 /libempathy-gtk
parente98ae9bde97e290c0f54593af1cb30905bb9055e (diff)
downloadgsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar.gz
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar.bz2
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar.lz
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar.xz
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.tar.zst
gsoc2013-empathy-96fad6a1159582a3e8792dd3308ce1fbeb178234.zip
Initial port of Account and AccountManager to MC5
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c13
-rw-r--r--libempathy-gtk/empathy-account-widget.c9
2 files changed, 7 insertions, 15 deletions
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index 7e0fb89ed..b2383a02a 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -321,11 +321,11 @@ fill_networks_model (EmpathyAccountWidgetIrc *settings,
static void
account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
{
- gchar *nick = NULL;
- gchar *fullname = NULL;
- gchar *server = NULL;
+ const gchar *nick = NULL;
+ const gchar *fullname = NULL;
+ const gchar *server = NULL;
gint port = 6667;
- gchar *charset;
+ const gchar *charset;
gboolean ssl = FALSE;
EmpathyIrcNetwork *network = NULL;
@@ -402,11 +402,6 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
fill_networks_model (settings, network);
-
- g_free (nick);
- g_free (fullname);
- g_free (server);
- g_free (charset);
}
/**
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 8b71e3fff..783a48a0a 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -52,13 +52,12 @@ account_widget_entry_focus_cb (GtkWidget *widget,
param_name = g_object_get_data (G_OBJECT (widget), "param_name");
if (EMP_STR_EMPTY (str)) {
- gchar *value = NULL;
+ const gchar *value = NULL;
empathy_account_unset_param (account, param_name);
value = empathy_account_get_param_string (account, param_name);
DEBUG ("Unset %s and restore to %s", param_name, value);
gtk_entry_set_text (GTK_ENTRY (widget), value ? value : "");
- g_free (value);
} else {
DEBUG ("Setting %s to %s", param_name,
strstr (param_name, "password") ? "***" : str);
@@ -185,11 +184,10 @@ account_widget_setup_widget (GtkWidget *widget,
account);
}
else if (GTK_IS_ENTRY (widget)) {
- gchar *str = NULL;
+ const gchar *str = NULL;
str = empathy_account_get_param_string (account, param_name);
gtk_entry_set_text (GTK_ENTRY (widget), str ? str : "");
- g_free (str);
if (strstr (param_name, "password")) {
gtk_entry_set_visibility (GTK_ENTRY (widget), FALSE);
@@ -406,14 +404,13 @@ empathy_account_widget_add_forget_button (EmpathyAccount *account,
{
GtkWidget *button_forget;
GtkWidget *entry_password;
- gchar *password = NULL;
+ const gchar *password = NULL;
button_forget = GTK_WIDGET (gtk_builder_get_object (gui, button));
entry_password = GTK_WIDGET (gtk_builder_get_object (gui, entry));
password = empathy_account_get_param_string (account, "password");
gtk_widget_set_sensitive (button_forget, !EMP_STR_EMPTY (password));
- g_free (password);
g_signal_connect (button_forget, "clicked",
G_CALLBACK (account_widget_forget_clicked_cb),