[PATCH setup 09/13] Use an icon to represent expanded/collapsed state

2018-08-05 Thread Jon Turney
Use a listview icon to represent expanded/collapsed state, rather than puttting '[+]'/'[-]' in front of the category name Just use the item icon directly to represent expanded/collapsed state, rather than using a state icon as otherwise we have empty space where the item icon would be, when it's

[PATCH setup 08/13] Show the count of packages in a category

2018-08-05 Thread Jon Turney
--- PickCategoryLine.cc | 8 ++-- PickCategoryLine.h | 4 +++- PickView.cc | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/PickCategoryLine.cc b/PickCategoryLine.cc index ec15b4a..736e3c6 100644 --- a/PickCategoryLine.cc +++ b/PickCategoryLine.cc @@ -18,14

[PATCH setup 07/13] Custom draw popup menus in ListView control

2018-08-05 Thread Jon Turney
Construct a menu containing the actions from the action list for the package or category, and if one is selected, apply it. This lets us remove packagemeta::set_action() which implements the strange UX of cycling around actions without showing what the possibilities are. This somewhat emulates a

[PATCH setup 03/13] Drop 'using namespace std;' from PickView.cc

2018-08-05 Thread Jon Turney
--- PickView.cc | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/PickView.cc b/PickView.cc index c583eea..57e8f85 100644 --- a/PickView.cc +++ b/PickView.cc @@ -28,8 +28,6 @@ #include "LogSingleton.h" #include "Exception.h" -using namespace std; - static

[PATCH setup 02/13] Add OnNotify virtual function to class Window for WM_NOTIFY notifications

2018-08-05 Thread Jon Turney
Add OnNotify virtual function to class Window for WM_NOTIFY notifications Note that the result is returned via DWLP_MSGRESULT --- proppage.cc | 14 +- window.h| 7 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/proppage.cc b/proppage.cc index

[PATCH setup 01/13] Change packagemeta::_actions to an enum

2018-08-05 Thread Jon Turney
--- PickCategoryLine.cc | 6 +++--- package_meta.cc | 35 +++ package_meta.h | 29 + 3 files changed, 19 insertions(+), 51 deletions(-) diff --git a/PickCategoryLine.cc b/PickCategoryLine.cc index 24fecb3..e428419 100644 ---

[PATCH setup 00/13] ListView Package Chooser

2018-08-05 Thread Jon Turney
Drag setup into the 1990s, by replacing the custom-drawn package chooser with a ListView common control. As well as removing a lot of Win32 GDI drawing, this also enables the following improvements to be much more straightforward: * Use standard UI elements to choose an action to take on a

[PATCH setup 06/13] Add methods for listing possible actions on, and applying one to, a package

2018-08-05 Thread Jon Turney
The 'action id' is a value of the _actions enum, if positive, otherwise it's absolute value is a 0-based index into the 'versions' collection to identify a specific version to install. v2: Fix select_action() to consider deftrust v3: Fix select_action() for keep --- ActionList.h| 55

[PATCH setup 04/13] Use a ListView common control rather than a hand-built grid

2018-08-05 Thread Jon Turney
Each line is implemented by an object of a subclass of ListViewLine, either PickPackageLine, or (in catgeory view) PickCategoryLine v2: Defer constructing category tree until packagedb is available Also handle an empty category tree Remove unused bitmaps Scoping of strings returned to

[PATCH setup 05/13] Custom draw checkboxes in ListView control

2018-08-05 Thread Jon Turney
Future work: What does this look like when a theme is in used? Does the row size need to be slightly adjusted to ensure it accomodates checkbox height? v2: erase to background colour before drawing checkbox --- ListView.cc | 63 + ListView.h |

[PATCH setup 13/13] Add ldesc tooltips to sdesc column of listview

2018-08-05 Thread Jon Turney
Listview's built-in tooltip support doesn't support subitems, so we have to build our own v2: Use string cache --- ListView.cc | 94 + ListView.h | 4 ++ PickCategoryLine.cc | 6 +++ PickCategoryLine.h | 1 + PickPackageLine.cc |

[PATCH setup 10/13] Use indents in category view

2018-08-05 Thread Jon Turney
We keep around an empty imagelist for 1x1 images, to reset the indent when not in tree view mode (This isn't quite right as the listview will allocate a 1-pixel space before column 0 for those images, but this seems the best we can do as 0x0 imagelists aren't allowed...) --- ListView.cc

[PATCH setup 11/13] Add LDesc() accessor method to SolvableVersion

2018-08-05 Thread Jon Turney
--- libsolv.cc | 14 ++ libsolv.h | 1 + 2 files changed, 15 insertions(+) diff --git a/libsolv.cc b/libsolv.cc index 955a1b2..ba54fc5 100644 --- a/libsolv.cc +++ b/libsolv.cc @@ -192,6 +192,20 @@ SolvableVersion::SDesc () const return sdesc; } +const std::string

[PATCH setup 12/13] Restore packagemeta::LDesc()

2018-08-05 Thread Jon Turney
--- package_meta.cc | 15 +++ package_meta.h | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/package_meta.cc b/package_meta.cc index 4f7d39a..85aaaf9 100644 --- a/package_meta.cc +++ b/package_meta.cc @@ -404,6 +404,21 @@ packagemeta::SDesc () const