gnome-mud r672 - in trunk: . src ui



Author: lharris
Date: Thu Jun 26 05:05:06 2008
New Revision: 672
URL: http://svn.gnome.org/viewvc/gnome-mud?rev=672&view=rev

Log:
Added CHARSET option support, Proxy support, encoding support, ui cleanup.


Modified:
   trunk/ChangeLog
   trunk/src/gconf-helper.c
   trunk/src/mud-connection-view.c
   trunk/src/mud-connection-view.h
   trunk/src/mud-preferences-window.c
   trunk/src/mud-profile.c
   trunk/src/mud-profile.h
   trunk/src/mud-telnet-handlers.c
   trunk/src/mud-telnet-handlers.h
   trunk/src/mud-telnet.c
   trunk/src/mud-telnet.h
   trunk/src/mud-window.c
   trunk/src/mud-window.h
   trunk/ui/connect.glade
   trunk/ui/directions.glade
   trunk/ui/main.glade
   trunk/ui/muds.glade
   trunk/ui/prefs.glade

Modified: trunk/src/gconf-helper.c
==============================================================================
--- trunk/src/gconf-helper.c	(original)
+++ trunk/src/gconf-helper.c	Thu Jun 26 05:05:06 2008
@@ -121,7 +121,12 @@
 	GCONF_GET_BOOLEAN(scroll_on_output,	functionality,	ScrollOnOutput);
 	GCONF_GET_INT(history_count,		functionality,	History);
 	GCONF_GET_INT(flush_interval,		functionality,	FlushInterval);
-		
+	GCONF_GET_STRING(encoding,          functionality,  Encoding);
+	GCONF_GET_STRING(proxy_version,     functionality,  ProxyVersion);
+	GCONF_GET_BOOLEAN(use_proxy,        functionality,  UseProxy);
+	GCONF_GET_BOOLEAN(remote_encoding,  functionality,  UseRemoteEncoding);
+	GCONF_GET_STRING(proxy_hostname,    functionality,  ProxyHostname);
+	
 	/* palette */
 	g_snprintf(keyname, 2048, "/apps/gnome-mud/%sui/palette", extra_path);
 	p = gconf_client_get_string(gconf_client, keyname, NULL);

Modified: trunk/src/mud-connection-view.c
==============================================================================
--- trunk/src/mud-connection-view.c	(original)
+++ trunk/src/mud-connection-view.c	Thu Jun 26 05:05:06 2008
@@ -26,6 +26,7 @@
 #include <gtk/gtkmenu.h>
 #include <glib/gqueue.h>
 #include <vte/vte.h>
+#define GNET_EXPERIMENTAL
 #include <gnet.h>
 #include <string.h>
 
@@ -197,6 +198,13 @@
 }
 
 static void
