+2013-11-26 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Conflate name and class columns in GUI package list.
+
+ * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Remove...
+ <ID_PKGTYPE_COLUMN_HEADING>: ...column with this heading; add its width
+ allocation to the original pixel count alloted for the width of...
+ <ID_PKGNAME_COLUMN_HEADING>: ...this column.
+ (pkgListViewMaker::UpdateItem): Conflate content of original name and
+ class columns into first column; renumber successive columns.
+
2013-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
Don't attempt to resolve dependencies for unidentified packages.
/* Specify the column headings for the package list table.
*/
{ ID_PKGLIST_TABLE_HEADINGS, 20, "" },
- { ID_PKGNAME_COLUMN_HEADING, 150, "Package" },
- { ID_PKGTYPE_COLUMN_HEADING, 48, "Class" },
+ { ID_PKGNAME_COLUMN_HEADING, 198, "Package" },
{ ID_INSTVER_COLUMN_HEADING, 125, "Installed Version" },
{ ID_REPOVER_COLUMN_HEADING, 125, "Repository Version" },
{ ID_PKGDESC_COLUMN_HEADING, 400, "Description" },
* ...and fill in the text for the package name, class name,
* and package description columns...
*/
- ListView_SetItemText( ListView, content.iItem, 1, package_name );
- ListView_SetItemText( ListView, content.iItem, 2, class_name );
- ListView_SetItemText( ListView, content.iItem, 5, pkgGetTitle( package ) );
+ char name[len]; const char *fmt = "%s-%s";
+ sprintf( name, *class_name ? fmt : fmt + 3, package_name, class_name );
+ ListView_SetItemText( ListView, content.iItem, 1, name );
+ ListView_SetItemText( ListView, content.iItem, 4, pkgGetTitle( package ) );
}
else
/* ...otherwise, this is simply a request to update an
* column which identifies the currently installed version,
* if any, or clear it if the package is not installed.
*/
- ListView_SetItemText( ListView, content.iItem, 3, buf );
+ ListView_SetItemText( ListView, content.iItem, 2, buf );
/* Finally, fill in the text of the column which identifies
* the latest available version of the package.
*/
- ListView_SetItemText( ListView, content.iItem, 4, pkgVersionString( buf, &latest ) );
+ ListView_SetItemText( ListView, content.iItem, 3, pkgVersionString( buf, &latest ) );
}
void pkgListViewMaker::Dispatch( pkgXmlNode *package )