gnome-mud r721 - in trunk: . src
- From: lharris svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-mud r721 - in trunk: . src
- Date: Sun, 15 Feb 2009 06:52:17 +0000 (UTC)
Author: lharris
Date: Sun Feb 15 06:52:17 2009
New Revision: 721
URL: http://svn.gnome.org/viewvc/gnome-mud?rev=721&view=rev
Log:
NAWS fix, Reenabled Telnet Options
Modified:
trunk/ChangeLog
trunk/src/mud-connection-view.c
trunk/src/mud-telnet.c
Modified: trunk/src/mud-connection-view.c
==============================================================================
--- trunk/src/mud-connection-view.c (original)
+++ trunk/src/mud-connection-view.c Sun Feb 15 06:52:17 2009
@@ -91,6 +91,9 @@
#endif
GString *processed;
+
+ guint width;
+ guint height;
};
static void mud_connection_view_init (MudConnectionView *connection_view);
@@ -295,12 +298,12 @@
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)
- {
+ switch (type)
+ {
case Sent:
mud_connection_view_feed_text(view, "\e[1;33m");
break;
@@ -316,7 +319,7 @@
case Normal:
default:
break;
- }
+ }
if(view->local_echo)
mud_connection_view_feed_text(view, message);
@@ -373,7 +376,10 @@
connection_view->priv->terminal = vte_terminal_new();
vte_terminal_set_encoding(VTE_TERMINAL(connection_view->priv->terminal), "ISO-8859-1");
vte_terminal_set_emulation(VTE_TERMINAL(connection_view->priv->terminal), "xterm");
-
+
+ connection_view->priv->width = VTE_TERMINAL(connection_view->priv->terminal)->column_count;
+ connection_view->priv->height = VTE_TERMINAL(connection_view->priv->terminal)->row_count;
+
gtk_box_pack_start(GTK_BOX(term_box), connection_view->priv->terminal, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(connection_view->priv->terminal),
"button_press_event",
@@ -1094,9 +1100,14 @@
{
if(view && view->naws_enabled)
{
- mud_telnet_send_naws(view->priv->telnet,
- VTE_TERMINAL(view->priv->terminal)->column_count,
- VTE_TERMINAL(view->priv->terminal)->row_count);
+ guint curr_width = VTE_TERMINAL(view->priv->terminal)->column_count;
+ guint curr_height = VTE_TERMINAL(view->priv->terminal)->row_count;
+
+ if(curr_width != view->priv->width || curr_height != view->priv->height)
+ mud_telnet_send_naws(view->priv->telnet, curr_width, curr_height);
+
+ view->priv->width = curr_width;
+ view->priv->height = curr_height;
}
}
Modified: trunk/src/mud-telnet.c
==============================================================================
--- trunk/src/mud-telnet.c (original)
+++ trunk/src/mud-telnet.c Sun Feb 15 06:52:17 2009
@@ -201,7 +201,7 @@
telnet->handlers[0].enable = MudHandler_TType_Enable;
telnet->handlers[0].disable = MudHandler_TType_Disable;
telnet->handlers[0].handle_sub_neg = MudHandler_TType_HandleSubNeg;
-#if 0
+
/* NAWS */
telnet->handlers[1].type = HANDLER_NAWS;
telnet->handlers[1].option_number = (guchar)TELOPT_NAWS;
@@ -241,7 +241,7 @@
telnet->handlers[5].enable = MudHandler_ZMP_Enable;
telnet->handlers[5].disable = MudHandler_ZMP_Disable;
telnet->handlers[5].handle_sub_neg = MudHandler_ZMP_HandleSubNeg;
-#endif
+
#ifdef ENABLE_GST
/* MSP */
telnet->handlers[6].type = HANDLER_MSP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]