From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21113 invoked by alias); 18 Nov 2016 16:47:29 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 21045 invoked by uid 89); 18 Nov 2016 16:47:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=D*dronecode.org.uk, D*org.uk, Pending, sk:jontur X-HELO: rgout0705.bt.lon5.cpcloud.co.uk Received: from rgout0705.bt.lon5.cpcloud.co.uk (HELO rgout0705.bt.lon5.cpcloud.co.uk) (65.20.0.145) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 16:47:19 +0000 X-OWM-Source-IP: 31.51.207.247 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-Junkmail-Premium-Raw: score=7/50,refid=2.7.2:2016.11.18.162417:17:7.944,ip=,rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_CC_HDR, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __IN_REP_TO, __REFERENCES, __FROM_DOMAIN_IN_ANY_CC1, __ANY_URI, __URI_NO_WWW, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FROM_DOMAIN_IN_RCPT, IN_REP_TO, __MIME_TEXT_P, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __CC_REAL_NAMES, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from localhost.localdomain (31.51.207.247) by rgout07.bt.lon5.cpcloud.co.uk (9.0.019.07.01-1) (authenticated as jonturney@btinternet.com) id 581B49A30198DCC3; Fri, 18 Nov 2016 16:47:16 +0000 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 4/5] Start chooser in "Pending" view if this is not a first time installation Date: Fri, 18 Nov 2016 16:47:00 -0000 Message-Id: <20161118164646.209716-5-jon.turney@dronecode.org.uk> In-Reply-To: <20161118164646.209716-1-jon.turney@dronecode.org.uk> References: <20161118164646.209716-1-jon.turney@dronecode.org.uk> X-SW-Source: 2016-11/txt/msg00007.txt.bz2 Signed-off-by: Jon Turney --- choose.cc | 3 ++- ini.h | 1 + main.cc | 1 + root.cc | 5 ++++- 4 files changed, 8 insertions(+), 2 deletions(-) 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/root.cc b/root.cc index 695590a..1fa562f 100644 --- a/root.cc +++ b/root.cc @@ -203,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; -- 2.8.3