changeset 1494:13bbf7b8f920

[gaim-migrate @ 1504] Hehe committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Wed, 21 Feb 2001 19:20:24 +0000
parents e12fa57b9ef9
children 3d1c4e5f375b
files ChangeLog plugins/napster.c
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 21 19:17:27 2001 +0000
+++ b/ChangeLog	Wed Feb 21 19:20:24 2001 +0000
@@ -16,6 +16,7 @@
 	* Jabber got chat
 	* Log Viewer (courtesy BMiller)
 	* Can save conversation history
+	* Napster can kinda sorta download files sometimes :)
 
 version 0.11.0-pre4:
 	* ICQ upgraded to use icqlib 1.1.0
--- a/plugins/napster.c	Wed Feb 21 19:17:27 2001 +0000
+++ b/plugins/napster.c	Wed Feb 21 19:20:24 2001 +0000
@@ -422,7 +422,8 @@
 
 		req->progress = gtk_progress_bar_new();
 		gtk_progress_bar_update(GTK_PROGRESS_BAR(req->progress), 0);
-		gtk_progress_set_format_string(GTK_PROGRESS(req->progress), "%P %%");
+		gtk_progress_configure(GTK_PROGRESS(req->progress), 0, 0, (float)req->total/(float)1024);
+		gtk_progress_set_format_string(GTK_PROGRESS(req->progress), "%P%% (%VKB / %UKB)");
 		gtk_progress_set_show_text(GTK_PROGRESS(req->progress), TRUE);
 		gtk_box_pack_start(GTK_BOX(vbox), req->progress, FALSE, FALSE, 5);
 
@@ -538,13 +539,15 @@
 	int command;
 	gchar **res;
 
-	read(source, header, 4);
+	recv(source, header, 4, 0);
+//	read(source, header, 4);
 	len = header[0];
 	command = header[1];	
 
 	buf = (gchar *)g_malloc(sizeof(gchar) * (len + 1));
-	
-	read(source, buf, len);
+
+//	read(source, buf, len);
+	recv(source, buf, len, 0);
 
 	buf[len] = 0;
 	
@@ -742,7 +745,7 @@
 
 		int i, j;
 
-		for (i = 1, j = 0; buf[i] != '\"'; i++, j++)
+		for (i = 1, j = 0; ((buf[i] != '\"') && (buf[i] != 0)); i++, j++)
 		{
 			file[j] = buf[i];
 		}
@@ -896,7 +899,7 @@
 	int i;
 	int status;
 
-	host = gethostbyname("64.124.41.175");
+	host = gethostbyname("64.124.41.187");
 
 	if (!host) {
 		hide_login_progress(gc, "Unable to resolve hostname");