aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-03-15 16:35:46 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-03-15 16:35:46 +0000
commit563cc280e4be0d630216494acdca2602c5651418 (patch)
treee0bd9eb7ee70e4e6b3ae89f5c524bc8d72a49971
parent[w3m-dev 03133] Re: w3mman.1 (diff)
downloadw3m-563cc280e4be0d630216494acdca2602c5651418.tar.gz
w3m-563cc280e4be0d630216494acdca2602c5651418.zip
[w3m-dev 03132] Re: Reload image
* file.c (loadGeneralFile): b->type = "text/html" * file.c (loadImageBuffer): comment out getImageSize() image_flag = IMG_FLAG_AUTO * file.c (openGeneralPagerBuffer): buf->type = "text/html" * frame.c (resetFrameElement): if (buf->mailcap_source) ... * frame.c (frame_download_source): if (buf->mailcap_source) ... * main.c (vwSrc): #ifdef USE_IMAGE From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog13
-rw-r--r--file.c11
-rw-r--r--frame.c16
-rw-r--r--main.c6
4 files changed, 37 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 763239b..202a16f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-03-16 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03132] Re: Reload image
+ * file.c (loadGeneralFile): b->type = "text/html"
+ * file.c (loadImageBuffer): comment out getImageSize()
+ image_flag = IMG_FLAG_AUTO
+ * file.c (openGeneralPagerBuffer): buf->type = "text/html"
+ * frame.c (resetFrameElement): if (buf->mailcap_source) ...
+ * frame.c (frame_download_source): if (buf->mailcap_source) ...
+ * main.c (vwSrc): #ifdef USE_IMAGE
+
2002-03-16 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 03133] Re: w3mman.1
@@ -3196,4 +3207,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.352 2002/03/15 16:10:26 ukai Exp $
+$Id: ChangeLog,v 1.353 2002/03/15 16:35:46 ukai Exp $
diff --git a/file.c b/file.c
index 58d1032..512a25b 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.85 2002/03/14 16:12:06 ukai Exp $ */
+/* $Id: file.c,v 1.86 2002/03/15 16:35:46 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -1977,11 +1977,11 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
}
#ifdef USE_IMAGE
else if (proc == loadImageBuffer)
- b->type = b->real_type;
+ b->type = "text/html";
#endif
#ifdef USE_GOPHER
else if (proc == loadGopherDir)
- b->type = b->real_type;
+ b->type = "text/html";
#endif
else
b->type = "text/plain";
@@ -6518,7 +6518,9 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf)
cache->loaded = IMG_FLAG_LOADED;
cache->index = 0;
+/*
getImageSize(cache);
+*/
image_buffer:
tmp = Sprintf("<img src=\"%s\"><br><br>", html_quote(image->url));
@@ -6542,6 +6544,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf)
newBuf->topLine = newBuf->firstLine;
newBuf->lastLine = newBuf->currentLine;
newBuf->currentLine = newBuf->firstLine;
+ newBuf->image_flag = IMG_FLAG_AUTO;
return newBuf;
}
#endif
@@ -6738,7 +6741,7 @@ openGeneralPagerBuffer(InputStream stream)
cur_baseURL = New(ParsedURL);
parseURL("-", cur_baseURL, NULL);
buf = loadImageBuffer(&uf, t_buf);
- buf->type = t;
+ buf->type = "text/html";
}
#endif
else {
diff --git a/frame.c b/frame.c
index 2681826..9022025 100644
--- a/frame.c
+++ b/frame.c
@@ -1,4 +1,4 @@
-/* $Id: frame.c,v 1.12 2002/02/09 15:27:14 ukai Exp $ */
+/* $Id: frame.c,v 1.13 2002/03/15 16:35:46 ukai Exp $ */
#include "fm.h"
#include "parsetagx.h"
#include "myctype.h"
@@ -342,7 +342,12 @@ resetFrameElement(union frameset_element *f_element,
f_body->attr = F_BODY;
f_body->name = f_name;
f_body->url = parsedURL2Str(&buf->currentURL)->ptr;
- if (buf->real_scheme == SCM_LOCAL) {
+ if (buf->mailcap_source) {
+ f_body->source = buf->mailcap_source;
+ f_body->flags |= FB_TODELETE;
+ buf->mailcap_source = NULL;
+ }
+ else if (buf->real_scheme == SCM_LOCAL) {
f_body->source = buf->sourcefile;
}
else {
@@ -404,7 +409,12 @@ frame_download_source(struct frame_body *b, ParsedURL *currentURL,
b->url = parsedURL2Str(&buf->currentURL)->ptr;
b->source = buf->sourcefile;
b->type = buf->type;
- if ((buf->real_scheme != SCM_LOCAL)
+ if (buf->mailcap_source) {
+ b->source = buf->mailcap_source;
+ b->flags |= FB_TODELETE;
+ buf->mailcap_source = NULL;
+ }
+ else if ((buf->real_scheme != SCM_LOCAL)
#ifdef USE_IMAGE
|| (activeImage && !useExtImageViewer &&
buf->real_type && !strncasecmp(buf->real_type, "image/", 6))
diff --git a/main.c b/main.c
index c63be08..cd7d7c0 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.87 2002/03/14 16:12:07 ukai Exp $ */
+/* $Id: main.c,v 1.88 2002/03/15 16:35:46 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -4139,6 +4139,10 @@ vwSrc(void)
if (Currentbuf->type == NULL || Currentbuf->bufferprop & BP_FRAME)
return;
+#ifdef USE_IMAGE
+ if (!strncasecmp(Currentbuf->real_type, "image/", 6))
+ return;
+#endif
if ((buf = Currentbuf->linkBuffer[LB_SOURCE]) != NULL ||
(buf = Currentbuf->linkBuffer[LB_N_SOURCE]) != NULL) {
Currentbuf = buf;