From owner-svn-ports-all@FreeBSD.ORG Sat Nov 22 13:53:36 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39E7E5A3; Sat, 22 Nov 2014 13:53:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F18832E; Sat, 22 Nov 2014 13:53:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAMDrZ4w078890; Sat, 22 Nov 2014 13:53:35 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAMDrZ9i078887; Sat, 22 Nov 2014 13:53:35 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201411221353.sAMDrZ9i078887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Sat, 22 Nov 2014 13:53:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r373061 - in head/mail/mutt: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2014 13:53:36 -0000 Author: pi Date: Sat Nov 22 13:53:34 2014 New Revision: 373061 URL: https://svnweb.freebsd.org/changeset/ports/373061 QAT: https://qat.redports.org/buildarchive/r373061/ Log: mail/mutt: improve sidebar function when handling many mail folders - Add code to improve sidebar function when handling many mail folders - Remove sidebar patch from default options to fix issues with packages (may be reverted later if confidence in current sidebar patch has grown) - Bump PORTREVISION due to default options changes PR: 195076 Submitted by: Udo.Schweigert@siemens.com (maintainer) Added: head/mail/mutt/files/extra-patch-sidebar-refresh (contents, props changed) Modified: head/mail/mutt/Makefile head/mail/mutt/pkg-plist Modified: head/mail/mutt/Makefile ============================================================================== --- head/mail/mutt/Makefile Sat Nov 22 13:47:29 2014 (r373060) +++ head/mail/mutt/Makefile Sat Nov 22 13:53:34 2014 (r373061) @@ -3,7 +3,7 @@ PORTNAME= mutt PORTVERSION= 1.5.23 -PORTREVISION?= 5 +PORTREVISION?= 6 CATEGORIES+= mail ipv6 MASTER_SITES= ftp://ftp.mutt.org/mutt/ \ ftp://ftp.mutt.org/mutt/devel/ \ @@ -110,8 +110,8 @@ OPTIONS_DEFAULT= COMPRESSED_FOLDERS HTML IMAP_HEADER_CACHE LOCALES_FIX MAILBOX_MANPAGES \ MAILDIR_HEADER_CACHE MAILDIR_MTIME_PATCH NLS \ NCURSES PARENT_CHILD_MATCH_PATCH QUOTE_PATCH \ - REVERSE_REPLY_PATCH SIDEBAR_PATCH SMART_DATE \ - SMIME_OUTLOOK_COMPAT SASL SMTP TRASH_PATCH XML + REVERSE_REPLY_PATCH SMART_DATE SMIME_OUTLOOK_COMPAT \ + SASL SMTP TRASH_PATCH XML .endif .include @@ -345,9 +345,11 @@ XML_NEEDED= yes .if ${PORT_OPTIONS:MNNTP} post-patch:: @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-sidebar-nntp + @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-sidebar-refresh .else post-patch:: @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-sidebar + @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-sidebar-refresh .endif .endif Added: head/mail/mutt/files/extra-patch-sidebar-refresh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/mutt/files/extra-patch-sidebar-refresh Sat Nov 22 13:53:34 2014 (r373061) @@ -0,0 +1,113 @@ +--- mutt.orig/buffy.c 2012-11-02 13:16:39.000000000 +0100 ++++ mutt/buffy.c 2012-11-02 13:20:52.000000000 +0100 +@@ -26,6 +26,7 @@ + #include "mx.h" + + #include "mutt_curses.h" ++#include "sidebar.h" + + #ifdef USE_IMAP + #include "imap.h" +@@ -564,19 +565,28 @@ + { + case M_MBOX: + case M_MMDF: +- buffy_mbox_update (tmp); ++ if (sidebar_should_refresh()) { ++ buffy_mbox_update (tmp); ++ 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); ++ if (sidebar_should_refresh()) { ++ mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged); ++ sidebar_updated(); ++ } + mh_buffy(tmp); + if (tmp->new) + BuffyCount++; +Index: mutt/globals.h +=================================================================== +--- mutt.orig/globals.h 2012-11-02 13:16:39.000000000 +0100 ++++ mutt/globals.h 2012-11-02 13:16:40.000000000 +0100 +@@ -214,6 +214,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 +=================================================================== +--- mutt.orig/init.h 2012-11-02 13:16:39.000000000 +0100 ++++ mutt/init.h 2012-11-02 13:16:40.000000000 +0100 +@@ -2009,6 +2009,12 @@ + { "sidebar_width", DT_NUM, R_BOTH, UL &SidebarWidth, 0 }, + /* + ** .pp ++ ** Do not refresh sidebar in less than $sidebar_refresh seconds, ++ ** (0 disables refreshing). ++ */ ++ { "sidebar_refresh", DT_NUM, R_BOTH, UL &SidebarRefresh, 60 }, ++ /* ++ ** .pp + ** The width of the sidebar. + */ + { "sidebar_shortpath", DT_BOOL, R_BOTH, OPTSIDEBARSHORTPATH, 0 }, +Index: mutt/sidebar.c +=================================================================== +--- mutt.orig/sidebar.c 2012-11-02 13:16:39.000000000 +0100 ++++ mutt/sidebar.c 2012-11-02 13:16:40.000000000 +0100 +@@ -252,6 +252,7 @@ + saveSidebarWidth = SidebarWidth; + if(!option(OPTSIDEBAR)) SidebarWidth = 0; + initialized = true; ++ SidebarLastRefresh = time(NULL); + } + + /* save or restore the value SidebarWidth */ +@@ -464,3 +465,16 @@ + set_curbuffy(""); /* default is the first mailbox */ + 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 +=================================================================== +--- mutt.orig/sidebar.h 2012-11-02 13:16:39.000000000 +0100 ++++ mutt/sidebar.h 2012-11-02 13:16:40.000000000 +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 */ Modified: head/mail/mutt/pkg-plist ============================================================================== --- head/mail/mutt/pkg-plist Sat Nov 22 13:47:29 2014 (r373060) +++ head/mail/mutt/pkg-plist Sat Nov 22 13:53:34 2014 (r373061) @@ -49,7 +49,6 @@ man/man5/muttrc.5.gz %%HTML%%%%PORTDOCS%%%%DOCSDIR%%/security.html %%HTML%%%%PORTDOCS%%%%DOCSDIR%%/tuning.html %%XML%%%%HTML%%%%COMPRESS%%%%PORTDOCS%%%%DOCSDIR%%/compressed-folders.html -%%PORTDOCS%%@dirrm %%DOCSDIR%% %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Mush.rc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Pine.rc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Tin.rc @@ -83,8 +82,6 @@ man/man5/muttrc.5.gz %%PORTEXAMPLES%%%%EXAMPLESDIR%%/sample.muttrc-tlr %%PORTEXAMPLES%%%%EXAMPLESDIR%%/smime.rc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/smime_keys_test.pl -%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/iconv -%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% %%NLS%%share/locale/bg/LC_MESSAGES/mutt.mo %%NLS%%share/locale/ca/LC_MESSAGES/mutt.mo %%NLS%%share/locale/cs/LC_MESSAGES/mutt.mo