ekiga r6394 - trunk/lib/engine/presence/local-roster
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6394 - trunk/lib/engine/presence/local-roster
- Date: Sun, 22 Jun 2008 08:17:11 +0000 (UTC)
Author: jpuydt
Date: Sun Jun 22 08:17:11 2008
New Revision: 6394
URL: http://svn.gnome.org/viewvc/ekiga?rev=6394&view=rev
Log:
Allow editing the uri of local roster elements
Modified:
trunk/lib/engine/presence/local-roster/local-presentity.cpp
Modified: trunk/lib/engine/presence/local-roster/local-presentity.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-presentity.cpp (original)
+++ trunk/lib/engine/presence/local-roster/local-presentity.cpp Sun Jun 22 08:17:11 2008
@@ -218,6 +218,7 @@
request.instructions (_("Please fill in this form to change an existing "
"element of ekiga's internal roster"));
request.text ("name", _("Name:"), name);
+ request.text ("uri", _("Address:"), uri);
request.editable_set ("groups", _("Choose groups:"),
groups, all_groups);
@@ -243,10 +244,17 @@
/* we first fetch all data before making any change, so if there's
* a problem, we don't do anything */
const std::string new_name = result.text ("name");
+ const std::string new_uri = result.text ("uri");
const std::set<std::string> new_groups = result.editable_set ("groups");
std::map<std::string, xmlNodePtr> future_group_nodes;
name = new_name;
+ if (uri != new_uri) {
+
+ presence_core->unfetch_presence (uri);
+ uri = new_uri;
+ presence_core->fetch_presence (uri);
+ }
xmlNodeSetContent (name_node,
xmlEncodeSpecialChars(name_node->doc,
BAD_CAST name.c_str ()));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]