+mud_connection_view_close_current_cb(GtkWidget *menu_item, MudConnectionView *view)
+{
+    mud_window_close_current_window(view->priv->window);
+}
+
+
+static void
 mud_connection_view_str_replace (gchar *buf, const gchar *s, const gchar *repl)
 {
 	gchar out_buf[4608];
@@ -237,7 +245,35 @@
 void
 mud_connection_view_add_text(MudConnectionView *view, gchar *message, enum MudConnectionColorType type)
 {
-    vte_terminal_set_encoding(VTE_TERMINAL(view->priv->terminal), "ISO-8859-1");
+    gchar *encoding;
+    gchar *profile_name;
+	GConfClient *client;
+	gboolean remote;
+	
+    gchar key[2048];
+	gchar extra_path[512] = "";
+    
+    client = gconf_client_get_default();
+    
+    g_snprintf(key, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/remote_encoding");
+    remote = gconf_client_get_bool(client, key, NULL);
+    
+    if(view->remote_encode && remote)
+        encoding = view->remote_encoding;
+    else
+    {
+        profile_name = mud_profile_get_name(view->priv->profile);
+	
+	    if (strcmp(profile_name, "Default"))
+	    {
+	    	g_snprintf(extra_path, 512, "profiles/%s/", profile_name);
+	    }
+
+	    g_snprintf(key, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/encoding");
+	    encoding = gconf_client_get_string(client, key, NULL);
+	}
+	
+    vte_terminal_set_encoding(VTE_TERMINAL(view->priv->terminal), encoding);
     
 	switch (type)
 	{
@@ -258,7 +294,8 @@
 			break;
 	}
 
-	mud_connection_view_feed_text(view, message);
+    if(view->local_echo)
+	    mud_connection_view_feed_text(view, message);
 	mud_connection_view_feed_text(view, "\e[0m");
 }
 
@@ -529,7 +566,7 @@
 
 	append_menuitem(view->priv->popup_menu,
 					_("Close"),
-					NULL,
+					G_CALLBACK(mud_connection_view_close_current_cb),
 					view);
 
 	menu_item = gtk_separator_menu_item_new();
@@ -582,11 +619,6 @@
 							   (GDestroyNotify) g_object_unref);
 		profile = profile->next;
 	}
-	
-	append_menuitem(view->priv->popup_menu,
-					_("Edit Current Profile..."),
-					NULL,
-					view);
 
 	menu_item = gtk_separator_menu_item_new();
 	gtk_menu_shell_append(GTK_MENU_SHELL(view->priv->popup_menu), menu_item);
@@ -622,6 +654,15 @@
 MudConnectionView*
 mud_connection_view_new (const gchar *profile, const gchar *hostname, const gint port, GtkWidget *window, GtkWidget *tray, gchar *name)
 {
+	gchar *profile_name;
+	GConfClient *client;
+	
+    gchar key[2048];
+	gchar extra_path[512] = "";
+	gboolean use_proxy;
+	gchar *proxy_host;
+	gchar *version;
+	
 	MudConnectionView *view;
    	GdkGeometry hints;
    	gint xpad, ypad;
@@ -679,11 +720,36 @@
 	g_free(buf);
 	buf = NULL;
 	
-	gnet_conn_connect(view->connection);
+	profile_name = mud_profile_get_name(view->priv->profile);
+	
+	if (strcmp(profile_name, "Default"))
+	{
+		g_snprintf(extra_path, 512, "profiles/%s/", profile_name);
+	}
+
+	g_snprintf(key, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/use_proxy");
+	client = gconf_client_get_default();
+	use_proxy = gconf_client_get_bool(client, key, NULL);
+	
+	g_snprintf(key, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/proxy_hostname");
+	proxy_host = gconf_client_get_string(client, key, NULL);
+	
+	g_snprintf(key, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/proxy_version");
+	version = gconf_client_get_string(client, key, NULL);
 	
-	buf = g_strdup_printf("Encoding: %s\n", vte_terminal_get_encoding(VTE_TERMINAL(view->priv->terminal)));
-    mud_connection_view_add_text(view, buf, System);
-    g_free(buf);
+	if(use_proxy)
+	{
+	    if(proxy_host && version)
+	    {   
+            gnet_socks_set_enabled(TRUE);
+            gnet_socks_set_server(gnet_inetaddr_new(proxy_host,GNET_SOCKS_PORT));
+            gnet_socks_set_version((strcmp(version, "4") == 0) ? 4 : 5);
+        }
+	}
+	else
+	    gnet_socks_set_enabled(FALSE);
+	    
+	gnet_conn_connect(view->connection);
     
 	return view;
 }
@@ -763,9 +829,11 @@
 	MudTelnetBuffer buffer;
 	GString *string;
 	gchar *buf;
+	gboolean temp;
     MudConnectionView *view = MUD_CONNECTION_VIEW(pview);
+	
     g_assert(view != NULL);
-    
+	    
     switch(event->type)
     {
         case GNET_CONN_ERROR:
@@ -778,7 +846,7 @@
         break;
         
         case GNET_CONN_CLOSE:
-            mud_connection_view_add_text(view, _("*** Connection unexpectedly closed.\n"), Error);
+            mud_connection_view_add_text(view, _("*** Connection closed.\n"), Error);
         break;
         
         case GNET_CONN_TIMEOUT:
@@ -801,8 +869,12 @@
 	       
 	           buf = string->str;
 	       
+	           temp = view->local_echo;
+	           view->local_echo = FALSE;
 	           gag = mud_parse_base_do_triggers(view->priv->parse, 
 	                    buf);
+	           view->local_echo = temp;
+	                    
 	           mud_window_handle_plugins(view->priv->window, view->priv->id, 
 	                    buf, buffer.len, 1);
 	                
@@ -862,9 +934,6 @@
         mud_telnet_send_naws(view->priv->telnet, 
                 VTE_TERMINAL(view->priv->terminal)->column_count, 
                 VTE_TERMINAL(view->priv->terminal)->row_count);
-                
-        g_message("Sending NAWS %d/%d", (gint)VTE_TERMINAL(view->priv->terminal)->column_count
-        ,(gint)VTE_TERMINAL(view->priv->terminal)->row_count);
     }
 }   
 

Modified: trunk/src/mud-connection-view.h
==============================================================================
--- trunk/src/mud-connection-view.h	(original)
+++ trunk/src/mud-connection-view.h	Thu Jun 26 05:05:06 2008
@@ -29,6 +29,9 @@
 	gint naws_enabled;
 	
 	gint local_echo;
+	
+	gint remote_encode;
+	gchar *remote_encoding;
 };
 
 struct _MudConnectionViewClass

Modified: trunk/src/mud-preferences-window.c
==============================================================================
--- trunk/src/mud-preferences-window.c	(original)
+++ trunk/src/mud-preferences-window.c	Thu Jun 26 05:05:06 2008
@@ -29,6 +29,7 @@
 #include <gtk/gtkcellrenderer.h>
 #include <gtk/gtkcellrenderertext.h>
 #include <gtk/gtkcolorbutton.h>
+#include <gtk/gtkcombobox.h>
 #include <gtk/gtkentry.h>
 #include <gtk/gtkfontbutton.h>
 #include <gtk/gtknotebook.h>
@@ -36,6 +37,8 @@
 #include <gtk/gtktogglebutton.h>
 #include <gtk/gtktreeselection.h>
 #include <gtk/gtktreestore.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtktreemodel.h>
 #include <gtk/gtktreeview.h>
 #include <gtk/gtktreeviewcolumn.h>
 #include <gtk/gtktextbuffer.h>
@@ -70,9 +73,13 @@
 	GtkWidget *cb_scrollback;
 
 	GtkWidget *entry_commdev;
-	GtkWidget *entry_terminal;
 	
-	GtkWidget *sb_history;
+	GtkWidget *encoding_combo;
+	GtkWidget *encoding_check;
+	GtkWidget *proxy_check;
+	GtkWidget *proxy_combo;
+	GtkWidget *proxy_entry;
+	
 	GtkWidget *sb_lines;
 
 	GtkWidget *fp_font;
@@ -134,6 +141,8 @@
 	gulong signal;
 
 	gint notification_count;
+	
+	gchar *current_encoding;
 };
 
 enum
@@ -197,8 +206,6 @@
 static void mud_preferences_window_disablekeys_cb     (GtkWidget *widget, MudPreferencesWindow *window);
 static void mud_preferences_window_scrolloutput_cb    (GtkWidget *widget, MudPreferencesWindow *window);
 static void mud_preferences_window_commdev_cb         (GtkWidget *widget, MudPreferencesWindow *window);
-static void mud_preferences_window_terminal_cb        (GtkWidget *widget, MudPreferencesWindow *window);
-static void mud_preferences_window_history_cb         (GtkWidget *widget, MudPreferencesWindow *window);
 static void mud_preferences_window_scrollback_cb      (GtkWidget *widget, MudPreferencesWindow *window);
 static void mud_preferences_window_font_cb            (GtkWidget *widget, MudPreferencesWindow *window);
 static void mud_preferences_window_foreground_cb      (GtkWidget *widget, MudPreferencesWindow *window);
@@ -207,18 +214,28 @@
 
 static void mud_preferences_window_changed_cb         (MudProfile *profile, MudProfileMask *mask, MudPreferencesWindow *window);
 
+static void mud_preferences_window_encoding_combo_cb(GtkWidget *widget, MudPreferencesWindow *window);
+static void mud_preferences_window_encoding_check_cb(GtkWidget *widget, MudPreferencesWindow *window);
+static void mud_preferences_window_proxy_check_cb(GtkWidget *widget, MudPreferencesWindow *window);
+static void mud_preferences_window_proxy_combo_cb(GtkWidget *widget, MudPreferencesWindow *window);
+static void mud_preferences_window_proxy_entry_cb(GtkWidget *widget, MudPreferencesWindow *window);
+
+
 static void mud_preferences_window_update_echotext    (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_keeptext    (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_disablekeys (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_scrolloutput(MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_commdev     (MudPreferencesWindow *window, MudPrefs *preferences);
-static void mud_preferences_window_update_terminaltype(MudPreferencesWindow *window, MudPrefs *preferences);
-static void mud_preferences_window_update_history     (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_scrollback  (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_font        (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_foreground  (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_background  (MudPreferencesWindow *window, MudPrefs *preferences);
 static void mud_preferences_window_update_colors      (MudPreferencesWindow *window, MudPrefs *preferences);
+static void mud_preferences_window_update_proxy_check(MudPreferencesWindow *window, MudPrefs *preferences);
+static void mud_preferences_window_update_proxy_combo(MudPreferencesWindow *window, MudPrefs *preferences);
+static void mud_preferences_window_update_proxy_entry(MudPreferencesWindow *window, MudPrefs *preferences);
+static void mud_preferences_window_update_encoding_check(MudPreferencesWindow *window, MudPrefs *preferences);
+static void mud_preferences_window_update_encoding_combo(MudPreferencesWindow *window, MudPrefs *preferences);
 
 void mud_preferences_window_populate_trigger_treeview(MudPreferencesWindow *window);
 void mud_preferences_window_populate_alias_treeview(MudPreferencesWindow *window);
@@ -307,10 +324,14 @@
 	preferences->priv->cb_scrollback = glade_xml_get_widget(glade, "cb_scrollback");
 
 	preferences->priv->entry_commdev = glade_xml_get_widget(glade, "entry_commdev");
-	preferences->priv->entry_terminal = glade_xml_get_widget(glade, "entry_terminal");
 	
-	preferences->priv->sb_history = glade_xml_get_widget(glade, "sb_history");
 	preferences->priv->sb_lines = glade_xml_get_widget(glade, "sb_lines");
+	
+	preferences->priv->encoding_combo = glade_xml_get_widget(glade, "encoding_combo");
+	preferences->priv->encoding_check = glade_xml_get_widget(glade, "encoding_check");
+	preferences->priv->proxy_check = glade_xml_get_widget(glade, "proxy_check");
+	preferences->priv->proxy_combo = glade_xml_get_widget(glade, "proxy_combo");
+	preferences->priv->proxy_entry = glade_xml_get_widget(glade, "proxy_entry");
 
 	preferences->priv->fp_font = glade_xml_get_widget(glade, "fp_font");
 
@@ -424,7 +445,7 @@
   	gtk_tree_view_column_add_attribute(preferences->priv->trigger_match_text_col,  preferences->priv->trigger_match_text_renderer, 
 									  "text", TRIGGER_MATCH_TEXT_COLUMN);
 
-	// Setup trigger match treeview
+	// Setup alias match treeview
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(preferences->priv->alias_match_treeview), TRUE);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(preferences->priv->alias_match_treeview), FALSE);
 	preferences->priv->alias_match_store = gtk_tree_store_new(TRIGGER_MATCH_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
@@ -903,12 +924,24 @@
 	g_signal_connect(G_OBJECT(window->priv->entry_commdev), "changed",
 					 G_CALLBACK(mud_preferences_window_commdev_cb),
 					 window);
-	g_signal_connect(G_OBJECT(window->priv->entry_terminal), "changed",
-					 G_CALLBACK(mud_preferences_window_terminal_cb),
+					 
+	g_signal_connect(G_OBJECT(window->priv->encoding_combo), "changed",
+					 G_CALLBACK(mud_preferences_window_encoding_combo_cb),
 					 window);
-	g_signal_connect(G_OBJECT(window->priv->sb_history), "changed",
-					 G_CALLBACK(mud_preferences_window_history_cb),
+	g_signal_connect(G_OBJECT(window->priv->encoding_check), "toggled",
+					 G_CALLBACK(mud_preferences_window_encoding_check_cb),
 					 window);
+	
+	g_signal_connect(G_OBJECT(window->priv->proxy_check), "toggled",
+					 G_CALLBACK(mud_preferences_window_proxy_check_cb),
+					 window);
+	g_signal_connect(G_OBJECT(window->priv->proxy_combo), "changed",
+					 G_CALLBACK(mud_preferences_window_proxy_combo_cb),
+					 window);
+	g_signal_connect(G_OBJECT(window->priv->proxy_entry), "changed",
+					 G_CALLBACK(mud_preferences_window_proxy_entry_cb),
+					 window);
+					 
 	g_signal_connect(G_OBJECT(window->priv->sb_lines), "changed",
 					 G_CALLBACK(mud_preferences_window_scrollback_cb),
 					 window);
@@ -949,13 +982,16 @@
 	mud_preferences_window_update_disablekeys(window, profile->preferences);
 	mud_preferences_window_update_scrolloutput(window, profile->preferences);
 	mud_preferences_window_update_commdev(window, profile->preferences);
-	mud_preferences_window_update_terminaltype(window, profile->preferences);
-	mud_preferences_window_update_history(window, profile->preferences);
 	mud_preferences_window_update_scrollback(window, profile->preferences);
 	mud_preferences_window_update_font(window, profile->preferences);
 	mud_preferences_window_update_foreground(window, profile->preferences);
 	mud_preferences_window_update_background(window, profile->preferences);
 	mud_preferences_window_update_colors(window, profile->preferences);
+	mud_preferences_window_update_proxy_check(window, profile->preferences);
+	mud_preferences_window_update_proxy_combo(window, profile->preferences);
+	mud_preferences_window_update_proxy_entry(window, profile->preferences);
+	mud_preferences_window_update_encoding_check(window, profile->preferences);
+	mud_preferences_window_update_encoding_combo(window, profile->preferences);
 }
 
 static void
@@ -997,6 +1033,7 @@
 static void
 mud_preferences_window_commdev_cb(GtkWidget *widget, MudPreferencesWindow *window)
 {
+    
 	const gchar *s = gtk_entry_get_text(GTK_ENTRY(widget));
 	RETURN_IF_CHANGING_PROFILES(window);
 
@@ -1004,21 +1041,48 @@
 }
 
 static void
-mud_preferences_window_terminal_cb(GtkWidget *widget, MudPreferencesWindow *window)
+mud_preferences_window_encoding_combo_cb(GtkWidget *widget, MudPreferencesWindow *window)
 {
-	const gchar *s = gtk_entry_get_text(GTK_ENTRY(widget));
+	const gchar *s = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
 	RETURN_IF_CHANGING_PROFILES(window);
 
-	mud_profile_set_terminal(window->priv->profile, s);
+	mud_profile_set_encoding_combo(window->priv->profile, s);
 }
 
 static void
-mud_preferences_window_history_cb(GtkWidget *widget, MudPreferencesWindow *window)
+mud_preferences_window_encoding_check_cb(GtkWidget *widget, MudPreferencesWindow *window)
+{
+	gboolean value = GTK_TOGGLE_BUTTON(widget)->active ? TRUE : FALSE;
+	RETURN_IF_CHANGING_PROFILES(window);
+
+	mud_profile_set_encoding_check(window->priv->profile, value);
+}
+
+static void
+mud_preferences_window_proxy_check_cb(GtkWidget *widget, MudPreferencesWindow *window)
+{
+	gboolean value = GTK_TOGGLE_BUTTON(widget)->active ? TRUE : FALSE;
+	RETURN_IF_CHANGING_PROFILES(window);
+
+	mud_profile_set_proxy_check(window->priv->profile, value);
+}
+
+static void
+mud_preferences_window_proxy_combo_cb(GtkWidget *widget, MudPreferencesWindow *window)
 {
-	const gint value = (gint) gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget));
 	RETURN_IF_CHANGING_PROFILES(window);
 
-	mud_profile_set_history(window->priv->profile, value);
+	mud_profile_set_proxy_combo(window->priv->profile, GTK_COMBO_BOX(widget));
+}
+
+static void
+mud_preferences_window_proxy_entry_cb(GtkWidget *widget, MudPreferencesWindow *window)
+{
+	const gchar *s = gtk_entry_get_text(GTK_ENTRY(widget));
+	RETURN_IF_CHANGING_PROFILES(window);
+
+    if(s)
+	    mud_profile_set_proxy_entry(window->priv->profile, s);
 }
 
 static void
@@ -1423,10 +1487,6 @@
 		mud_preferences_window_update_scrolloutput(window, profile->preferences);
 	if (mask->CommDev)
 		mud_preferences_window_update_commdev(window, profile->preferences);
-	if (mask->TerminalType)
-		mud_preferences_window_update_terminaltype(window, profile->preferences);
-	if (mask->History)
-		mud_preferences_window_update_history(window, profile->preferences);
 	if (mask->Scrollback)
 		mud_preferences_window_update_scrollback(window, profile->preferences);
 	if (mask->FontName)
@@ -1437,12 +1497,16 @@
 		mud_preferences_window_update_background(window, profile->preferences);
 	if (mask->Colors)
 		mud_preferences_window_update_colors(window, profile->preferences);
-}
-
-static void
-mud_preferences_window_update_terminaltype(MudPreferencesWindow *window, MudPrefs *preferences)
-{
-	gtk_entry_set_text(GTK_ENTRY(window->priv->entry_terminal), preferences->TerminalType);
+	if (mask->UseProxy)
+	    mud_preferences_window_update_proxy_check(window, profile->preferences);
+	if (mask->UseRemoteEncoding)
+	    mud_preferences_window_update_encoding_check(window, profile->preferences);
+	if (mask->ProxyHostname)
+	    mud_preferences_window_update_proxy_entry(window, profile->preferences);
+	if (mask->ProxyVersion)
+	    mud_preferences_window_update_proxy_combo(window, profile->preferences);
+	if (mask->Encoding)
+	    mud_preferences_window_update_encoding_combo(window, profile->preferences);
 }
 
 static void
@@ -1464,21 +1528,111 @@
 }
 
 static void
-mud_preferences_window_update_keeptext(MudPreferencesWindow *window, MudPrefs *preferences)
+mud_preferences_window_update_proxy_check(MudPreferencesWindow *window, MudPrefs *preferences)
 {
-	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->cb_keep), preferences->KeepText);
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->proxy_check), preferences->UseProxy);
+	
 }
 
 static void
-mud_preferences_window_update_echotext(MudPreferencesWindow *window, MudPrefs *preferences)
+mud_preferences_window_update_proxy_combo(MudPreferencesWindow *window, MudPrefs *preferences)
+{   
+	gchar *profile_name;
+	GConfClient *client;
+	
+    gchar buf[2048];
+	gchar extra_path[512] = "";
+	gchar *version;
+	gint active;
+	gint current;
+
+	profile_name = mud_profile_get_name(window->priv->profile);
+	
+	if (strcmp(profile_name, "Default"))
+	{
+		g_snprintf(extra_path, 512, "profiles/%s/", profile_name);
+	}
+
+	g_snprintf(buf, 2048, "/apps/gnome-mud/%s%s", extra_path, "functionality/proxy_version");
+	client = gconf_client_get_default();
+	version = gconf_client_get_string(client, buf, NULL);
+	
+	if(version)
+	{
+	    current = gtk_combo_box_get_active(GTK_COMBO_BOX(window->priv->proxy_combo));
+	    
+	    if(strcmp(version,"4") == 0)
+	        active = 0;
+	    else
+	        active = 1;
+	   
+	   
+	   if(current != active)
+	    gtk_combo_box_set_active(GTK_COMBO_BOX(window->priv->proxy_combo), active);
+	    
+	   current = gtk_combo_box_get_active(GTK_COMBO_BOX(window->priv->proxy_combo));
+	}
+	
+}
+
+static void
+mud_preferences_window_update_proxy_entry(MudPreferencesWindow *window, MudPrefs *preferences)
 {
-	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->cb_echo), preferences->EchoText);
+	if(preferences->ProxyHostname)
+	    gtk_entry_set_text(GTK_ENTRY(window->priv->proxy_entry), preferences->ProxyHostname);
+	
+}
+
+static void
+mud_preferences_window_update_encoding_combo(MudPreferencesWindow *window, MudPrefs *preferences)
+{
+	GtkTreeModel *encodings = gtk_combo_box_get_model(GTK_COMBO_BOX(window->priv->encoding_combo));
+	GtkTreeIter iter;
+	gboolean valid;
+	gint count = 0;
+	
+	valid = gtk_tree_model_get_iter_first(encodings, &iter);
+	
+	if(!preferences->Encoding)
+	    return;
+	
+	while(valid)
+	{
+	    gchar *encoding;
+	    
+	    gtk_tree_model_get(encodings, &iter, 0, &encoding, -1);
+	    
+	    if(!encoding)
+	        continue;
+	        
+	    if(strcmp(encoding, preferences->Encoding) == 0)
+	        break;
+	    
+	    count++;
+	    
+	    valid = gtk_tree_model_iter_next(encodings, &iter);
+	}
+	
+	gtk_combo_box_set_active(GTK_COMBO_BOX(window->priv->encoding_combo), count);
 }
 
 static void
