diff libpurple/protocols/myspace/myspace.c @ 24630:8f757b2139d2

String changes (a few of which I had already made, grumble grumble). I tried to re-use strings that exist in other protocols as much as possible. When calling purple_connection_update_progress() the strings should not have ellipsis. When calling purple_connection_error_reason() due to a keep alive timeout, do not include the number of seconds, because there shouldn't be a reason for users to care
author Mark Doliner <mark@kingant.net>
date Thu, 11 Dec 2008 07:17:32 +0000
parents 3a3d36791a47
children 1af3baa61c9f 65cfc59858cf
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Thu Dec 11 04:20:14 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Thu Dec 11 07:17:32 2008 +0000
@@ -1334,28 +1334,21 @@
 {
 	MsimSession *session;
 	time_t delta;
-	gchar *errmsg;
 
 	session = (MsimSession *)data;
 
 	g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE);
 
 	delta = time(NULL) - session->last_comm;
+
 	/* purple_debug_info("msim", "msim_check_alive: delta=%d\n", delta); */
 	if (delta >= MSIM_KEEPALIVE_INTERVAL) {
-	        errmsg = g_strdup_printf(ngettext("Connection to server lost (no data received within %d second)",
-						  "Connection to server lost (no data received within %d seconds)",
-						  (int)delta),
-					 (int)delta);
-
-		purple_debug_info("msim", "msim_check_alive: %s > interval of %d, presumed dead\n",
-				errmsg, MSIM_KEEPALIVE_INTERVAL);
+		purple_debug_info("msim",
+				"msim_check_alive: %zu > interval of %d, presumed dead\n",
+				delta, MSIM_KEEPALIVE_INTERVAL);
 		purple_connection_error_reason(session->gc,
-				PURPLE_CONNECTION_ERROR_NETWORK_ERROR, errmsg);
-
-		purple_notify_error(session->gc, NULL, errmsg, NULL);
-
-		g_free(errmsg);
+				PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
+				_("Lost connection with server"));
 
 		return FALSE;
 	}