From dc65bde6c46e974b57d4c1a86542aea731a9289b Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Wed, 2 Oct 2013 22:07:03 +0100 Subject: [PATCH] Support group affiliation with component package granularity. --- ChangeLog | 11 +++++++++++ src/pkglist.cpp | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43df91f..efa5119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-10-02 Keith Marshall + + Support group affiliation with component package granularity. + + * src/pkglist.cpp (pkgXmlNode::IsVisibleClass): Make it synonymous + with IsVisibleGroupMember(); this is a temporary adjustment, pending + the planned implementation of component class visibility filtering. + (pkgListViewMaker::Dispatch): Defer consideration of visibility until + traversal of component package directories, except in the particular + case of packages which lack defined components. + 2013-10-01 Keith Marshall Correct processing of package group associations. diff --git a/src/pkglist.cpp b/src/pkglist.cpp index db36205..d1e8a11 100644 --- a/src/pkglist.cpp +++ b/src/pkglist.cpp @@ -4,7 +4,7 @@ * $Id$ * * Written by Keith Marshall - * Copyright (C) 2012, MinGW Project + * Copyright (C) 2012, 2013, MinGW.org Project * * * Implementation of the methods for the pkgListViewMaker class, and @@ -129,7 +129,13 @@ inline bool pkgXmlNode::IsVisibleGroupMember() return AppWindowMaker::IsPackageGroupAffiliate( this ); } -inline bool pkgXmlNode::IsVisibleClass(){ return true; } +/* FIXME: Complementary check for component class visibility requires a + * future component class visibility control; for the time being, we may + * assume that any component package should be visible if it belongs to + * any visible package group, (including a component subset of such a + * group, which may comprise only itself). + */ +inline bool pkgXmlNode::IsVisibleClass(){ return IsVisibleGroupMember(); } static char *pkgGetTitle( pkgXmlNode *pkg, const pkgXmlNode *xml_root ) { @@ -437,7 +443,7 @@ void pkgListViewMaker::Dispatch( pkgXmlNode *package ) * dispatching the content of the directory to the display service, * (which, in this case, populates the list view window pane). */ - if( package->IsElementOfType( package_key ) && package->IsVisibleGroupMember() ) + if( package->IsElementOfType( package_key ) ) { /* Assemble the package name into the list view record block. */ @@ -455,8 +461,9 @@ void pkgListViewMaker::Dispatch( pkgXmlNode *package ) dir->InOrder( this ); delete dir; } - else - /* ...otherwise, simply insert an unclassified list entry + else if( package->IsVisibleGroupMember() ) + /* + * ...otherwise, simply insert an unclassified list entry * for the bare package name, omitting the component class. */ InsertItem( package, (char *)("") ); -- 2.11.0