Patch: Setup.exe - search for package

Dave Korn dave.korn.cygwin@googlemail.com
Wed Apr 1 15:40:00 GMT 2009


Dave Korn wrote:
> Dave Korn wrote:
>> Andrew Punch wrote:
>>> Hi,
>>> 
>>> I have attached a patch for searching packages in the package selection
>>>  screen. The patch is against version 2.573.2.3 - I couldn't get the
>>> CVS head to build due to a libtool version problem.
>> Thanks for contributing this.  I'm currently up-porting it to CVS HEAD
>> and giving it some testing.  

>  I think the search box needs a label attached and a tool-tip, and IMO I
> think it might look nicer if it was left-aligned away from the view
> controls; what do you (and everyone else) think?  

  So, I've up-ported to HEAD, adjusted coding style to match its surroundings,
slightly restructured a couple of bits, and added a label and tool-tip and
left-aligned it.  The result is attached for whoever else would like to test it.

  One consequence of doing this is that it draws attention to the fact we need
to implement minimum window size dimensions for the chooser page; it's bad
enough that you can shrink it down far enough that controls slide off the
left-hand edge, but it looks even uglier when the right-aligned controls start
to slide over the left-aligned ones.  If that sounds like the right thing to
do, I'll roll a patch.

> Secondly, every time you
> change the search-box contents in the category view, it collapses all
> expanded categories; I'd like to avoid that if we can, but haven't yet
> looked to see how.

  I decided not to go any further into this one for now, because it's only the
same behaviour that all the other buttons display when using the category
view.  Maybe we'll fix it later, maybe it will prove less tractable, but it's
another patch for another day.

  Revised changelog follows.  What do you think, everyone: OK for HEAD?

2009-03-27  Andrew Punch  <andrew@xxxxxxxxxxxxx.xxx.xx>

	* PickView.h:  Add #include <string>.
	(PickView::SetPackageFilter):  Add new function.
	(PickView::packageFilterString):  Add new string data member.
	* PickView.cc (PickView::setViewMode):  Use it to filter names.
	(PickView::insert_category):  Likewise.
	(PickView::PickView):  Initialise packageFilterString to blank.
	* res.rc (IDD_CHOOSE):  Add IDC_CHOOSE_SEARCH_EDIT and
	IDC_CHOOSE_SEARCH_LABEL controls.
	(IDS_SEARCH_TOOLTIP):  Add new string resource.
	* resource.h (IDS_SEARCH_TOOLTIP):  New string resource ID.
	(IDC_CHOOSE_SEARCH_EDIT):  New edit control ID.
	(IDC_CHOOSE_SEARCH_LABEL):  Mew static text control ID.
	* choose.cc (ChooserControlsInfo[]):  Add IDC_CHOOSE_SEARCH_LABEL
	and IDC_CHOOSE_SEARCH_EDIT controls to auto-resize list.
	(ChooserPage::OnInit):  Add tooltip to search edit box.
	(ChooserPage::OnMessageCmd):  Handle EN_CHANGE event from
	IDC_CHOOSE_SEARCH_EDIT.


    cheers,
      DaveK

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: setup-package-search-revised.diff
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20090401/83c75e05/attachment.ksh>


More information about the Cygwin-apps mailing list