[ekiga] Update presentity name in roster if needed
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Update presentity name in roster if needed
- Date: Thu, 29 Jan 2015 17:16:05 +0000 (UTC)
commit 6f36bc97e458269599f200d7788b4cfc5ea6a072
Author: Eugen Dedu <eugen dedu univ-fcomte fr>
Date: Thu Jan 29 18:13:48 2015 +0100
Update presentity name in roster if needed
Fixes following bug: right-click on a presentity in roster, change the
name, press Done: the name in roster was not changed.
lib/engine/gui/gtk-frontend/roster-view-gtk.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index 3390d0d..659015a 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -1176,6 +1176,17 @@ on_presentity_added (RosterViewGtk* self,
if (gtk_tree_selection_iter_is_selected (selection, &filtered_iter))
should_emit = TRUE;
+ // update presentity name if needed
+ gchar *old_name;
+ gtk_tree_model_get (GTK_TREE_MODEL (self->priv->store), &iter,
+ COLUMN_NAME, &old_name, -1);
+ if (old_name) {
+ if (presentity->get_name () != old_name)
+ gtk_tree_store_set (self->priv->store, &iter,
+ COLUMN_NAME, presentity->get_name ().c_str (), -1);
+ g_free (old_name);
+ }
+
// Find out what our presence was
gtk_tree_model_get (GTK_TREE_MODEL (self->priv->store), &iter,
COLUMN_TIMEOUT, &timeout,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]