-mud_preferences_window_update_history(MudPreferencesWindow *window, MudPrefs *preferences)
+mud_preferences_window_update_encoding_check(MudPreferencesWindow *window, MudPrefs *preferences)
 {
-	gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->priv->sb_history), preferences->History);
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->encoding_check), preferences->UseRemoteEncoding);
+	
+}
+
+static void
+mud_preferences_window_update_keeptext(MudPreferencesWindow *window, MudPrefs *preferences)
+{
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->cb_keep), preferences->KeepText);
+}
+
+static void
+mud_preferences_window_update_echotext(MudPreferencesWindow *window, MudPrefs *preferences)
+{
+	gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(window->priv->cb_echo), preferences->EchoText);
 }
 
 static void

Modified: trunk/src/mud-profile.c
==============================================================================
--- trunk/src/mud-profile.c	(original)
+++ trunk/src/mud-profile.c	Thu Jun 26 05:05:06 2008
@@ -26,6 +26,7 @@
 #include <glib-object.h>
 #include <glib/gi18n.h>
 #include <gtk/gtkcolorsel.h>
+#include <gtk/gtkcombobox.h>
 
 #include "gconf-helper.h"
 #include "mud-profile.h"
@@ -404,6 +405,55 @@
 	}
 }
 
+static gboolean
+set_ProxyVersion(MudProfile *profile, const gchar *candidate)
+{
+   
+	if (candidate && strcmp(profile->priv->preferences.ProxyVersion, candidate) == 0)
+		return FALSE;
+	
+	if (candidate != NULL)
+	{
+		g_free(profile->priv->preferences.ProxyVersion);
+		profile->priv->preferences.ProxyVersion = g_strdup(candidate);
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+set_ProxyHostname(MudProfile *profile, const gchar *candidate)
+{
+	if (candidate && strcmp(profile->priv->preferences.ProxyHostname, candidate) == 0)
+		return FALSE;
+	
+	if (candidate != NULL)
+	{
+		g_free(profile->priv->preferences.ProxyHostname);
+		profile->priv->preferences.ProxyHostname = g_strdup(candidate);
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+set_Encoding(MudProfile *profile, const gchar *candidate)
+{
+	if (candidate && strcmp(profile->priv->preferences.Encoding, candidate) == 0)
+		return FALSE;
+	
+	if (candidate != NULL)
+	{
+		g_free(profile->priv->preferences.Encoding);
+		profile->priv->preferences.Encoding = g_strdup(candidate);
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 static const gchar*
 mud_profile_gconf_get_key(MudProfile *profile, const gchar *key)
 {
@@ -494,8 +544,13 @@
 		UPDATE_STRING("foreground_color",	Foreground,		"#FFFFFF");
 		UPDATE_STRING("background_color",	Background,		"#000000");
 		UPDATE_STRING("palette",			Colors,			"#000000:#AA0000:#00AA00:#AA5500:#0000AA:#AA00AA:#00AAAA:#AAAAAA:#555555:#FF5555:#55FF55:#FFFF55:#5555FF:#FF55FF:#55FFFF:#FFFFFF");
+	    UPDATE_STRING("proxy_version", ProxyVersion, "5");
+	    UPDATE_STRING("proxy_hostname", ProxyHostname, "127.0.0.1");
+	    UPDATE_STRING("encoding", Encoding, "ISO-8859-1");
+	    UPDATE_BOOLEAN("use_proxy", UseProxy, FALSE);
+	    UPDATE_BOOLEAN("remote_encoding", UseRemoteEncoding, FALSE);   
 	}
-	
+
 #undef UPDATE_BOOLEAN
 #undef UPDATE_STRING
 #undef UPDATE_INTEGER
@@ -556,6 +611,63 @@
 	gconf_client_set_string(profile->priv->gconf_client, key, value, NULL);
 }
 
+void 
+mud_profile_set_encoding_combo(MudProfile *profile, const gchar *e)
+{
+    GError *error = NULL;
+    const gchar *key = mud_profile_gconf_get_key(profile, "functionality/encoding");
+	RETURN_IF_NOTIFYING(profile);
+
+	gconf_client_set_string(profile->priv->gconf_client, key, e, &error);
+}
+
+void 
+mud_profile_set_encoding_check (MudProfile *profile, const gint value)
+{
+	const gchar *key = mud_profile_gconf_get_key(profile, "functionality/remote_encoding");
+	RETURN_IF_NOTIFYING(profile);
+
+	gconf_client_set_bool(profile->priv->gconf_client, key, value, NULL);
+}
+
+void 
+mud_profile_set_proxy_check (MudProfile *profile, const gint value)
+{
+    const gchar *key = mud_profile_gconf_get_key(profile, "functionality/use_proxy");
+	RETURN_IF_NOTIFYING(profile);
+
+	gconf_client_set_bool(profile->priv->gconf_client, key, value, NULL);
+}
+
+static void 
+mud_profile_set_proxy_combo_full(MudProfile *profile, gchar *version)
+{
+    const gchar *key = mud_profile_gconf_get_key(profile, "functionality/proxy_version");
+	RETURN_IF_NOTIFYING(profile);
+    
+	gconf_client_set_string(profile->priv->gconf_client, key, version, NULL);
+}
+
+void 
+mud_profile_set_proxy_combo(MudProfile *profile, GtkComboBox *combo)
+{
+    gchar *version = gtk_combo_box_get_active_text(combo);
+    
+	mud_profile_set_proxy_combo_full(profile, version);
+}
+
+void 
+mud_profile_set_proxy_entry (MudProfile *profile, const gchar *value)
+{
+    const gchar *key = mud_profile_gconf_get_key(profile, "functionality/proxy_hostname");
+	RETURN_IF_NOTIFYING(profile);
+
+    if(value)
+	    gconf_client_set_string(profile->priv->gconf_client, key, value, NULL);
+	else
+	    gconf_client_set_string(profile->priv->gconf_client, key, "", NULL);
+}
+
 void
 mud_profile_set_font (MudProfile *profile, const gchar *value)
 {
@@ -700,6 +812,11 @@
 					      from->preferences->Colors[i].green,
 					      from->preferences->Colors[i].blue);
 	}
+	mud_profile_set_encoding_combo(to, from->preferences->Encoding);
+	mud_profile_set_encoding_check(to, from->preferences->UseRemoteEncoding);
+	mud_profile_set_proxy_check(to, from->preferences->UseProxy);
+	mud_profile_set_proxy_combo_full(to, from->preferences->ProxyVersion);
+	mud_profile_set_proxy_entry(to, from->preferences->ProxyHostname);
 }
 
 GList *
@@ -708,11 +825,14 @@
 	gint i;
 	gchar **commands = g_strsplit(data, profile->preferences->CommDev, -1);
 
-	commandlist = g_list_append(commandlist, g_strdup(commands[0]));
-
-	for (i = 1; commands[i] != NULL; i++)
-	{
-		commandlist = mud_profile_process_command(profile, commands[i], commandlist);
+    if(commands[0])
+    {
+	    commandlist = g_list_append(commandlist, g_strdup(commands[0]));
+
+	    for (i = 1; commands[i] != NULL; i++)
+	    {
+		    commandlist = mud_profile_process_command(profile, commands[i], commandlist);
+	    }
 	}
 
 	g_strfreev(commands);

Modified: trunk/src/mud-profile.h
==============================================================================
--- trunk/src/mud-profile.h	(original)
+++ trunk/src/mud-profile.h	Thu Jun 26 05:05:06 2008
@@ -40,7 +40,12 @@
 	
 	GSList	  *alias_names;
 	GSList	  *trigger_names;
-
+	
+	gboolean UseRemoteEncoding;
+	gboolean UseProxy;
+	gchar *Encoding;
+	gchar *ProxyVersion;
+	gchar *ProxyHostname;
 	GdkColor   Colors[C_MAX];
 };
 
@@ -68,6 +73,11 @@
 	unsigned int Foreground : 1;
 	unsigned int Background : 1;
 	unsigned int Colors : 1;
+	unsigned int UseRemoteEncoding : 1;
+	unsigned int UseProxy : 1;
+	unsigned int Encoding : 1;
+	unsigned int ProxyVersion : 1;
+	unsigned int ProxyHostname : 1;
 } MudProfileMask;
 
 struct _MudProfileClass
@@ -88,6 +98,7 @@
 void mud_profile_copy_preferences (MudProfile *from, MudProfile *to);
 GList* mud_profile_process_commands (MudProfile *profile, const gchar *data);
 
+#include <gtk/gtkcombobox.h>
 void mud_profile_set_echotext (MudProfile *profile, gboolean value);
 void mud_profile_set_keeptext (MudProfile *profile, gboolean value);
 void mud_profile_set_disablekeys (MudProfile *profile, gboolean value);
@@ -100,6 +111,12 @@
 void mud_profile_set_foreground (MudProfile *profile, guint r, guint g, guint b);
 void mud_profile_set_background (MudProfile *profile, guint r, guint g, guint b);
 void mud_profile_set_colors (MudProfile *profile, gint nr, guint r, guint g, guint b);
+void mud_profile_set_encoding_combo(MudProfile *profile, const gchar *e);
+void mud_profile_set_encoding_check (MudProfile *profile, const gint value);
+void mud_profile_set_proxy_check (MudProfile *profile, const gint value);
+void mud_profile_set_proxy_combo(MudProfile *profile, GtkComboBox *combo);
+void mud_profile_set_proxy_entry (MudProfile *profile, const gchar *value);
+
 gchar *mud_profile_from_number(gint num);
 gint mud_profile_num_from_name(gchar *name);
 gchar *mud_profile_get_name(MudProfile *profile);

Modified: trunk/src/mud-telnet-handlers.c
==============================================================================
--- trunk/src/mud-telnet-handlers.c	(original)
+++ trunk/src/mud-telnet-handlers.c	Thu Jun 26 05:05:06 2008
@@ -27,6 +27,7 @@
 
 #include <glib.h>
 #include <gnet.h>
+#include <string.h>
 
 #include "gnome-mud.h"
 #include "mud-telnet.h"
@@ -38,6 +39,7 @@
 MudHandler_TType_Enable(MudTelnet *telnet, MudTelnetHandler *handler)
 {
     handler->enabled = TRUE;
+    telnet->ttype_iteration = 0;
 }
 
 void 
@@ -51,11 +53,48 @@
                               guint len, MudTelnetHandler *handler)
 {
 	if (len == 1 && buf[0] == TEL_TTYPE_SEND)
-	{
-	    mud_telnet_send_sub_req(telnet, 11, (guchar)TELOPT_TTYPE,
-	                                       (guchar)TEL_TTYPE_IS,
-	                                       'g','n','o','m','e','-','m','u','d');
-	}
+	    switch(telnet->ttype_iteration)
+	    {
+	        case 0:
+	            mud_telnet_send_sub_req(telnet, 11, 
+	                                (guchar)TELOPT_TTYPE,
+                                    (guchar)TEL_TTYPE_IS,
+	                                 'g','n','o','m','e','-','m','u','d');
+	            telnet->ttype_iteration++;
+	        break;
+	        
+	        case 1:
+	            mud_telnet_send_sub_req(telnet, 7, 
+	                                (guchar)TELOPT_TTYPE,
+                                    (guchar)TEL_TTYPE_IS,
+	                                 'x','t','e','r','m');
+	            telnet->ttype_iteration++;
+	        break;
+	        
+	        case 2:
+	            mud_telnet_send_sub_req(telnet, 6, 
+	                                (guchar)TELOPT_TTYPE,
+                                    (guchar)TEL_TTYPE_IS,
+	                                 'a','n','s','i');
+	            telnet->ttype_iteration++;
+	        break;
+	        
+	        case 3:
+	            mud_telnet_send_sub_req(telnet, 9, 
+	                                (guchar)TELOPT_TTYPE,
+                                    (guchar)TEL_TTYPE_IS,
+	                                 'U','N','K','N','O','W','N');
+	            telnet->ttype_iteration++;
+	        break;
+	        
+	        case 4:
+	            mud_telnet_send_sub_req(telnet, 9, 
+	                                (guchar)TELOPT_TTYPE,
+                                    (guchar)TEL_TTYPE_IS,
+	                                 'U','N','K','N','O','W','N');
+	            telnet->ttype_iteration = 0;
+	        break;
+	    }
 }
 
 /* NAWS */
@@ -77,8 +116,6 @@
 {
     handler->enabled = FALSE;
     mud_telnet_set_parent_naws(telnet, FALSE);
-    
-    g_message("Disabled NAWS.");
 }
 
 void 
@@ -93,14 +130,12 @@
 MudHandler_ECHO_Enable(MudTelnet *telnet, MudTelnetHandler *handler)
 {
     mud_telnet_set_local_echo(telnet, FALSE);
-    g_message("Enabled Serverside ECHO");
 }
 
 void 
 MudHandler_ECHO_Disable(MudTelnet *telnet, MudTelnetHandler *handler)
 {
     mud_telnet_set_local_echo(telnet, TRUE);
-    g_message("Disabled Serverside ECHO.");
 }
 
 void 
@@ -115,14 +150,12 @@
 MudHandler_EOR_Enable(MudTelnet *telnet, MudTelnetHandler *handler)
 {
     telnet->eor_enabled = TRUE;
-    g_message("Enabled EOR");
 }
 
 void 
 MudHandler_EOR_Disable(MudTelnet *telnet, MudTelnetHandler *handler)
 {
     telnet->eor_enabled = FALSE;
-    g_message("Disabled EOR");
 }
 
 void 
@@ -131,3 +164,72 @@
 {
     return;   
 }
+
+/* CHARSET */
+void 
+MudHandler_CHARSET_Enable(MudTelnet *telnet, MudTelnetHandler *handler)
+{
+    handler->enabled = TRUE;
+}
+
+void 
+MudHandler_CHARSET_Disable(MudTelnet *telnet, MudTelnetHandler *handler)
+{
+    handler->enabled = FALSE;
+    mud_telnet_set_parent_remote_encode(telnet, FALSE, NULL);
+}
+
+void 
+MudHandler_CHARSET_HandleSubNeg(MudTelnet *telnet, guchar *buf, 
+    guint len, MudTelnetHandler *handler)
+{
+    gint index = 0;
+    guchar sep;
+    guchar tbuf[9];
+    gchar sep_buf[2];
+    GString *encoding;
+    gchar **encodings;
+    
+    switch(buf[index])
+    {
+        case TEL_CHARSET_REQUEST:
+            // Check for [TTABLE] and 
+            // reject if found.
+            memcpy(&buf[1], tbuf, 8);
+            tbuf[8] = '\0';
+            
+            if(strcmp((gchar *)tbuf, "[TTABLE]") == 0)
+            {
+	            mud_telnet_send_sub_req(telnet, 2, 
+	                                (guchar)TELOPT_CHARSET,
+                                    (guchar)TEL_CHARSET_TTABLE_REJECTED);
+                return;
+            }
+            
+            sep = buf[++index];
+            index++;
+            
+            encoding = g_string_new(NULL);
+            
+            while(buf[index] != (guchar)TEL_SE)
+                g_string_append_c(encoding, buf[index++]);
+            
+            sep_buf[0] = (gchar)sep;
+            sep_buf[1] = '\0';
+            encodings = g_strsplit(encoding->str, sep_buf, -1);
+            
+            // We are using VTE's locale fallback function
+            // to handle a charset we do not support so we
+            // just take the first returned and use it.
+            
+            if(g_strv_length(encodings) != 0)
+                mud_telnet_set_parent_remote_encode(telnet, TRUE, encodings[0]);
+                
+            mud_telnet_send_charset_req(telnet, encodings[0]);
+            
+            g_string_free(encoding, TRUE);
+            g_strfreev(encodings);
+	                                    
+        break;
+    }
+}

Modified: trunk/src/mud-telnet-handlers.h
==============================================================================
--- trunk/src/mud-telnet-handlers.h	(original)
+++ trunk/src/mud-telnet-handlers.h	Thu Jun 26 05:05:06 2008
@@ -50,5 +50,11 @@
 void MudHandler_EOR_HandleSubNeg(MudTelnet *telnet, guchar *buf, 
     guint len, MudTelnetHandler *handler);
     
+/* CHARSET */
+void MudHandler_CHARSET_Enable(MudTelnet *telnet, MudTelnetHandler *handler);
+void MudHandler_CHARSET_Disable(MudTelnet *telnet, MudTelnetHandler *handler);
+void MudHandler_CHARSET_HandleSubNeg(MudTelnet *telnet, guchar *buf, 
+    guint len, MudTelnetHandler *handler);
+    
 #endif // MUD_TELNET_HANDLERS_H
 

Modified: trunk/src/mud-telnet.c
==============================================================================
--- trunk/src/mud-telnet.c	(original)
+++ trunk/src/mud-telnet.c	Thu Jun 26 05:05:06 2008
@@ -141,6 +141,7 @@
 	telnet->parent = parent;
 	telnet->conn = connection;
 	telnet->tel_state = TEL_STATE_TEXT;
+	telnet->ttype_iteration = 0;
 	
 	memset(telnet->telopt_states, 0, sizeof(telnet->telopt_states));
 	memset(telnet->handlers, 0, sizeof(telnet->handlers));
@@ -198,6 +199,15 @@
     telnet->handlers[3].enable = MudHandler_EOR_Enable;
     telnet->handlers[3].disable = MudHandler_EOR_Disable;
     telnet->handlers[3].handle_sub_neg = MudHandler_EOR_HandleSubNeg;
+    
+    /* CHARSET */
+    telnet->handlers[4].type = HANDLER_CHARSET;
+    telnet->handlers[4].option_number = (guchar)TELOPT_CHARSET;
+    telnet->handlers[4].enabled = TRUE;
+    telnet->handlers[4].enable = MudHandler_CHARSET_Enable;
+    telnet->handlers[4].disable = MudHandler_CHARSET_Disable;
+    telnet->handlers[4].handle_sub_neg = MudHandler_CHARSET_HandleSubNeg;
+    
 }
 
 gint
