[vinagre] Fix username saving in bookmarks.
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Fix username saving in bookmarks.
- Date: Thu, 29 Apr 2010 12:47:38 +0000 (UTC)
commit 251c1015e8a07e4abc2a8dc798629d4870127f79
Author: Jonh Wendell <jwendell gnome org>
Date: Thu Apr 29 09:45:19 2010 -0300
Fix username saving in bookmarks.
Closes Ubuntu #545538.
vinagre/vinagre-connection.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 0681515..7b8e149 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -186,6 +186,7 @@ default_fill_writer (VinagreConnection *conn, xmlTextWriter *writer)
xmlTextWriterWriteElement (writer, "protocol", conn->priv->protocol);
xmlTextWriterWriteElement (writer, "name", conn->priv->name);
xmlTextWriterWriteElement (writer, "host", conn->priv->host);
+ xmlTextWriterWriteElement (writer, "username", conn->priv->username ? conn->priv->username : "");
xmlTextWriterWriteFormatElement (writer, "port", "%d", conn->priv->port);
xmlTextWriterWriteFormatElement (writer, "fullscreen", "%d", conn->priv->fullscreen);
}
@@ -204,6 +205,8 @@ default_parse_item (VinagreConnection *conn, xmlNode *root)
vinagre_connection_set_host (conn, s_value);
else if (!xmlStrcmp(curr->name, (const xmlChar *)"name"))
vinagre_connection_set_name (conn, s_value);
+ else if (!xmlStrcmp(curr->name, (const xmlChar *)"username"))
+ vinagre_connection_set_username (conn, s_value);
else if (!xmlStrcmp(curr->name, (const xmlChar *)"port"))
vinagre_connection_set_port (conn, atoi (s_value));
else if (!xmlStrcmp(curr->name, (const xmlChar *)"fullscreen"))
@@ -401,7 +404,7 @@ vinagre_connection_get_port (VinagreConnection *conn)
void
vinagre_connection_set_username (VinagreConnection *conn,
- const gchar *username)
+ const gchar *username)
{
g_return_if_fail (VINAGRE_IS_CONNECTION (conn));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]