From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7161 invoked by alias); 22 Nov 2016 16:00:30 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 7131 invoked by uid 9795); 22 Nov 2016 16:00:29 -0000 Date: Tue, 22 Nov 2016 16:00:00 -0000 Message-ID: <20161122160023.7028.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program used to install Cygwin and keep it up to date] branch master, updated. release_2.876-6-gc938e8a X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 74affc6d6ed9a79c6d8bfa7b2797c950be510b4b X-Git-Newrev: c938e8a6ac5318c6c73b7cd02cc59a58c2db5f4e X-SW-Source: 2016-q4/txt/msg00008.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=c938e8a6ac5318c6c73b7cd02cc59a58c2db5f4e commit c938e8a6ac5318c6c73b7cd02cc59a58c2db5f4e Author: Jon Turney Date: Fri Sep 16 19:53:53 2016 +0100 Simplify PickView::insert_pkg This is only called from PickView::setViewMode(), and only when view_style is not views::Category, so checking that again is redundant. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=903087fe3accd7e5481da11bccca38270ab2c77a commit 903087fe3accd7e5481da11bccca38270ab2c77a Author: Jon Turney Date: Sun Sep 11 22:09:27 2016 +0100 Start chooser in "Pending" view if this is not a first time installation Signed-off-by: Jon Turney https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=4ab6879c5cd4776125ab9a22d865f2ab2c51c9d8 commit 4ab6879c5cd4776125ab9a22d865f2ab2c51c9d8 Author: Jon Turney Date: Fri Aug 26 11:03:22 2016 +0100 Ignore malformed lines in a site-list Ignore malformed lines in a site-list, rather than crashing Signed-off-by: Jon Turney https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8d19db381efe6534016c929c96d0e0435140cf56 commit 8d19db381efe6534016c929c96d0e0435140cf56 Author: Jon Turney Date: Fri Aug 26 10:19:10 2016 +0100 Fix validation in RootPage RootPage is supposed to disable the next button if the rootdir edit box is empty, but this currently doesn't work. Signed-off-by: Jon Turney https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=25189bd24aef85e690cb8fa88b16104ff30387b1 commit 25189bd24aef85e690cb8fa88b16104ff30387b1 Author: Jon Turney Date: Wed Sep 7 17:54:26 2016 +0100 Give search edit box autohscroll style This enables searching for package names longer than will fit in the edit box, by allowing the text in the edit box to horizontally scroll... Signed-off-by: Jon Turney Diff: --- PickView.cc | 26 +++----------------------- choose.cc | 3 ++- ini.h | 1 + main.cc | 1 + res.rc | 2 +- root.cc | 24 ++++++++++++++++++------ root.h | 4 ++++ site.cc | 5 +++++ 8 files changed, 35 insertions(+), 31 deletions(-) diff --git a/PickView.cc b/PickView.cc index fc6f8c2..3de49f7 100644 --- a/PickView.cc +++ b/PickView.cc @@ -278,29 +278,9 @@ PickView::insert_pkg (packagemeta & pkg) { if (!showObsolete && isObsolete (pkg.categories)) return; - - if (view_mode != views::Category) - { - PickLine & line = *new PickPackageLine (*this, pkg); - contents.insert (line); - } - else - { - for (set ::const_iterator x - = pkg.categories.begin (); x != pkg.categories.end (); ++x) - { - // Special case - yuck - if (casecompare(*x, "All") == 0) - continue; - - packagedb db; - PickCategoryLine & catline = - *new PickCategoryLine (*this, *db.categories.find (*x), 1); - PickLine & line = *new PickPackageLine(*this, pkg); - catline.insert (line); - contents.insert (catline); - } - } + + PickLine & line = *new PickPackageLine (*this, pkg); + contents.insert (line); } void diff --git a/choose.cc b/choose.cc index 6563cb3..aa1d8e9 100644 --- a/choose.cc +++ b/choose.cc @@ -40,6 +40,7 @@ static const char *cvsid = #include #include +#include "ini.h" #include "dialog.h" #include "resource.h" #include "state.h" @@ -151,7 +152,7 @@ ChooserPage::createListview () exit (11); chooser->init(PickView::views::Category); chooser->Show(SW_SHOW); - chooser->setViewMode (UpgradeAlsoOption || hasManualSelections ? + chooser->setViewMode (!is_new_install || UpgradeAlsoOption || hasManualSelections ? PickView::views::PackagePending : PickView::views::Category); SendMessage (GetDlgItem (IDC_CHOOSE_VIEW), CB_SETCURSEL, (WPARAM)chooser->getViewMode(), 0); diff --git a/ini.h b/ini.h index 7f6db22..3072637 100644 --- a/ini.h +++ b/ini.h @@ -24,6 +24,7 @@ typedef std::vector IniList; extern IniList found_ini_list, setup_ext_list; const std::string setup_exts[] = { "xz", "bz2", "ini" }; extern bool is_64bit; +extern bool is_new_install; extern std::string SetupArch; extern std::string SetupIniDir; extern std::string SetupBaseName; diff --git a/main.cc b/main.cc index fbf12fb..6332920 100644 --- a/main.cc +++ b/main.cc @@ -84,6 +84,7 @@ extern char **_argv; #endif bool is_64bit; +bool is_new_install = false; std::string SetupArch; std::string SetupIniDir; diff --git a/res.rc b/res.rc index c20c210..1227418 100644 --- a/res.rc +++ b/res.rc @@ -341,7 +341,7 @@ BEGIN RTEXT "&Search", IDC_STATIC, SETUP_SEARCH_X, 33, SETUP_SEARCH_W, 10, SS_CENTERIMAGE, WS_EX_RIGHT EDITTEXT IDC_CHOOSE_SEARCH_EDIT, SETUP_SEARCHTEXT_X, 30, - SETUP_SEARCHTEXT_W, 14 + SETUP_SEARCHTEXT_W, 14, ES_AUTOHSCROLL PUSHBUTTON "&Clear", IDC_CHOOSE_CLEAR_SEARCH, SETUP_CLEAR_X, 30, SETUP_CLEAR_W, 14 CONTROL "&Keep", IDC_CHOOSE_KEEP, "Button", BS_AUTORADIOBUTTON diff --git a/root.cc b/root.cc index ec2588a..1fa562f 100644 --- a/root.cc +++ b/root.cc @@ -39,6 +39,7 @@ static const char *cvsid = #include "msg.h" #include "package_db.h" #include "mount.h" +#include "propsheet.h" #include "getopt++/StringOption.h" @@ -64,11 +65,14 @@ static int su[] = { IDC_ROOT_SYSTEM, IDC_ROOT_USER, 0 }; static string orig_root_dir; -static void -check_if_enable_next (HWND h) +void +RootPage::check_if_enable_next (HWND h) { - EnableWindow (GetDlgItem (h, IDOK), - egetString (h, IDC_ROOT_DIR).size() && root_scope); + DWORD ButtonFlags = PSWIZB_BACK; + // if there's something in the root dir box, and we have a scope, enable next + if (egetString (h, IDC_ROOT_DIR).size() && root_scope) + ButtonFlags |= PSWIZB_NEXT; + GetOwner ()->SetButtons (ButtonFlags); } static void @@ -76,7 +80,6 @@ load_dialog (HWND h) { rbset (h, su, root_scope); eset (h, IDC_ROOT_DIR, get_root_dir ()); - check_if_enable_next (h); } static void @@ -200,7 +203,10 @@ directory_contains_wrong_version (HWND h) /* Probably new installation */ if (!GetBinaryType (cygcheck_exe.c_str (), &type)) - return 0; + { + is_new_install = true; + return 0; + } /* 64 bit setup and 64 bit inst? */ if (type == SCS_32BIT_BINARY && !is_64bit) return 0; @@ -269,6 +275,12 @@ RootPage::OnInit () load_dialog (GetHWND ()); } +void +RootPage::OnActivate () +{ + check_if_enable_next (GetHWND ()); +} + bool RootPage::wantsActivation() const { diff --git a/root.h b/root.h index 6e89fb9..326a930 100644 --- a/root.h +++ b/root.h @@ -16,9 +16,13 @@ public: virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code); virtual void OnInit (); virtual bool wantsActivation() const; + virtual void OnActivate (); virtual long OnNext (); virtual long OnBack (); virtual long OnUnattended (); + + private: + void check_if_enable_next (HWND h); }; #endif /* SETUP_ROOT_H */ diff --git a/site.cc b/site.cc index 677672e..1485096 100644 --- a/site.cc +++ b/site.cc @@ -281,6 +281,11 @@ load_site_list (SiteList& theSites, char *theString) } } } + + /* Ignore malformed lines */ + if (!semi || !semi2 || !semi3) + continue; + site_list_type newsite (bol, semi, semi2, semi3); SiteList::iterator i = find (theSites.begin(), theSites.end(), newsite);