FreeBSD Bugzilla – Attachment 164674 Details for
Bug 205623
Some attachments, in some cases, are not easily viewable in the browser
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The new file files/extra-patch-sidebar-refresh
extra-patch-sidebar-refresh (text/plain), 3.13 KB, created by
VK
on 2015-12-26 11:39:34 UTC
(
hide
)
Description:
The new file files/extra-patch-sidebar-refresh
Filename:
MIME Type:
Creator:
VK
Created:
2015-12-26 11:39:34 UTC
Size:
3.13 KB
patch
obsolete
>--- a/buffy.c.orig 2015-12-15 19:11:10.949983000 +0100 >+++ b/buffy.c 2015-12-15 19:11:10.963818000 +0100 >@@ -26,6 +26,7 @@ > #include "mx.h" > > #include "mutt_curses.h" >+#include "sidebar.h" > > #ifdef USE_IMAP > #include "imap.h" >@@ -602,19 +603,28 @@ > { > case M_MBOX: > case M_MMDF: >- buffy_mbox_update (tmp, &sb); >+ if (sidebar_should_refresh()) { >+ buffy_mbox_update (tmp, &sb); >+ sidebar_updated(); >+ } > if (buffy_mbox_hasnew (tmp, &sb) > 0) > BuffyCount++; > break; > > case M_MAILDIR: >- buffy_maildir_update (tmp); >+ if (sidebar_should_refresh()) { >+ buffy_maildir_update (tmp); >+ sidebar_updated(); >+ } > if (buffy_maildir_hasnew (tmp) > 0) > BuffyCount++; > break; > > case M_MH: >- mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked); >+ if (sidebar_should_refresh()) { >+ mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked); >+ sidebar_updated(); >+ } > mh_buffy(tmp); > if (tmp->new) > BuffyCount++; >Index: mutt/globals.h >=================================================================== >--- a/globals.h.orig 2015-12-15 19:11:10.951646000 +0100 >+++ b/globals.h 2015-12-15 19:11:10.963953000 +0100 >@@ -219,6 +219,8 @@ > WHERE struct buffy_t *CurBuffy INITVAL(0); > WHERE short DrawFullLine INITVAL(0); > WHERE short SidebarWidth; >+WHERE short SidebarRefresh; >+WHERE short SidebarLastRefresh; > #ifdef USE_IMAP > WHERE short ImapKeepalive; > WHERE short ImapPipelineDepth; >Index: mutt/init.h >=================================================================== >--- a/init.h.orig 2015-12-15 19:11:10.954277000 +0100 >+++ b/init.h 2015-12-15 19:11:10.966235000 +0100 >@@ -2042,6 +2042,12 @@ > ** .pp > ** The width of the sidebar. > */ >+ { "sidebar_refresh", DT_NUM, R_BOTH, UL &SidebarRefresh, 60 }, >+ /* >+ ** .pp >+ ** Do not refresh sidebar in less than $sidebar_refresh seconds, >+ ** (0 disables refreshing). >+ */ > { "sidebar_shortpath", DT_BOOL, R_BOTH, OPTSIDEBARSHORTPATH, 0 }, > /* > ** .pp >Index: mutt/sidebar.c >=================================================================== >--- a/sidebar.c.orig 2015-12-15 19:11:10.959133000 +0100 >+++ b/sidebar.c 2015-12-15 19:11:10.966747000 +0100 >@@ -211,6 +211,7 @@ > saveSidebarWidth = SidebarWidth; > if(!option(OPTSIDEBAR)) SidebarWidth = 0; > initialized = true; >+ SidebarLastRefresh = time(NULL); > } > > /* save or restore the value SidebarWidth */ >@@ -417,3 +418,16 @@ > draw_sidebar(menu); > } > >+int sidebar_should_refresh() >+{ >+ if (option(OPTSIDEBAR) && SidebarRefresh > 0) { >+ if (time(NULL) - SidebarLastRefresh >= SidebarRefresh) >+ return 1; >+ } >+ return 0; >+} >+void sidebar_updated() >+{ >+ SidebarLastRefresh = time(NULL); >+} >+ >Index: mutt/sidebar.h >=================================================================== >--- a/sidebar.h.orig 2015-12-15 19:11:10.959229000 +0100 >+++ b/sidebar.h 2015-12-15 19:11:10.966962000 +0100 >@@ -32,5 +32,7 @@ > void scroll_sidebar(int, int); > void set_curbuffy(char*); > void set_buffystats(CONTEXT*); >+int sidebar_should_refresh(); >+void sidebar_updated(); > > #endif /* SIDEBAR_H */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205623
:
164671
|
164672
| 164674 |
164675
|
164676
|
164677
|
175557
|
175558
|
175559