[smuxi/experiments/any_server_support: 34/34] Frontend-GNOME: any server support
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/experiments/any_server_support: 34/34] Frontend-GNOME: any server support
- Date: Sun, 9 Feb 2014 14:27:24 +0000 (UTC)
commit 7a3879990157936d7415c6e261996f7672ef7c7f
Author: Mirco Bauer <meebey meebey net>
Date: Sun Feb 9 15:21:27 2014 +0100
Frontend-GNOME: any server support
Servers were always reconstructed in the UI, thus settings that are read from
the config backend but not exposed in the UI were lost. Instead the ServerModel
object is now reused, filled with the known UI values and passed as is to the
engine.
src/Frontend-GNOME/Views/ServerWidget.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/ServerWidget.cs b/src/Frontend-GNOME/Views/ServerWidget.cs
index 37e78ca..5961928 100644
--- a/src/Frontend-GNOME/Views/ServerWidget.cs
+++ b/src/Frontend-GNOME/Views/ServerWidget.cs
@@ -31,6 +31,7 @@ namespace Smuxi.Frontend.Gnome
Gtk.ListStore f_NetworkListStore;
string ServerID { get; set; }
+ ServerModel Server { get; set; }
public Gtk.Entry HostnameEntry {
get {
@@ -128,6 +129,8 @@ namespace Smuxi.Frontend.Gnome
{
Trace.Call(server);
+ Server = server;
+
// protocol is part of the PKEY, not allowed to change
f_ProtocolComboBox.Sensitive = false;
@@ -161,7 +164,10 @@ namespace Smuxi.Frontend.Gnome
public ServerModel GetServer()
{
- ServerModel server = new ServerModel();
+ var server = Server;
+ if (server == null) {
+ server = new ServerModel();
+ }
server.Protocol = f_ProtocolComboBox.ActiveText;
server.ServerID = ServerID;
server.Hostname = f_HostnameEntry.Text.Trim();
@@ -180,6 +186,8 @@ namespace Smuxi.Frontend.Gnome
if (f_OnConnectCommandsTextView.Sensitive) {
server.OnConnectCommands =
f_OnConnectCommandsTextView.Buffer.Text.Split('\n');
+ } else {
+ server.OnConnectCommands = new List<string>();
}
return server;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]