@@ -226,6 +236,17 @@
 }
 
 void 
+mud_telnet_set_parent_remote_encode(MudTelnet *telnet, gint enabled, gchar *encoding)
+{
+    telnet->parent->remote_encode = enabled;
+    
+    if(enabled)
+        telnet->parent->remote_encoding = g_strdup(encoding);
+    else if(telnet->parent->remote_encoding)
+        g_free(telnet->parent->remote_encoding);
+}
+
+void 
 mud_telnet_set_local_echo(MudTelnet *telnet, gint enabled)
 {
     telnet->parent->local_echo = enabled;
@@ -243,8 +264,6 @@
     h0 = height & 0xff;
     
     mud_telnet_send_sub_req(telnet, 5, (guchar)TELOPT_NAWS, w1, w0, h1, h0);
-    
-    g_message("Sending NAWS: %d %d %d %d", w1, w0, h1, h0);
 }
 
 MudTelnetBuffer 
@@ -391,11 +410,10 @@
 				else if (buf[i] == (guchar)TEL_SE)
 				{
 				    g_message("STATE_TEL_SE");
-					g_message("Subrequest for option %d succesfully received with length %d", 
-					    telnet->subreq_buffer[0], telnet->subreq_pos-1);
-					g_message("Subreq buffer content: %d %d %d %d", 
-					    telnet->subreq_buffer[0], telnet->subreq_buffer[1], 
-					    telnet->subreq_buffer[2], telnet->subreq_buffer[3]);
+				    telnet->subreq_buffer[telnet->subreq_pos++] = buf[i];
+				    
+					g_message("Subrequest for option %d succesfully received with length %d %s", 
+					    telnet->subreq_buffer[0], telnet->subreq_pos-1, (telnet->subreq_buffer[telnet->subreq_pos-1] == (guchar)TEL_SE) ? "SE" : "");
 					    
 					mud_telnet_on_handle_subnego(telnet);
 					telnet->tel_state = TEL_STATE_TEXT;
@@ -483,6 +501,38 @@
 }
 
 void 
