• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-get: Commit

The MinGW.org Installation Manager Tool


Commit MetaInfo

Revision932043065231353133be977f3b6534028fea0467 (tree)
Time2013-11-27 08:18:01
AuthorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Log Message

Conflate name and class columns in GUI package list.

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
112 2013-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
213
314 Don't attempt to resolve dependencies for unidentified packages.
--- a/src/pkglist.cpp
+++ b/src/pkglist.cpp
@@ -78,8 +78,7 @@ void AppWindowMaker::InitPackageListView()
7878 /* Specify the column headings for the package list table.
7979 */
8080 { 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" },
8382 { ID_INSTVER_COLUMN_HEADING, 125, "Installed Version" },
8483 { ID_REPOVER_COLUMN_HEADING, 125, "Repository Version" },
8584 { ID_PKGDESC_COLUMN_HEADING, 400, "Description" },
@@ -412,9 +411,10 @@ void pkgListViewMaker::UpdateItem( char *class_name, bool new_entry )
412411 * ...and fill in the text for the package name, class name,
413412 * and package description columns...
414413 */
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 ) );
418418 }
419419 else
420420 /* ...otherwise, this is simply a request to update an
@@ -428,12 +428,12 @@ void pkgListViewMaker::UpdateItem( char *class_name, bool new_entry )
428428 * column which identifies the currently installed version,
429429 * if any, or clear it if the package is not installed.
430430 */
431- ListView_SetItemText( ListView, content.iItem, 3, buf );
431+ ListView_SetItemText( ListView, content.iItem, 2, buf );
432432
433433 /* Finally, fill in the text of the column which identifies
434434 * the latest available version of the package.
435435 */
436- ListView_SetItemText( ListView, content.iItem, 4, pkgVersionString( buf, &latest ) );
436+ ListView_SetItemText( ListView, content.iItem, 3, pkgVersionString( buf, &latest ) );
437437 }
438438
439439 void pkgListViewMaker::Dispatch( pkgXmlNode *package )
Show on old repository browser