commit f6c28102fa5464d22e2eb4ed80a2116bfe62df6a
parent ded172c6a5bc853908d2330f387ed5861bf541aa
Author: ukai <ukai>
Date: Tue, 24 Dec 2002 17:33:31 +0000
[w3m-dev 03598] restore cursor when download list panel is updated.
* main.c (stopDownload): delete->replace
(ldDL): use DownloadListBuffer()
From: Hiroaki Shimotsu <shim@d5.bs1.fc.nec.co.jp>
Diffstat:
2 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,11 @@
2002-12-25 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03598] restore cursor when download list panel is updated.
+ * main.c (stopDownload): delete->replace
+ (ldDL): use DownloadListBuffer()
+
+2002-12-25 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03597] Re: meta refresh
* main.c (Event): next, linked list
(N_EVENT_QUEUE): deleted
diff --git a/main.c b/main.c
@@ -6233,17 +6233,17 @@ stopDownload(void)
void
ldDL(void)
{
- Buffer *prev = Currentbuf;
- int delete = FALSE, new_tab = FALSE;
+ Buffer *buf;
+ int replace = FALSE, new_tab = FALSE;
#ifdef USE_ALARM
int reload;
#endif
if (Currentbuf->bufferprop & BP_INTERNAL &&
!strcmp(Currentbuf->buffername, DOWNLOAD_LIST_TITLE))
- delete = TRUE;
+ replace = TRUE;
if (!FirstDL) {
- if (delete) {
+ if (replace) {
if (Currentbuf == Firstbuf && Currentbuf->nextBuffer == NULL) {
if (nTab > 1)
deleteTab(CurrentTab);
@@ -6254,29 +6254,30 @@ ldDL(void)
}
return;
}
- if (!delete && open_tab_dl_list) {
- _newT();
- prev = Currentbuf;
- delete = TRUE;
- new_tab = TRUE;
- }
#ifdef USE_ALARM
reload = checkDownloadList();
#endif
- cmd_loadBuffer(DownloadListBuffer(), BP_NO_URL, LB_NOLINK);
- if (Currentbuf == prev) {
- if (new_tab)
- deleteTab(CurrentTab);
- displayBuffer(Currentbuf, B_FORCE_REDRAW);
+ buf = DownloadListBuffer();
+ if (!buf) {
+ displayBuffer(Currentbuf, B_NORMAL);
return;
}
- if (delete)
+ buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
+ if (replace)
+ restorePosition(buf, Currentbuf);
+ if (!replace && open_tab_dl_list) {
+ _newT();
+ new_tab = TRUE;
+ }
+ pushBuffer(buf);
+ if (replace || new_tab)
deletePrevBuf();
#ifdef USE_ALARM
if (reload)
Currentbuf->event = setAlarmEvent(Currentbuf->event, 1, AL_IMPLICIT,
FUNCNAME_reload, NULL);
#endif
+ displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
static void