+mud_telnet_send_charset_req(MudTelnet *telnet, gchar *encoding)
+{
+    guchar byte;
+	guint32 i;
+
+    /* Writes IAC SB CHARSET ACCEPTED <charset> IAC SE to server */
+	byte = (guchar)TEL_IAC;
+	
+	gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+	byte = (guchar)TEL_SB;
+	gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+    byte = (guchar)TELOPT_CHARSET;
+    gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+    byte = (guchar)TEL_CHARSET_ACCEPT;
+    gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+    
+	for (i = 0; i < strlen(encoding); ++i)
+	{
+		byte = (guchar)encoding[i];
+		gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+		
+		if (byte == (guchar)TEL_IAC)
+			gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+	}
+
+	byte = (guchar)TEL_IAC;
+	gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+	byte = (guchar)TEL_SE;
+	gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
+}
+
+void 
 mud_telnet_send_sub_req(MudTelnet *telnet, guint32 count, ...)
 {
 	guchar byte;
@@ -569,7 +619,6 @@
 {
     int index;
     
-    g_message("Trying to enable option %d", opt_no);
     if((index = mud_telnet_get_index_by_option(telnet, opt_no)) == -1)
     {
         g_warning("Invalid Telnet Option passed: %d", opt_no);
@@ -658,12 +707,12 @@
 			if (mud_telnet_get_telopt_queue(opt, bitshift) == TELOPT_STATE_QUEUE_EMPTY)
 			{
 				mud_telnet_set_telopt_state(opt, TELOPT_STATE_NO, bitshift);
-				g_message("TELNET NEGOTIATION: DONT answered by WILL; ill-behaved server. Ignoring IAC WILL %d. him = NO\n", opt_no);
+				g_warning("TELNET NEGOTIATION: DONT answered by WILL; ill-behaved server. Ignoring IAC WILL %d. him = NO\n", opt_no);
 				return FALSE;
 			} else { // The opposite is queued
 				mud_telnet_set_telopt_state(opt, TELOPT_STATE_YES, bitshift);
 				mud_telnet_set_telopt_queue(opt, TELOPT_STATE_QUEUE_EMPTY, bitshift);
-				g_message("TELNET NEGOTIATION: DONT answered by WILL; ill-behaved server. Ignoring IAC WILL %d. him = YES, himq = EMPTY\n", opt_no);
+				g_warning("TELNET NEGOTIATION: DONT answered by WILL; ill-behaved server. Ignoring IAC WILL %d. him = YES, himq = EMPTY\n", opt_no);
 				return FALSE;
 			}
 			break;
@@ -678,7 +727,6 @@
 			} else { // The opposite is queued
 				mud_telnet_set_telopt_state(opt, TELOPT_STATE_WANTNO, bitshift);
 				mud_telnet_set_telopt_queue(opt, TELOPT_STATE_QUEUE_EMPTY, bitshift);
-				//printf("Server, you should make up your mind. Fine DONT do %d then.\n", opt_no);
 				mud_telnet_send_iac(telnet, negative, opt_no);
 				return FALSE;
 			}
@@ -706,7 +754,6 @@
 
 		case TELOPT_STATE_YES:
 			mud_telnet_set_telopt_state(opt, TELOPT_STATE_NO, bitshift);
-		    //printf("Ok, server, I ACK that you DONT do %d\n", opt_no);
 			mud_telnet_send_iac(telnet, negative, opt_no);
 			mud_telnet_on_disable_opt(telnet, opt_no, him);
 			return TRUE;
@@ -716,10 +763,9 @@
 			{
 				mud_telnet_set_telopt_state(opt, TELOPT_STATE_NO, bitshift);
 				return FALSE;
-			} else { // but the opposite is queued...
+			} else {
 				mud_telnet_set_telopt_state(opt, TELOPT_STATE_WANTYES, bitshift);
 				mud_telnet_set_telopt_queue(opt, TELOPT_STATE_QUEUE_EMPTY, bitshift);
-				//printf("Ok, server, you are making me angry. DO %d", opt_no);
 			    mud_telnet_send_iac(telnet, affirmative, opt_no);
 				mud_telnet_on_enable_opt(telnet, opt_no, him); // FIXME: Is this correct?
 				return TRUE;

Modified: trunk/src/mud-telnet.h
==============================================================================
--- trunk/src/mud-telnet.h	(original)
+++ trunk/src/mud-telnet.h	Thu Jun 26 05:05:06 2008
@@ -52,6 +52,13 @@
 #   define TEL_EOR_BYTE     239 // End of record byte.
 #define TELOPT_NAWS			 31	// Window size			- RFC 1073
 #define TELOPT_CHARSET		 42	// Charset				- RFC 2066
+#   define TEL_CHARSET_REQUEST              1
+#   define TEL_CHARSET_ACCEPT               2
+#   define TEL_CHARSET_REJECT               3
+#   define TEL_CHARSET_TTABLE_IS            4
+#   define TEL_CHARSET_TTABLE_REJECTED      5
+#   define TEL_CHARSET_TTABLE_ACK           6
+#   define TEL_CHARSET_TTABLE_NAK           7
 #define TELOPT_MCCP			 85	// MCCP
 #define TELOPT_MCCP2		 86	// MCCP2
 #define TELOPT_CLIENT		 88	// Client name - from Clandestine MUD protocol
@@ -103,7 +110,8 @@
     HANDLER_TTYPE,
     HANDLER_NAWS,
     HANDLER_ECHO,
-    HANDLER_EOR
+    HANDLER_EOR,
+    HANDLER_CHARSET
 };
 
 struct _MudTelnetClass
@@ -145,6 +153,7 @@
 	
 	guchar telopt_states[256];
 	gint eor_enabled;
+	gint ttype_iteration;
 	
 	GConn *conn;
 	MudConnectionView *parent;
@@ -163,8 +172,10 @@
 void mud_telnet_get_parent_size(MudTelnet *telnet, gint *w, gint *h);
 void mud_telnet_send_raw(MudTelnet *telnet, guint32 count, ...);
 void mud_telnet_set_parent_naws(MudTelnet *telnet, gint enabled);
+void mud_telnet_set_parent_remote_encode(MudTelnet *telnet, gint enabled, gchar *encoding);
 void mud_telnet_send_naws(MudTelnet *telnet, gint w, gint h);
 void mud_telnet_set_local_echo(MudTelnet *telnet, gint enabled);
+void mud_telnet_send_charset_req(MudTelnet *telnet, gchar *encoding);
 
 G_END_DECLS
 

Modified: trunk/src/mud-window.c
==============================================================================
--- trunk/src/mud-window.c	(original)
+++ trunk/src/mud-window.c	Thu Jun 26 05:05:06 2008
@@ -207,7 +207,12 @@
 static void
 mud_window_closewindow_cb(GtkWidget *widget, MudWindow *window)
 {
-	if (window->priv->nr_of_tabs > 0)
+    mud_window_close_current_window(window);
+}
+
+void mud_window_close_current_window(MudWindow *window)
+{
+    if (window->priv->nr_of_tabs > 0)
 	{
 		gint nr = gtk_notebook_get_current_page(GTK_NOTEBOOK(window->priv->notebook));
 
@@ -216,7 +221,6 @@
 		if(window->priv->nr_of_tabs == 0)
 			mud_tray_update_icon(window->priv->tray, offline_connecting);
 	}
-
 }
 
 static gint
@@ -278,7 +282,7 @@
 		{
 			base = mud_connection_view_get_parsebase(MUD_CONNECTION_VIEW(window->priv->current_view));
 			if(mud_parse_base_do_aliases(base, text))
-				mud_connection_view_send(MUD_CONNECTION_VIEW(window->priv->current_view), text);
+				    mud_connection_view_send(MUD_CONNECTION_VIEW(window->priv->current_view), text);
 		}
 
 		if (gconf_client_get_bool(window->priv->gconf_client,

Modified: trunk/src/mud-window.h
==============================================================================
--- trunk/src/mud-window.h	(original)
+++ trunk/src/mud-window.h	Thu Jun 26 05:05:06 2008
@@ -37,6 +37,7 @@
 void mud_window_handle_plugins(MudWindow *window, gint id, gchar *data, guint length, gint dir);
 void mud_window_populate_profiles_menu(MudWindow *window);
 void mud_window_profile_menu_set_active(gchar *name, MudWindow *window);
+void mud_window_close_current_window(MudWindow *window);
 
 GtkWidget* mud_window_get_window(MudWindow *window);
 

Modified: trunk/ui/connect.glade
==============================================================================
--- trunk/ui/connect.glade	(original)
+++ trunk/ui/connect.glade	Thu Jun 26 05:05:06 2008
@@ -7,13 +7,15 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Connect</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
   <property name="modal">False</property>
+  <property name="default_width">450</property>
+  <property name="default_height">550</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
@@ -365,14 +367,14 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Connect...</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>

Modified: trunk/ui/directions.glade
==============================================================================
--- trunk/ui/directions.glade	(original)
+++ trunk/ui/directions.glade	Thu Jun 26 05:05:06 2008
@@ -12,6 +12,13 @@
   <property name="modal">False</property>
   <property name="resizable">False</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
   <child>
     <widget class="GtkVBox" id="vbox1">
@@ -50,7 +57,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -76,6 +83,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">1</property>
@@ -98,6 +109,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -120,6 +135,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -142,6 +161,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -164,6 +187,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">1</property>
@@ -186,6 +213,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -208,6 +239,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">3</property>
@@ -230,6 +265,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">3</property>
@@ -252,6 +291,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">2</property>
@@ -274,6 +317,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">1</property>
@@ -296,6 +343,10 @@
 		      <property name="yalign">1</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">0</property>
@@ -315,7 +366,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -338,7 +389,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -361,7 +412,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -384,7 +435,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -407,7 +458,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -430,7 +481,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -453,7 +504,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -476,7 +527,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -499,7 +550,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -522,7 +573,7 @@
 		      <property name="max_length">0</property>
 		      <property name="text" translatable="yes"></property>
 		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="invisible_char">*</property>
 		      <property name="activates_default">False</property>
 		    </widget>
 		    <packing>
@@ -581,6 +632,7 @@
 	      <property name="label">gtk-cancel</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	    </widget>
 	  </child>
 
@@ -592,6 +644,7 @@
 	      <property name="label">gtk-ok</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	    </widget>
 	  </child>
 	</widget>

Modified: trunk/ui/main.glade
==============================================================================
--- trunk/ui/main.glade	(original)
+++ trunk/ui/main.glade	Thu Jun 26 05:05:06 2008
@@ -9,8 +9,8 @@
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
-  <property name="default_width">503</property>
-  <property name="default_height">400</property>
+  <property name="default_width">665</property>
+  <property name="default_height">520</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
@@ -577,7 +577,6 @@
 		  <property name="fill">True</property>
 		</packing>
 	      </child>
-
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>
@@ -597,6 +596,7 @@
 </widget>
 
 <widget class="GtkAboutDialog" id="about_window">
+  <property name="border_width">5</property>
   <property name="visible">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="name" translatable="yes">GNOME-Mud</property>
@@ -617,6 +617,7 @@
 </widget>
 
 <widget class="GtkFileChooserDialog" id="save_dialog">
+  <property name="border_width">5</property>
   <property name="visible">True</property>
   <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
   <property name="local_only">True</property>
@@ -625,7 +626,7 @@
   <property name="do_overwrite_confirmation">False</property>
   <property name="title" translatable="yes">Save buffer as...</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>

Modified: trunk/ui/muds.glade
==============================================================================
--- trunk/ui/muds.glade	(original)
+++ trunk/ui/muds.glade	Thu Jun 26 05:05:06 2008
@@ -7,14 +7,14 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">MUD List</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>
@@ -480,19 +480,17 @@
 
 <widget class="GtkDialog" id="mudedit_window">
   <property name="border_width">6</property>
-  <property name="width_request">482</property>
-  <property name="height_request">531</property>
   <property name="visible">True</property>
   <property name="title" translatable="yes">Edit MUD</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
-  <property name="resizable">False</property>
+  <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>
@@ -1496,15 +1494,15 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Character Properties</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="default_width">240</property>
   <property name="resizable">False</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>

Modified: trunk/ui/prefs.glade
==============================================================================
--- trunk/ui/prefs.glade	(original)
+++ trunk/ui/prefs.glade	Thu Jun 26 05:05:06 2008
@@ -7,14 +7,14 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Preferences</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>
@@ -256,7 +256,6 @@
 
 			  <child>
 			    <widget class="GtkEntry" id="entry_commdev">
-			      <property name="width_request">15</property>
 			      <property name="visible">True</property>
 			      <property name="tooltip" translatable="yes">The character used to divide commands sent to the mud. For example &quot;;&quot; will let the string &quot;w;look&quot; be sent to the mud as two separate commands.</property>
 			      <property name="can_focus">True</property>
@@ -270,22 +269,139 @@
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
 			    </packing>
 			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkTable" id="table3">
+			  <property name="visible">True</property>
+			  <property name="n_rows">2</property>
+			  <property name="n_columns">2</property>
+			  <property name="homogeneous">False</property>
+			  <property name="row_spacing">0</property>
+			  <property name="column_spacing">0</property>
 
 			  <child>
-			    <widget class="GtkLabel" id="label4">
+			    <widget class="GtkVBox" id="vbox12">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Command history:</property>
-			      <property name="use_underline">False</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkComboBox" id="encoding_combo">
+				  <property name="visible">True</property>
+				  <property name="items">ISO-8859-1
+UTF-8
+ISO-8859-2
+ISO-8859-3
+ISO-8859-4
+ISO-8859-5
+ISO-8859-6
+ISO-8859-7
+ISO-8859-8
+ISO-8859-9
+ISO-8859-10
+ISO-8859-11
+ISO-8859-12
+ISO-8859-13
+ISO-8859-14
+ISO-8859-15
+ARMSCII-8
+IBM852
+GB18030
+GB2312
+GBK
+BIG5
+BIG5-HKSCS
+EUC-TW
+ISO-IR-111
+MAC_CRYILLIC
+KOI8-R
+IBM855
+CP866
+KOI8-U
+GEORGIAN-PS
+IBM862
+SHIFT_JIS
+EUC_JP
+ISO-2022-JP
+EUC-KR
+UHC
+TIS-620
+IBM857
+VISCII
+TCVN
+IBM850
+WINDOWS-1250
+WINDOWS-1251
+WINDOWS-1252
+WINDOWS-1253
+WINDOWS-1254
+WINDOWS-1255
+WINDOWS-1256
+WINDOWS-1257
+WINDOWS-1258</property>
+				  <property name="add_tearoffs">False</property>
+				  <property name="focus_on_click">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="encoding_check">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Enable Encoding Negotiation</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="x_padding">1</property>
+			      <property name="y_padding">10</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label47">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">E_ncoding:</property>
+			      <property name="use_underline">True</property>
 			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
 			      <property name="wrap">False</property>
 			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.289999991655</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
 			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -294,56 +410,26 @@
 			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkSpinButton" id="sb_history">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">The number of entries to be saved in the command history.</property>
-			      <property name="can_focus">True</property>
-			      <property name="climb_rate">1</property>
-			      <property name="digits">0</property>
-			      <property name="numeric">False</property>
-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			      <property name="snap_to_ticks">False</property>
-			      <property name="wrap">False</property>
-			      <property name="adjustment">1 0 500 1 5 5</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
 			    </packing>
 			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox3">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">5</property>
 
 			  <child>
-			    <widget class="GtkLabel" id="label5">
+			    <widget class="GtkLabel" id="label48">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Terminal type:</property>
-			      <property name="use_underline">False</property>
+			      <property name="label" translatable="yes">_Proxy:</property>
+			      <property name="use_underline">True</property>
 			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
 			      <property name="wrap">False</property>
 			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
+			      <property name="xalign">0.920000016689</property>
+			      <property name="yalign">0.140000000596</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
 			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -352,36 +438,150 @@
 			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
 			    </packing>
 			  </child>
 
 			  <child>
-			    <widget class="GtkEntry" id="entry_terminal">
+			    <widget class="GtkVBox" id="vbox13">
 			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">GNOME-Mud will attempt to transmit a terminal type (like ANSI or VT100) if the MUD requests one. This option sets the terminal type that will be sent.</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">True</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char">*</property>
-			      <property name="activates_default">False</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="proxy_check">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Use SOCKS Proxy</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkHBox" id="hbox37">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="label49">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Version:</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				      <property name="width_chars">-1</property>
+				      <property name="single_line_mode">False</property>
+				      <property name="angle">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkComboBox" id="proxy_combo">
+				      <property name="visible">True</property>
+				      <property name="items" translatable="yes">4
+5</property>
+				      <property name="add_tearoffs">False</property>
+				      <property name="focus_on_click">True</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">True</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label50">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes"> SOCKS Host:</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				      <property name="width_chars">-1</property>
+				      <property name="single_line_mode">False</property>
+				      <property name="angle">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="proxy_entry">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="editable">True</property>
+				      <property name="visibility">True</property>
+				      <property name="max_length">0</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">â</property>
+				      <property name="activates_default">False</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">True</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
 			    </widget>
 			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="y_options">fill</property>
 			    </packing>
 			  </child>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
 		    </widget>
@@ -959,7 +1159,7 @@
 			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			      <property name="snap_to_ticks">False</property>
 			      <property name="wrap">False</property>
-			      <property name="adjustment">1 0 1000 1 10 10</property>
+			      <property name="adjustment">1 0 9999 1 10 10</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -2406,14 +2606,14 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Profiles</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>
@@ -2538,13 +2738,13 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">New Profile</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
@@ -2660,13 +2860,13 @@
   <property name="visible">True</property>
   <property name="title" translatable="yes">Regex Error</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
   <property name="modal">False</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]