From a7a82a0fb60da5d6417caa8c4e01b1c8c2d2853e Mon Sep 17 00:00:00 2001 From: daleharvey Date: Mon, 8 May 2006 17:58:44 +0000 Subject: Persist User / Server / ChatServer name across succesful sessions (Given By Botty) (bzr r773) --- src/ui/dialog/whiteboard-connect.cpp | 5 ++++- src/ui/dialog/whiteboard-sharewithchat.cpp | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/whiteboard-connect.cpp b/src/ui/dialog/whiteboard-connect.cpp index 50f44e5f7..cb873b904 100644 --- a/src/ui/dialog/whiteboard-connect.cpp +++ b/src/ui/dialog/whiteboard-connect.cpp @@ -81,7 +81,10 @@ WhiteboardConnectDialogImpl::_construct() this->_labels[2].set_mnemonic_widget(this->_password); this->_labels[3].set_mnemonic_widget(this->_port); - this->_port.set_text("5222"); + this->_server.set_text(prefs_get_string_attribute("whiteboard.server", "name")); + this->_port.set_text(prefs_get_string_attribute("whiteboard.server", "port")); + this->_username.set_text(prefs_get_string_attribute("whiteboard.server", "username")); + this->_usessl.set_active((prefs_get_int_attribute("whiteboard.server", "ssl", 0) == 1) ? true : false); this->_layout.attach(this->_labels[0], 0, 1, 0, 1); this->_layout.attach(this->_labels[3], 2, 3, 0, 1); diff --git a/src/ui/dialog/whiteboard-sharewithchat.cpp b/src/ui/dialog/whiteboard-sharewithchat.cpp index 4c86b0dfa..eed9fa168 100644 --- a/src/ui/dialog/whiteboard-sharewithchat.cpp +++ b/src/ui/dialog/whiteboard-sharewithchat.cpp @@ -20,6 +20,8 @@ #include "inkscape.h" #include "desktop.h" +#include "prefs-utils.h" + #include "jabber_whiteboard/typedefs.h" #include "jabber_whiteboard/session-manager.h" #include "jabber_whiteboard/buddy-list-manager.h" @@ -80,6 +82,11 @@ WhiteboardShareWithChatroomDialogImpl::_construct() this->_labels[2].set_mnemonic_widget(this->_roompass); this->_labels[3].set_mnemonic_widget(this->_handle); + + this->_roomname.set_text(prefs_get_string_attribute("whiteboard.room", "name")); + this->_confserver.set_text(prefs_get_string_attribute("whiteboard.room", "server")); + this->_handle.set_text(prefs_get_string_attribute("whiteboard.server", "username")); + // Pack table this->_layout.attach(this->_labels[0], 0, 1, 0, 1); this->_layout.attach(this->_labels[1], 0, 1, 1, 2); -- cgit v1.2.3