aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-20 17:39:24 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-20 17:39:52 +0800
commit4551d97be43ff1bee62c4a8ff68887ce8c083e26 (patch)
treeb20eb78eaed84e70548ce9e0fdd9f931c0346410 /libempathy-gtk
parentb5063fd8122ca1f5fcfbd93b7d495554d900f7f5 (diff)
downloadgsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar.gz
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar.bz2
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar.lz
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar.xz
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.tar.zst
gsoc2013-empathy-4551d97be43ff1bee62c4a8ff68887ce8c083e26.zip
strip the new group name
https://bugzilla.gnome.org/show_bug.cgi?id=501065
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-view.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 6ca8d5c00..c04812415 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1821,16 +1821,19 @@ static gchar * empathy_individual_view_dup_selected_group (
static void
text_edited_cb (GtkCellRendererText *cellrenderertext,
gchar *path,
- gchar *new_name,
+ gchar *name,
EmpathyIndividualView *self)
{
EmpathyIndividualViewPriv *priv = GET_PRIV (self);
- gchar *old_name;
+ gchar *old_name, *new_name;
g_object_set (priv->text_renderer, "editable", FALSE, NULL);
+ new_name = g_strdup (name);
+ g_strstrip (new_name);
+
if (tp_str_empty (new_name))
- return;
+ goto out;
old_name = empathy_individual_view_dup_selected_group (self, NULL);
g_return_if_fail (old_name != NULL);
@@ -1849,6 +1852,8 @@ text_edited_cb (GtkCellRendererText *cellrenderertext,
}
g_free (old_name);
+out:
+ g_free (new_name);
}
static void