diff libpurple/protocols/yahoo/ycht.c @ 27381:f541583e31bd

More uniformity among disconnect error messages
author Mark Doliner <mark@kingant.net>
date Mon, 06 Jul 2009 09:07:42 +0000
parents 377e063ecda5
children 09772222714a
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/ycht.c	Mon Jul 06 07:26:12 2009 +0000
+++ b/libpurple/protocols/yahoo/ycht.c	Mon Jul 06 09:07:42 2009 +0000
@@ -285,9 +285,11 @@
 	else if (ret <= 0) {
 		/* TODO: error handling */
 /*
+		gchar *tmp = g_strdup_printf(_("Lost connection with server: %s"),
+				g_strerror(errno));
 		purple_connection_error_reason(purple_account_get_connection(irc->account),
-			      PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
-			      _("Server has disconnected"));
+			      PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp);
+		g_free(tmp);
 */
 		return;
 	}
@@ -454,7 +456,7 @@
 static void ycht_connection_error(YchtConn *ycht, const gchar *error)
 {
 
-	purple_notify_info(ycht->gc, NULL, _("Connection problem with the YCHT server."), error);
+	purple_notify_info(ycht->gc, NULL, _("Connection problem with the YCHT server"), error);
 	ycht_connection_close(ycht);
 }
 
@@ -473,13 +475,13 @@
 			/* No worries */
 			return;
 
-		tmp = g_strdup_printf(_("Lost connection with server\n%s"),
+		tmp = g_strdup_printf(_("Lost connection with server: %s"),
 				g_strerror(errno));
 		ycht_connection_error(ycht, tmp);
 		g_free(tmp);
 		return;
 	} else if (len == 0) {
-		ycht_connection_error(ycht, _("Server closed the connection."));
+		ycht_connection_error(ycht, _("Server closed the connection"));
 		return;
 	}
 
@@ -546,7 +548,7 @@
 	char *buf;
 
 	if (source < 0) {
-		ycht_connection_error(ycht, _("Unable to connect."));
+		ycht_connection_error(ycht, _("Unable to connect"));
 		return;
 	}
 
@@ -582,7 +584,7 @@
 	                       purple_account_get_int(account, "ycht-port", YAHOO_YCHT_PORT),
 	                       ycht_got_connected, ycht) == NULL)
 	{
-		ycht_connection_error(ycht, _("Connection problem"));
+		ycht_connection_error(ycht, _("Unable to connect"));
 		return;
 	}
 }