Index: libempathy-gtk/empathy-contact-list-view.c
===================================================================
--- libempathy-gtk/empathy-contact-list-view.c	(revision 535)
+++ libempathy-gtk/empathy-contact-list-view.c	(working copy)
@@ -185,6 +185,16 @@
 								EmpathyContactListView      *view);
 static void        contact_list_view_voip_activated            (EmpathyContactListView      *view,
 								EmpathyContact              *contact);
+static void        contact_list_edited                         (GtkCellRendererText 	   *cellrenderertext, 
+								gchar 			   *path, 
+								gchar 			   *new_text,
+								EmpathyContactListView	   *view);
+static void        contact_list_renderer_editing_started_cb    (GtkCellRenderer 	   *renderer,
+								GtkCellEditable 	   *editable,
+								gchar 			   *path_str,
+								EmpathyContactListView     *view);
+static void 	   contact_list_renderer_editing_cancelled_cb  (GtkCellRenderer 	   *renderer, 
+								EmpathyContactListView     *view);
 
 enum {
 	PROP_0,
@@ -337,6 +347,65 @@
 }
 
 static void
+contact_list_edited (GtkCellRendererText    *cellrenderertext,
+                     gchar                  *path,
+                     gchar                  *new_text,
+                     EmpathyContactListView *view)
+{
+	EmpathyContactList 	   *list;
+	EmpathyContactListViewPriv *priv;
+
+	g_object_set (G_OBJECT(view->text_rend), "editable", FALSE, NULL);
+
+	gchar *old_text = empathy_contact_list_view_get_selected_group (view);
+
+	g_return_if_fail (strcmp (old_text, new_text)!=0);
+	g_return_if_fail (strlen (new_text)!=0);
+
+	priv = GET_PRIV (view);
+	list = empathy_contact_list_store_get_list_iface (priv->store);
+	empathy_contact_list_rename_group (list, old_text, new_text);
+
+	
+}
+
+static void
+contact_list_renderer_editing_cancelled_cb (GtkCellRenderer        *renderer,
+                                            EmpathyContactListView *view)
+{
+	g_object_set (view->text_rend, "editable", FALSE, NULL);
+}
+
+static void
+contact_list_renderer_editing_started_cb (GtkCellRenderer        *renderer,
+                                          GtkCellEditable        *editable,
+                                          gchar                  *path_str,
+                                          EmpathyContactListView *view)
+{
+	GtkTreeIter       iter;
+	GtkTreeModel     *model;
+	char             *name;
+	GtkTreeSelection *selection;
+
+	g_return_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view));
+
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
+		return ;
+	}
+
+	gtk_tree_model_get (model, &iter, 
+			    EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name,
+			    -1);
+
+	if (GTK_IS_ENTRY (editable)) {
+		GtkEntry *entry = GTK_ENTRY (editable);
+		gtk_entry_set_text(entry, name);
+	}
+
+}
+
+static void
 empathy_contact_list_view_init (EmpathyContactListView *view)
 {
 	EmpathyContactListViewPriv *priv;
@@ -638,6 +707,17 @@
 	gtk_tree_view_column_add_attribute (col, cell,
 					    "is_group", EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP);
 
+	g_signal_connect (G_OBJECT(cell), "editing-started", 
+			  G_CALLBACK (contact_list_renderer_editing_started_cb),
+			  view);
+	g_signal_connect (G_OBJECT(cell), "editing-canceled",
+			  G_CALLBACK (contact_list_renderer_editing_cancelled_cb),
+			  view);
+	g_signal_connect (G_OBJECT(cell), "edited", 
+			  G_CALLBACK (contact_list_edited),
+			  view);
+	view->text_rend = cell;
+	
 #ifdef HAVE_VOIP
 	/* Voip Capability Icon */
 	cell = empathy_cell_renderer_activatable_new ();
@@ -1426,6 +1506,23 @@
 					parent);
 	}
 	else if (group && strcmp (name, "Rename") == 0) {
+
+		GtkTreePath      *path;
+		GtkTreeIter       iter;
+		GtkTreeSelection *selection;
+		GtkTreeModel     *model;
+		
+		selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (view));
+		gtk_tree_selection_get_selected (selection, &model, &iter);
+		path = gtk_tree_model_get_path ( model , &iter);
+
+		g_object_set(G_OBJECT(view->text_rend), "editable", TRUE, NULL);
+		
+		gtk_tree_view_set_enable_search (GTK_TREE_VIEW (view), FALSE);
+		gtk_widget_grab_focus (GTK_WIDGET (view));
+		gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, 
+					  gtk_tree_view_get_column (GTK_TREE_VIEW (view), 0),
+				          TRUE);
 	}
 	else if (group && strcmp (name, "Remove") == 0) {
 		EmpathyContactList *list;
Index: libempathy-gtk/empathy-contact-list-view.h
===================================================================
--- libempathy-gtk/empathy-contact-list-view.h	(revision 535)
+++ libempathy-gtk/empathy-contact-list-view.h	(working copy)
@@ -47,6 +47,7 @@
 
 struct _EmpathyContactListView {
 	GtkTreeView            parent;
+	GtkCellRenderer       *text_rend;
 };
 
 struct _EmpathyContactListViewClass {
