...this straightforward patch:
2003-07-28 Gary R. Van Sickle <[EMAIL PROTECTED]>
* dialog.h (do_fromcwd): Change function declaration.
* fromcwd.cc (do_fromcwd): Change return type to bool. Eliminate
use of next_dialog, return true or false instead.
* localdir.cc (LocalDirPage::OnNext): Use do_fromcwd()'s return
value instead of next_dialog.
--
Gary R. Van Sickle
Brewer. Patriot.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gary R. Van Sickle
> Sent: Monday, July 28, 2003 9:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PATCH] next_dialog micropatch (3) (was: RE: [setup PATCH]
> next_dialog micropatch (2))
>
>
> > Another cleanup patch. The remaining user of next_dialog, do_fromcwd,
> > requires slightly more invasive refactoring, hence is not included with
> > these changes.
>
> Huh??? Doesn't this straightforward patch do it?:
>
> 2003-07-28 Gary R. Van Sickle <[EMAIL PROTECTED]>
> * fromcwd.cc (do_fromcwd): Change return type to bool. Eliminate
> use of next_dialog, return true or false instead.
> * localdir.cc (LocalDirPage::OnNext): Use do_fromcwd()'s return
> value instead of next_dialog.
> --
> Gary R. Van Sickle
> Brewer. Patriot.
>
Index: dialog.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/dialog.h,v
retrieving revision 2.9
diff -p -u -b -r2.9 dialog.h
--- dialog.h 23 Jul 2003 22:28:30 -0000 2.9
+++ dialog.h 29 Jul 2003 03:45:02 -0000
@@ -33,7 +33,7 @@ extern int exit_msg;
/* prototypes for all the do_* functions (most called by main.cc) */
D (do_download);
-D (do_fromcwd);
+bool do_fromcwd(HINSTANCE _h, HWND owner);
D (do_ini);
D (do_install);
D (do_postinstall);
Index: fromcwd.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/fromcwd.cc,v
retrieving revision 2.27
diff -p -u -b -r2.27 fromcwd.cc
--- fromcwd.cc 19 May 2002 12:54:16 -0000 2.27
+++ fromcwd.cc 29 Jul 2003 03:45:03 -0000
@@ -71,7 +71,7 @@ private:
bool found;
};
-void
+bool
do_fromcwd (HINSTANCE h, HWND owner)
{
// Assume we won't find the INI file.
@@ -80,15 +80,12 @@ do_fromcwd (HINSTANCE h, HWND owner)
if (found_ini)
{
// Found INI, load it.
- next_dialog = IDD_S_LOAD_INI;
- return;
+ return true;
}
- next_dialog = IDD_CHOOSE;
-
IniParseFeedback myFeedback;
IniDBBuilderPackage myBuilder(myFeedback);
ScanFindVisitor myVisitor (myBuilder);
Find(".").accept(myVisitor);
- return;
+ return false;
}
Index: localdir.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/localdir.cc,v
retrieving revision 2.13
diff -p -u -b -r2.13 localdir.cc
--- localdir.cc 26 Jul 2003 09:16:51 -0000 2.13
+++ localdir.cc 29 Jul 2003 03:45:03 -0000
@@ -198,13 +198,14 @@ LocalDirPage::OnNext ()
{
if (source == IDC_SOURCE_CWD)
{
- do_fromcwd (GetInstance (), GetHWND ());
- if (next_dialog == IDD_S_LOAD_INI)
+ bool found_ini;
+ found_ini = do_fromcwd (GetInstance (), GetHWND ());
+ if (found_ini)
{
Progress.SetActivateTask (WM_APP_START_SETUP_INI_DOWNLOAD);
return IDD_INSTATUS;
}
- return next_dialog;
+ return IDD_CHOOSE;
}
}
else