Robert Collins [Sat, 1 Nov 2003 07:23:47 +0000 (07:23 +0000)]
2003-10-31 Frank Richter <frichter@gmx.li>
* localdir.cc (OnNext): When SelectDirectoryA() fails, display a
message with the error returned from the system instead of just
'could not change dir'. Also, offer the user to 'Retry', 'Ignore' the
error or 'Abort' the directory change.
Robert Collins [Sat, 1 Nov 2003 07:21:28 +0000 (07:21 +0000)]
2003-10-31 Frank Richter <frichter@gmx.li>
* propsheet.cc (PropSheetWndProc): Don't do child resizing if a the
window gets minimized. Otherwise some glitches (e.g. wrong child
sizes) occur.
Added support for WM_GETMINMAXINFO. Prevents the property sheet from
getting smaller than the original size.
* main.cc (HelpOption): New instance.
(main): Added help command line option handling.
* localdir.cc (LocalDirOption): New instance.
(LocalDirSetting::load): allow setting localdir from command line.
Robert Collins [Sun, 26 Oct 2003 19:38:30 +0000 (19:38 +0000)]
2003-10-16 Frank Richter <frichter@gmx.li>
* ControlAdjuster.cc: New file, helper to move elements of a dialog
along when the it's resized.
* ControlAdjuster.h: Ditto.
* Makefile.am: Add new source files.
* proppage.cc (PropertyPage::DialogProc): Adjust some common
controls (Cygwin icon top right, separator below) when a page is
resized.
(PropertyPage::PropertyPage): Dito.
* propsheet.cc (IsDialog): New. Test whether a window is a dialog.
Used internally by resize logic.
(EnumPages): New. Used internally by resize logic: resizes the
property sheet's individual pages.
(PropSheetWndProc): New. Hook for the propery sheet window proc.
(PropSheetProc): More style tweaks, add maximize box and thick border
as well. Hook into the property sheet's window proc.
(PropSheet::AdjustPageSize): New. Adjust the metrics of a single page
to fit nicely into the property sheet. Part of resize logic.
* res.rc (All dialogs): The top-right Cygwin icon and top separator
now have IDs distinct from IDC_STATIC, so their metrics can be
adjusted upon a resize. Also, all those Cygwin icons are at the exact
same spot now.
* choose.cc (ChooserPage::ChooserPage): Now the controls on the
chooser page move/size when the page size is changed.
* choose.h: Dito.
Max Bowsher [Sat, 2 Aug 2003 00:02:01 +0000 (00:02 +0000)]
2003-08-02 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
Changes modified by Max Bowsher <maxb@ukf.net>
* splash.cc (Copyright): Update copyright dates.
(SplashPage::OnInit): Remove call to SetDlgItemFont(). Now handled in
base class.
* proppage.h (PropertyPage::setTitleFont): Declare.
* proppage.cc (Copyright): Update copyright dates.
(PropertyPage::DialogProc WM_INITDIALOG): Move all font setting code,
including that from splash.cc into new function...
(PropertyPage::setTitleFont): Create, using moved code. Change font
"MS Sans Serif" to "MS Shell Dlg" in line with recent res.rc change.
Set font for IDC_STATIC_WELCOME_TITLE here, to allow easy re-use of
style for future "Finished" page.
Max Bowsher [Wed, 30 Jul 2003 21:49:53 +0000 (21:49 +0000)]
2003-07-30 Max Bowsher <maxb@ukf.net>
* ini.cc (do_ini_thread): Return bool.
(do_ini_thread_reflector): Put returned bool in lParam.
* threebar.cc (WM_APP_SETUP_INI_DOWNLOAD_COMPLETE): Rework for new
meaning of lParam. Replace erroneous use of do_fromcwd with
SetActivePageByID (IDD_SOURCE).
Robert Collins [Wed, 30 Jul 2003 09:04:27 +0000 (09:04 +0000)]
2003-07-30 Robert Collins <rbtcollins@hotmail.com>
* ConnectionSetting.cc: New file, persist connection type selection.
* ConnectionSetting.h: Ditto.
* net.cc: Hold a ConnectionSetting instance to trigger the logic.
(NetPage::OnInit): Don't force net_method to any value.
* Makefile.am: Add new source files.
Robert Collins [Wed, 30 Jul 2003 08:44:51 +0000 (08:44 +0000)]
2003-07-30 Robert Collins <rbtcollins@hotmail.com>
* SourceSetting.cc: New file, persist source selection.
* SourceSetting.h: Ditto.
* source.cc: Hold a Source setting instance to trigger the logic.
* Makefile.am: Add new source files.
Max Bowsher [Tue, 29 Jul 2003 14:14:06 +0000 (14:14 +0000)]
2003-07-29 Max Bowsher <maxb@ukf.net>
Based on a patch by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>.
* AntiVirus.cc (AntiVirusPage::wantsActivation): Define.
* AntiVirus.h (AntiVirusPage::wantsActivation): Declare.
* localdir.cc (LocalDirPage::OnBack): Remove logic subsumed by
RootPage::wantsActivation.
* proppage.cc (PropertyPage::DialogProc): Call wantsActivation(),
and skip to next page in sequence if activation is refused.
* proppage.h (PropertyPage::wantsActivation): Default implementation.
* root.cc (RootPage::wantsActivation): Define.
* root.h (RootPage::wantsActivation): Declare.
* source.cc: Don't include "AntiVirus.h".
(SourcePage::OnNext): Remove logic subsumed by
RootPage::wantsActivation.
(SourcePage::OnBack): Remove logic subsumed by
AntiVirusPage::wantsActivation.
* splash.cc: Don't include "AntiVirus.h" or "dialog.h".
(SplashPage::OnNext): Remove - subsumed by
AntiVirusPage::wantsActivation.
* splash.h (SplashPage::OnNext): Remove declaration.
Robert Collins [Tue, 29 Jul 2003 10:48:31 +0000 (10:48 +0000)]
2003-07-29 Robert Collins <rbtcollins@hotmail.com>
* PickView.h (PickView::refresh): New method.
* PickView.cc (PickView::refresh): Extracted from various
ChooserPage callers.
* choose.cc: Use PickView::refresh wherever possible.
Max Bowsher [Tue, 29 Jul 2003 09:54:13 +0000 (09:54 +0000)]
2003-07-29 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
* 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.
Robert Collins [Mon, 28 Jul 2003 08:32:07 +0000 (08:32 +0000)]
2003-07-28 Robert Collins <rbtcollins@hotmail.com>
* package_meta.h (packagemeta::addToCategoryAll): Declare.
* package_meta.cc (packagemeta::addToCategoryAll): New method,
separated to allow clear iteration.
* choose.cc (ChooserPage::fillMissingCategory): BUGFIX: "all" is
meant to be added unconditionally.
Robert Collins [Sun, 27 Jul 2003 13:18:01 +0000 (13:18 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* Generic.h: New file, home for generic programming tools.
(visit_if): Move here from package_meta.cc.
Adjust to be fully parameterised.
* package_meta.h (packagemeta::hasNoCategories): Query for generic
programming.
(packagemeta::setDefaultCategories): set categories for packages
with none.
* package_meta.cc: Move visit_if out. Adjust users for
full paramterised operation.
(packagemeta::hasNoCategories): Implement.
(packagemeta::setDefaultCategories): Implement.
* choose.cc (ChooserPage::fillMissingCategory): Use visit_if to
reduce duplicate code.
(ChooserPage::setExistence): Delete.
* choose.h (ChooserPage::setExistence): Rename to
packagedb::setExistence.
* package_db.h (packagedb::setExistence): Declare.
* package_db.cc (packagedb::setExistence): Copy from choose.cc
Robert Collins [Sun, 27 Jul 2003 10:29:53 +0000 (10:29 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* localdir.h (LocalDirPage::OnInit): Remove.
* localdir.cc (LocalDirPage::OnInit): Move to LocalDirSetting
::load().
(LocalDirSetting::load): Copied from LocalDirPage::OnInit.
* site.h (SitePage::OnInit): Remove.
(SitePage::getSavedSites): New member, replaces get_saved_sites.
(SitePage::registerSavedSite): New member, replaces
register_saved_site.
* site.cc (SitePage::OnInit): Move to SiteSetting::load().
(SiteSetting::load): Copied from SitePage::OnInit.
(SitePage::getSavedSites): Renamed from get_saved_sites.
(SitePage::registerSavedSite): Renamed from register_saved_site.
(do_download_site_info_thread): Don't look at the list size for
determining if the download was successful.
Robert Collins [Sun, 27 Jul 2003 10:13:11 +0000 (10:13 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* choose.h (ChooserPage::setViewMode): Remove HWND from
signature.
(ChooserPage::defaultTrust): Ditto.
Move to PickView.
(ChooserPage::ifChecked): Use Window helper function
IsButtonChecked.
* choose.cc (ChooserPage::setViewMode): Use chooser->GetHWND()
throughout.
Update all callers with new signature.
(ChooserPage::defaultTrust): Ditto.
Move to PickView.
* PickView.h (PickView::defaultTrust): Declare.
* PickView.cc (PickView::defaultTrust): Copy from chooser.cc.
Robert Collins [Sun, 27 Jul 2003 00:47:01 +0000 (00:47 +0000)]
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
* choose.cc (create_listview): Use for_each instead of explicit iteration.
(create_listview): Rename to ChooserPage::createListview.
* package_meta.h (packagemeta::set_requirements): Explicitly separate the 1 and 2 parameter versions. CVS: ----------------------------------------------------------------------
Robert Collins [Sun, 27 Jul 2003 00:12:36 +0000 (00:12 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* String++.h (String::operator !=): Declare for char * and String.
* String++.cc (String::operator !=): Implement.
* package_meta.cc(StringConcatenator): Move above all users.
(_visit_if): Predicate support for visitors.
(packagemeta::getReadableCategoryList): Refactor to use
StringConcatenator with a predicate.
* choose.h: Remove unneeded c++ guards.
Robert Collins [Sat, 26 Jul 2003 13:12:16 +0000 (13:12 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Remove package specific code from choose.cc.
Update copyrights where appropriate.
* choose.cc(ChooserPage::OnNext): Extract logging to
packagemeta::logSelectionStatus.
* package_meta.cc(packagemeta::logSelectionStatus): Extract from
ChooserPage::OnNext.
(StringConcatenator): helper for logSelectionStatus.
(action_caption): Make const.
* package_meta.h(packagemeta): Declare logSelectionStatus.
(packagemeta::action_caption): Make const.
* package_version.cc(packageversion::sourcePackage): Make const.
* package_version.h(packageversion::sourcePackage): Make const.
Robert Collins [Sat, 26 Jul 2003 09:16:51 +0000 (09:16 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Save used local cache dir from initial run of setup, so the user doesn't
need to retype it.
* localdir.h (LocalDirSetting): UserSetting class for the local cache dir.
* localdir.cc (LocalDirSetting::save): Replace save_local_dir, and update callers.
Robert Collins [Sat, 26 Jul 2003 09:01:35 +0000 (09:01 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
Save used site from initial run of setup, so the user doesn't need to
retype it.
* main.cc (main): Load and save all user settings.
* site.cc (SiteSetting::save): Migrate logic from save_site_url.
(SitePage::OnNext): Use ChosenSites.save() to remove uneeded save_site_url call.
(save_site_url): Delete.
* site.h (save_site_url): Remove declaration.
* .cvsignore: Update autoconf generated files.
Robert Collins [Sat, 26 Jul 2003 07:08:44 +0000 (07:08 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* tests/Makefile.am: Driver for test suite.
* tests/UserSettingTest.cc: Test UserSetting interface.
* tests/UserSettingsTest.cc: Test UserSettings interface.
* Makefile.am: Add the tests dir to recurse into.
* configure.in: Ditto.
* UserSetting.h: Add load and save methods to allow global serialisation.
Add explicit copy and assignment operators to prevent synthetics.
Make the constructor protected to prevent direct instantiation.
* UserSettings.h (UserSettings::loadAllSettings): New method.
(UserSettings::savedAllSettings): New method.
* UserSettings.cc: Implement new methods.
* site.cc: Implement stubs for new required UserSetting methods.
* site.h (ChosenSite): Ditto.
* Ran automake.
Robert Collins [Sat, 26 Jul 2003 07:08:43 +0000 (07:08 +0000)]
2003-07-26 Robert Collins <rbtcollins@hotmail.com>
* tests/Makefile.am: Driver for test suite.
* tests/UserSettingTest.cc: Test UserSetting interface.
* tests/UserSettingsTest.cc: Test UserSettings interface.
* Makefile.am: Add the tests dir to recurse into.
* configure.in: Ditto.
* UserSetting.h: Add load and save methods to allow global serialisation.
Add explicit copy and assignment operators to prevent synthetics.
Make the constructor protected to prevent direct instantiation.
* UserSettings.h (UserSettings::loadAllSettings): New method.
(UserSettings::savedAllSettings): New method.
* UserSettings.cc: Implement new methods.
* site.cc: Implement stubs for new required UserSetting methods.
* site.h (ChosenSite): Ditto.
* Ran automake.
Max Bowsher [Sat, 19 Jul 2003 09:29:54 +0000 (09:29 +0000)]
2003-07-18 Max Bowsher <maxb@ukf.net>
* res.rc: Make caption of every dialog page begin with "Cygwin Setup".
This aids recognition when minimized.
Prompted by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>.
Max Bowsher [Sun, 22 Jun 2003 21:30:54 +0000 (21:30 +0000)]
2003-06-22 Max Bowsher <maxb@ukf.net>
* Makefile.am: Clarify comment.
Derive AM_CFLAGS from AM_CXXFLAGS, rather than the other way around.
(AM_CXXFLAGS): Remove -Wmissing-declarations - it is a C-only warning.
(AM_CFLAGS): Add -Winline, and -Wmissing-declarations.
Robert Collins [Sat, 12 Apr 2003 13:18:53 +0000 (13:18 +0000)]
2003-04-12 Robert Collins <rbtcollins@hotmail.com>
* postinstall.cc (RunScript::operator()): Use new run syntax.
* script.h (Script::run): Eliminate to_log parameter.
* script.cc (Script::run): Ditto.
(run_script): Use new run syntax.
Robert Collins [Sat, 12 Apr 2003 00:39:37 +0000 (00:39 +0000)]
2003-04-12 Robert Collins <rbtcollins@hotmail.com>
* PickCategoryLine.cc (PickCategoryLine::click): Tell packagemeta we
are about to perform a visit.
* PickPackageLine.cc (PickPackageLine::click): Tell packagemeta we
are about to perform a visit.
* package_db.cc (packagedb::markUnVisited): Convenience wrapper -
mark all packages as unvisited.
* package_db.h (packagedb::markUnVisited): Declare.
* package_meta.cc (packagemeta::PrepareForVisit): New static method
to prepare for a loop-free visit.
(packagemeta::packagemeta): Adjust for new member.
(packagemeta::set_requirements): Only visit a node once.
(packagemeta::visited): Get and Set methods for new member visited_.
* package_meta.h (packagemeta::PrepareForVisit): Declare.
(packagemeta::visited): Declare.
(packagemeta::visited_): Declare.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultDACL): Adjust commented code for auto_ptr use.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::NoteFailedAPI): Helper function.
Use throughout NTSecurity routines.
(NTSecurity::setDefaultDACL): Use dynamic memory for ACL storage.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultDACL): Disable ~ 50% of remaining active code.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::GroupInfo): Extract group query code.
(NTSecurity::setDefaultDACL): Disable ~ 50% of code.
2003-04-02 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Disable ~ 50% of security code.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Remove double declaration of sz.
User TokenGroupCollection to abstract token searching logic, eliminate isadmin
and isuser temporary variables.
(TokenGroupCollection): New class for querying token group information.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (NTSecurity::setDefaultSecurity): Extract esid initialisation.
Move local variables to just before first use.
SetTokenInformationFailures where being handled inconsistently.
Remove assignments from if statements.
(NTSecurity::esid): Rename to everyOneSID.
(NTSecurity::initialiseEveryOneSID): new method.
(NTSecurity::setDefaultDACL): Extract method for default DACL logic.
2003-04-01 Robert Collins <rbtcollins@hotmail.com>
* main.cc (SIDWrapper): Manage SID memory.
(HANDLEWrapper): Likewise for HANDLES.
(NTSecurity): Worker class for set_default_sec().
(set_default_sec): Move body into NTSecurity::setDefaultSecurity().
(NTSecurity::setDefaultSecurity): Eliminate goto out: via memory managing objects.
Robert Collins [Wed, 26 Mar 2003 10:02:04 +0000 (10:02 +0000)]
2003-03-26 Robert Collins <rbtcollins@hotmail.com>
* package_version.cc (_defaultversion::accessible): Override and make always false.
(_packageversion::accessible): Fix a couple of logic bugs resulting in incorrect trues.
* package_version.h (_packageversion::accessible): Make virtual.
Max Bowsher [Tue, 25 Mar 2003 20:57:13 +0000 (20:57 +0000)]
2003-03-25 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* threebar.h (WM_APP_START_POSTINSTALL): New message.
(WM_APP_POSTINSTALL_THREAD_COMPLETE): New message.
* threebar.cc (ThreeBarProgressPage::OnMessageApp):
Add handling for WM_APP_START_POSTINSTALL and
WM_APP_POSTINSTALL_THREAD_COMPLETE.
* install.cc (do_install_thread): Set next_dialog to
IDD_S_POSTINSTALL.
* desktop.cc (DesktopSetupPage::OnFinish): Move the
do_postinstall call to ThreeBarProgressPage::OnMessageApp.
* script.h (Script::fullName): New member function.
(Script::run): New member function.
(Script::ETCPostinstall): New static member constant.
* script.cc (Script::fullName): Implement.
(Script::run): Implement.
(Script::ETCPostinstall): Define.
(Script::isAScript): Use ETCPostinstall instead of a
hardcoded string constant.
(run): Enable "#if 0"'d code.
* postinstall.cc (Progress): New extern variable.
(RunFindVisitor::visitFile): Add script to vector
instead of running.
(RunFindVisitor::_scripts): New member variable.
(RunScript): New helper class for use in for_each.
(do_postinstall_thread): Rename do_postinstall to. Add
Progress bar and text setting. Add package count.
(do_postinstall_reflector): New static function.
(do_postinstall): Rename to do_postinstall_thread.
Create a thread instead.
Max Bowsher [Thu, 20 Mar 2003 10:02:51 +0000 (10:02 +0000)]
2003-03-18 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* script.cc (run): Add file_out parameter.
Redirect output of subprocess to file, creating the
path if necessary. Minimize the script window.
(run_script): Add optional to_log boolean parameter.
If to_log, redirect output to temporary file and then
import it into LOG_BABBLE.
(OutputLog): New helper class.
(operator<<): New operation on OutputLog.
* script.h (run_script): Add optional to_log parameter.
* postinstall.cc (RunFindVisitor::visitFile): Instruct
run_script() to log script output.
(do_postinstall): Ditto.
Robert Collins [Wed, 19 Mar 2003 00:14:46 +0000 (00:14 +0000)]
2003-03-19 Robert Collins <rbtcollins@hotmail.com>
* configure.in: Bump version number.
* Makefile.am: Add DefaultFormatter.h to installed files.
* src/OptionSet.cc (OptionSet::ParameterUsage): Use new
default DefaultFormatter to format parameters.
* include/getopt++/OptionSet.h: Update copyright.
* include/getopt++/DefaultFormatter.h: Format the help from an Option.
* tests/testoption.cc: Include a -h|--help option to test help
formatting.
Insert copyright statement.
* tests/optioniterator.cc: Insert copyright statement.
Max Bowsher [Tue, 18 Mar 2003 22:43:15 +0000 (22:43 +0000)]
2003-03-18 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* postinstall.cc (do_postinstall): Filter out '*.done'.
* FilterVisitor.h: New header file. Declare the
FilterVisitor, Filter, and ExcludeNameFilter classes.
* FilterVisitor.cc: New file. Implement FilterVisitor,
Filter, and ExcludeNameFilter.
* String++.h (String::matches): New instance function.
* String++.cc (String::matches): Implement.
(strmatch) Import and adapt for <buf,len> strings.
* Makefile.am (setup_SOURCES): Add FilterVisitor.cc and
FilterVisitor.h to value.
Max Bowsher [Tue, 18 Mar 2003 14:53:09 +0000 (14:53 +0000)]
2002-03-18 Max Bowsher <maxb@ukf.net>
* LogFile.cc (LogFile::exit): Use CRT exit() instead of ExitProcess().
Use passed exit_code even if been_here.
Remove incorrect _CYGWIN_ preprocessor conditional.