The MinGW.org Installation Manager Tool
修订版 | 932043065231353133be977f3b6534028fea0467 (tree) |
---|---|
时间 | 2013-11-27 08:18:01 |
作者 | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Conflate name and class columns in GUI package list.
@@ -1,3 +1,14 @@ | ||
1 | +2013-11-26 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Conflate name and class columns in GUI package list. | |
4 | + | |
5 | + * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Remove... | |
6 | + <ID_PKGTYPE_COLUMN_HEADING>: ...column with this heading; add its width | |
7 | + allocation to the original pixel count alloted for the width of... | |
8 | + <ID_PKGNAME_COLUMN_HEADING>: ...this column. | |
9 | + (pkgListViewMaker::UpdateItem): Conflate content of original name and | |
10 | + class columns into first column; renumber successive columns. | |
11 | + | |
1 | 12 | 2013-10-18 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 13 | |
3 | 14 | Don't attempt to resolve dependencies for unidentified packages. |
@@ -78,8 +78,7 @@ void AppWindowMaker::InitPackageListView() | ||
78 | 78 | /* Specify the column headings for the package list table. |
79 | 79 | */ |
80 | 80 | { ID_PKGLIST_TABLE_HEADINGS, 20, "" }, |
81 | - { ID_PKGNAME_COLUMN_HEADING, 150, "Package" }, | |
82 | - { ID_PKGTYPE_COLUMN_HEADING, 48, "Class" }, | |
81 | + { ID_PKGNAME_COLUMN_HEADING, 198, "Package" }, | |
83 | 82 | { ID_INSTVER_COLUMN_HEADING, 125, "Installed Version" }, |
84 | 83 | { ID_REPOVER_COLUMN_HEADING, 125, "Repository Version" }, |
85 | 84 | { ID_PKGDESC_COLUMN_HEADING, 400, "Description" }, |
@@ -412,9 +411,10 @@ void pkgListViewMaker::UpdateItem( char *class_name, bool new_entry ) | ||
412 | 411 | * ...and fill in the text for the package name, class name, |
413 | 412 | * and package description columns... |
414 | 413 | */ |
415 | - ListView_SetItemText( ListView, content.iItem, 1, package_name ); | |
416 | - ListView_SetItemText( ListView, content.iItem, 2, class_name ); | |
417 | - ListView_SetItemText( ListView, content.iItem, 5, pkgGetTitle( package ) ); | |
414 | + char name[len]; const char *fmt = "%s-%s"; | |
415 | + sprintf( name, *class_name ? fmt : fmt + 3, package_name, class_name ); | |
416 | + ListView_SetItemText( ListView, content.iItem, 1, name ); | |
417 | + ListView_SetItemText( ListView, content.iItem, 4, pkgGetTitle( package ) ); | |
418 | 418 | } |
419 | 419 | else |
420 | 420 | /* ...otherwise, this is simply a request to update an |
@@ -428,12 +428,12 @@ void pkgListViewMaker::UpdateItem( char *class_name, bool new_entry ) | ||
428 | 428 | * column which identifies the currently installed version, |
429 | 429 | * if any, or clear it if the package is not installed. |
430 | 430 | */ |
431 | - ListView_SetItemText( ListView, content.iItem, 3, buf ); | |
431 | + ListView_SetItemText( ListView, content.iItem, 2, buf ); | |
432 | 432 | |
433 | 433 | /* Finally, fill in the text of the column which identifies |
434 | 434 | * the latest available version of the package. |
435 | 435 | */ |
436 | - ListView_SetItemText( ListView, content.iItem, 4, pkgVersionString( buf, &latest ) ); | |
436 | + ListView_SetItemText( ListView, content.iItem, 3, pkgVersionString( buf, &latest ) ); | |
437 | 437 | } |
438 | 438 | |
439 | 439 | void pkgListViewMaker::Dispatch( pkgXmlNode *package ) |