From 720603c4f73b971cb4ecc832cb4b33384bdb8a27 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 8 Oct 1998 21:42:19 +0000 Subject: [PATCH] Touch down progress bar changes from PROGRESS_19981006_BRANCH. --- network/main/Makefile | 4 ++++ network/main/mkconect.c | 24 ++++++++++++++++++++++++ network/main/mkgeturl.c | 8 ++++++++ 3 files changed, 36 insertions(+) diff --git a/network/main/Makefile b/network/main/Makefile index 362761bcea4..ac1511c1f9b 100644 --- a/network/main/Makefile +++ b/network/main/Makefile @@ -71,6 +71,10 @@ ifdef MOZ_MAIL_NEWS REQUIRES += mailbxurl nntpurl pop3url endif +ifdef MOZ_SMOOTH_PROGRESS +REQUIRES += progress +endif + include $(DEPTH)/config/rules.mk TEST_LIBS = $(LIBRARY) \ diff --git a/network/main/mkconect.c b/network/main/mkconect.c index 4fc2cfecd3f..ee86917423c 100644 --- a/network/main/mkconect.c +++ b/network/main/mkconect.c @@ -65,6 +65,10 @@ #include "timing.h" +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) +#include "progress.h" +#endif + #ifdef XP_UNIX /* #### WARNING, this is duplicated in mksockrw.c */ @@ -779,7 +783,11 @@ net_FindAddress (const char *host_ptr, char *msg = PR_smprintf(XP_GetString(XP_PROGRESS_LOOKUPHOST), host_port); if(msg) { +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_Status(window_id, NULL, msg); +#else NET_Progress(window_id, msg); +#endif PR_Free(msg); } @@ -886,7 +894,11 @@ net_start_first_connect(const char *host, { PR_snprintf(buf, (len+10)*sizeof(char), XP_GetString(XP_PROGRESS_CONTACTHOST), host); +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_Status(window_id, NULL, buf); +#else NET_Progress(window_id, buf); +#endif FREE(buf); } @@ -1175,7 +1187,11 @@ HG28879 { PR_snprintf(buf, (len+10)*sizeof(char), XP_GetString(XP_PROGRESS_UNABLELOCATE), prefSocksHost); +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_Status(window_id, NULL, buf); +#else NET_Progress(window_id, buf); +#endif FREE(buf); } @@ -1240,7 +1256,11 @@ HG71089 { PR_snprintf(buf, (len+10)*sizeof(char), XP_GetString(XP_PROGRESS_UNABLELOCATE), host); +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_Status(window_id, NULL, buf); +#else NET_Progress(window_id, buf); +#endif FREE(buf); } } @@ -1370,7 +1390,11 @@ NET_FinishConnect (CONST char *url, { PR_snprintf(buf, (len+10)*sizeof(char), XP_GetString(XP_PROGRESS_UNABLELOCATE), host); +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_Status(window_id, NULL, buf); +#else NET_Progress(window_id, buf); +#endif FREE(buf); } } diff --git a/network/main/mkgeturl.c b/network/main/mkgeturl.c index a857a3f07cf..06ee490f9ef 100644 --- a/network/main/mkgeturl.c +++ b/network/main/mkgeturl.c @@ -171,6 +171,10 @@ void net_CallExitRoutineProxy(Net_GetUrlExitFunc* exit_routine, #include "mkaccess.h" /* change to trust.h for phase 2 */ #endif +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) +#include "progress.h" +#endif + /* for XP_GetString() */ #include "xpgetstr.h" extern int MK_CONNECTION_REFUSED; @@ -2137,6 +2141,10 @@ NET_GetURL (URL_Struct *URL_s, exit_routine)); } +#if defined(SMOOTH_PROGRESS) && !defined(MODULAR_NETLIB) + PM_StartBinding(window_id, URL_s); +#endif + /* put a limit on the total number of active urls */ if((NET_TotalNumberOfProcessingURLs >= MAX_NUMBER_OF_PROCESSING_URLS) &&