Brian Dessent [Mon, 30 Jul 2007 22:55:50 +0000 (22:55 +0000)]
* CHANGES: Update.
* configure.in (AM_INIT_AUTOMAKE): Enable more automake warnings.
* Makefile.am (INCLUDES): Use AM_CPPFLAGS instead.
(CLEANFILES): Add. Minor portability tweaks.
* tests/Makefile.am (INCLUDES): Use AM_CPPFLAGS instead.
* archive.cc (archive::extract): Try to be more compatible when
opening tar files.
* compress_bz.cc: Fix whitespace throughout.
(compress_bz::~compress_bz): Ensure that underlying io_stream's dtor is
also run.
* install.cc (Installer::installOne): Refactor.
* package_db.cc (ConnectedLoopFinder::doIt): Move some log spewage into
setup.log.full from setup.log.
(packagedb::connectedBegin): Ditto. Consolidate log output to one line.
Brian Dessent [Wed, 27 Jun 2007 01:41:46 +0000 (01:41 +0000)]
* Makefile.am (release): Drop inconsistent use of $(EXEEXT). Leave an
untouched copy of setup.exe so that later make invocations don't
unnecessarily rebuild it.
(snapshot): Fix typo.
* install.cc (md5_one): Don't try to check packages whose
pkgsource.Cached () is NULL, as with those whose download failed.
Brian Dessent [Wed, 30 May 2007 09:49:24 +0000 (09:49 +0000)]
* find.h (class Find): Make _start_dir non-const.
* find.cc (Find::Find): Append a trailing slash to _start_dir only if
it does not already contain one.
(Find::accept): Use the previously stored value of _start_dir rather
than unconditionally appending a slash.
Brian Dessent [Wed, 30 May 2007 05:53:02 +0000 (05:53 +0000)]
* Makefile.am: No need to specify the default value of --preprocessor
to windres. Rework the automatic version extraction rules so that the
source tarball is generated with the proper name and directory instead
of setup-0. Update snapshot rule to also upload a copy of the binary
with debugging symbols still present.
Brian Dessent [Wed, 30 May 2007 05:12:20 +0000 (05:12 +0000)]
This is a general tidying up/modernization of the build infrastructure.
Renaming the lexer and parser to .ll and .yy allows using automake's
builtin support for flex and bison with C++ sources, and libinilex is a
slightly cleaner way of omitting -Werror.
* Makefile.am (AUTOMAKE_OPTIONS): Move to AM_INIT_AUTOMAKE.
(AM_YFLAGS): Define.
(AM_LFLAGS): Define.
(INCLUDES): Remove redundant mingw directory.
(EXTRA_DIST): Adjust for newly named lexer/parser.
(BUILT_SOURCES): Ditto.
(inilint_LDADD): Ditto.
(inilint_SOURCES): Ditto.
(setup_LDADD): Ditto.
(setup_SOURCES): Ditto.
(iniparse.cc): Remove custom rules.
(inilex.cc): Ditto.
* configure.in: Update quoting and use modern form of AC_INIT and
AM_INIT_AUTOMAKE.
* inilex.l: Rename from this ...
* inilex.ll: ... to this.
* iniparse.y: Rename from this ...
* iniparse.yy: ... to this.
Brian Dessent [Wed, 30 May 2007 03:49:48 +0000 (03:49 +0000)]
* IniParseFindVisitor.cc (IniParseFindVisitor::IniParseFindVisitor):
Remove error_buf and error_count initializers.
(IniParseFindVisitor::visitFile): Store filename in current_ini_name.
Use yyerror_count and yyerror_messages in place of removed error_count
and error_buf members.
* IniParseFindVisitor.h (class IniParseFindVisitor): Remove error_buf
and error_count members.
* ini.cc: Include io_stream_memory.h. Remove file static variables
error_buf, error_count, and ini_filename.
(GuiParseFeedback::progress): Remove some verbose log spam.
(do_remote_ini): Recode .ini-fetching logic to properly display parse
errors, and to account for corrupt bzip2 files.
(yyerror): Moved elsewhere.
(fprintf): Delete unused function.
* ini.h: Remove useless __cplusplus guard. Declare extern variables
current_ini_name, yyerror_messages, and yyerror_count.
* inilex.l: Add current_ini_name, yyerror_messages, and
yyerror_count.
(ini_init): Initialize new variables.
(yybol): Delete.
(yyerror): Reimplement using std::string and relocate from ini.cc.
* io_stream.cc (io_stream::copy): Add clarifying comment.
Igor Peshansky [Fri, 4 May 2007 21:56:53 +0000 (21:56 +0000)]
2007-05-04 Igor Peshansky <pechtcha@cs.nyu.edu>
* resource.h (IDC_STATIC_HEADER): New control id.
* res.rc (IDD_SPLASH): Adjust the copyright.
(IDD_DESKTOP): Make header text accessible as a separate control.
* desktop.cc (set_status): Use eset() instead of SetWindowText().
(load_dialog): Disable checkboxes and change dialog text in
download-only mode.
(DesktopSetupPage::OnInit): Disable checkboxes in download-only
mode.
* threebar.cc (ThreeBarProgressPage::OnMessageApp): Deprecate the
default fallthrough.
* download.cc (do_download_thread): Explicitly return the next
dialog.
Igor Peshansky [Fri, 30 Mar 2007 22:18:34 +0000 (22:18 +0000)]
2007-03-29 Igor Peshansky <pechtcha@cs.nyu.edu>
* LogFile.cc (LogFile::exit): Write exit_msg directly to log, without
the message box.
* resource.h (IDC_DESKTOP_SEPARATOR,IDC_STATUS_HEADER,IDC_STATUS): New
control ids.
* res.rc (IDD_DESKTOP): Change the caption. Add status information.
* desktop.h (DesktopSetupPage::DesktopSetupPage): Define constructor
in the implementation.
* desktop.cc (DesktopControlsInfo): Position specifiers for status
information items.
(DesktopSetupPage::DesktopSetupPage): Register position specifiers.
(set_status): New static method.
(load_dialog): Set status information, if available.
(DesktopSetupPage::OnInit): Set status header font.
Brian Dessent [Wed, 28 Feb 2007 00:55:04 +0000 (00:55 +0000)]
2007-02-27 Brian Dessent <brian@dessent.net>
* ini.h (SETUP_INI_FILENAME): Add define.
(SETUP_BZ2_FILENAME): Add define.
* IniParseFindVisitor.cc (IniParseFindVisitor::visitFile): Use
above macros to parameterize setup.ini filename.
* fromcwd.cc (SetupFindVisitor::visitFile): Ditto.
* ini.cc (do_remote_ini): Ditto.
* Makefile.am (setup_SOURCES): Add win32.cc.
* autoload.c: Include windows.h directly instead of win32.h so that
win32.h can contain C++.
* desktop.cc (verinfo): Delete.
(make_link): Use IsWindowsNT to check for NT instead of verinfo.
(DesktopSetupPage::OnInit): Likewise.
* mount.cc (is_admin): Likewise.
* script.cc (init_run_script): Likewise.
* main.cc (class SIDWrapper, SIDWrapper::SIDWrapper,
SIDWrapper::~SIDWrapper, SIDWrapper::theSID, class HANDLEWrapper,
HANDLEWrapper::HANDLEWrapper, HANDLEWrapper::~HANDLEWrapper,
HANDLEWrapper::theHANDLE, class TokenGroupCollection,
TokenGroupCollection::TokenGroupCollection,
TokenGroupCollection::~TokenGroupCollection,
TokenGroupCollection::populate, TokenGroupCollection::find,
class NTSecurity, set_default_sec, NTSecurity::NoteFailedAPI,
NTSecurity::NTSecurity, NTSecurity::failed,
NTSecurity::initialiseEveryOneSID, NTSecurity::setDefaultDACL,
NTSecurity::setDefaultSecurity): Remove implementation of these
classes from this file and into new file win32.cc and existing win32.h.
(main): Fix whitespace and formatting per GNU coding standards.
* res.rc (IDS_SETUPINI_MISSING): Parameterize filename with %s.
* win32.cc: New file containing methods removed from main.cc as well
as new class VersionInfo methods.
* win32.h: Include <string> for std::string.
(class SIDWrapper, class HANDLEWrapper, class TokenGroupCollection,
class NTSecurity): Add classes removed from main.cc.
(class VersionInfo): Add new class.
(GetVer): Declare.
(IsWindowsNT): Define.
Brian Dessent [Sat, 17 Feb 2007 14:41:10 +0000 (14:41 +0000)]
2007-02-17 Cesar Strauss <cstrauss@cea.inpe.br>
* IniDBBuilderPackage.cc (IniDBBuilderPackage::buildPackageSource):
Initialize the version and operator fields of the newly created
PackageSpecification object, so setup can pick the correct source
version later on.
Igor Peshansky [Wed, 29 Nov 2006 02:07:17 +0000 (02:07 +0000)]
2006-11-28 Igor Peshansky <pechtcha@cs.nyu.edu>
* install.cc (Installer::installOne): If file is in use, ask the user
to stop processes and retry.
(MB_RETRYCONTINUE, IDCONTINUE): New macros.
(hMsgBoxHook): New static field.
(CBTProc): New window hook function.
(_custom_MessageBox): New function.
* CHANGES: Update with the above.
Igor Peshansky [Wed, 24 May 2006 13:01:34 +0000 (13:01 +0000)]
2006-05-24 Igor Peshansky <pechtcha@cs.nyu.edu>
* PickPackageLine.h (PickPackageLine::DrawIcon): Move to PickView.
* PickView.h (PickView::DrawIcon): Move from PickPackageLine.
(PickView::icon_dc,PickView::bm_icon): New instance field.
(PickView::rect_icon,PickView::bg_fg_brush): Ditto.
* PickCategoryLine.cc (PickCategoryLine::paint): Use
PickView::DrawIcon() instead of BitBlt().
* PickPackageLine.cc (PickPackageLine::DrawIcon): Move to PickView.
(PickPackageLine::paint): Use PickView::DrawIcon().
* PickView.cc (PickView::~PickView): Delete GDI objects.
(PickView::init): Create icon drawing context.
(PickView::DrawIcon): New function. Use system default colors to
draw bitmaps.
(PickView::paint): Set background color instead of using transparent
mode. Create system-colored brush.
Max Bowsher [Mon, 17 Apr 2006 17:01:52 +0000 (17:01 +0000)]
2006-04-17 Max Bowsher <maxb1@ukf.net>
* String++.cc, String++.h: Finally, it's time for the long-awaited
departure of 'class String' from this world. setup.exe can now
happily claim to follow the sane path of using just one general
purpose string class throughout :-)
Max Bowsher [Mon, 17 Apr 2006 16:13:17 +0000 (16:13 +0000)]
2006-04-17 Max Bowsher <maxb1@ukf.net>
* package_meta.cc, package_meta.h, package_source.cc,
package_source.h: Do some String to std::string migration.
* package_db.cc: Small tweak to assist with the above.
Max Bowsher [Mon, 17 Apr 2006 15:40:11 +0000 (15:40 +0000)]
2006-04-17 Max Bowsher <maxb1@ukf.net>
* PickView.cc, PickView.h, package_db.cc, package_db.h:
Do some String to std::string migration.
* package_meta.h: Change a couple of types to assist with the above.
Max Bowsher [Sun, 16 Apr 2006 23:07:44 +0000 (23:07 +0000)]
2006-04-17 Max Bowsher <maxb1@ukf.net>
* IniDBBuilder.cc, IniDBBuilder.h, IniDBBuilderPackage.cc,
IniDBBuilderPackage.h, PickLine.h, PickPackageLine.cc:
Do some String to std::string migration.
Max Bowsher [Thu, 30 Mar 2006 22:55:55 +0000 (22:55 +0000)]
2006-03-30 Max Bowsher <maxb1@ukf.net>
* String++.cc (replace): New function to take the place of one form
of String::replace method.
* String++.h (replace): Declare.
(String::replace): Make private.
* desktop.cc (make_cygwin_bat): Use new function.
* filemanip.cc (backslash): Use simple loop in place of
String::replace.
* filemanip.h (backslash): Change signature to use std::string in
place of String.
Max Bowsher [Thu, 30 Mar 2006 21:25:51 +0000 (21:25 +0000)]
2006-03-30 Max Bowsher <maxb1@ukf.net>
* String++.cc, String++.h (casecompare): New function replacing
String.casecompare to increase parity with std::string.
(String::casecompare): Make private.
* ConnectionSetting.cc, IniDBBuilderPackage.cc,
IniParseFindVisitor.cc, LogFile.cc, PackageSpecification.cc,
PickView.cc, SourceSetting.cc, String++.cc, String++.h, fromcwd.cc,
io_stream.cc, mount.cc, package_db.cc, package_source.h,
package_version.cc, prereq.h, script.cc:
Use casecompare in place of String::casecompare.
Max Bowsher [Thu, 30 Mar 2006 20:30:50 +0000 (20:30 +0000)]
2006-03-30 Max Bowsher <maxb1@ukf.net>
* String++.cc, String++.h: Remove String(int) constructor, which
was causing dangerously bizarre implicit conversions, and was a point
of disparity between String and std::string.
(stringify): New function to replace functionality removed above.
* PickView.cc (PickView::init_headers),
archive_tar.cc (archive_tar::next_file_name),
cygpackage.cc (cygpackage::setCanonicalVersion):
Make explicit and call out with a FIXME some bizarre behaviour.
* ScanFindVisitor.cc (ScanFindVisitor::visitFile),
filemanip.cc (base), iniparse.y,
threebar.cc (ThreeBarProgressPage::SetBar2):
Make simple adaptations to the changed API.
* res.rc: Update copyright.
(IDS_MIRROR_LST): Use cygwin.com for mirror list, not sources.redhat.com.
(NOSAVE2): sourceware.cygnus.com -> sources.redhat.com
* site.cc (NOSAVE1): Use preferred name of sourceware site.
(NOSAVE1_LEN): Use just-defined name to determine length.
(NOSAVE2_LEN): Ditto.
(NOSAVE3_LEN): Ditto.
* res.rc (IDD_DROPPED): New dialog.
* resource.h (IDD_DROPPED): New dialog-id.
(IDC_DROP_MIRRORS, IDC_DROP_NOWARN): New control-ids.
* site.cc: Add enum for response on dropped mirrors.
(cache_is_usable, cache_needs_writing): New bools.
(cache_warn_urls): New string.
(cached_site-list, dropped_site_list): New SiteLists.
(site_list_type::init, site_list_type::site_list_type): Change to four
parameter form.
(site_list_type::site_list_type, site_list_type::operator=) Copy servername,
area and location.
(load_site_list): New function, broken out of get_site_list. Support
four-parameter site_list_type.
(get_site_list): Break out load_site_list. Move reading cache earlier. Don't
write new cache. Set flags to record cache state. Load both all_site_list and
cached_site_list.
(SiteSetting::registerSavedSite): Use four-parameter site_list_type.
(drop_proc, check_dropped_mirrors, write_cache_list, save_cache_file): New
functions.
(SitePage::OnNext): Check for dropped mirrors and save cache as appropriate.
(SitePage::OnMessageCmd): Use four-parameter site_list_type.
* site.h
(site_list_type::init, site_list_type::site_list_type): Change to four
parameter form.
(site_list_type): Add servername, area and location members.
Max Bowsher [Thu, 9 Mar 2006 12:26:16 +0000 (12:26 +0000)]
2006-03-09 Bas van Gompel <patch-cygsup.buzz@bavag.tmfweb.nl>
Max Bowsher <maxb1@ukf.net>
Provide indication of site that a file is being downloaded from.
* geturl.cc: Use std::string instead of String throughout.
(init_dialog): Put more information into GUI.
Remove unused 'owner' parameter and change all callers.
(progress): Remove spurious \n characters from GUI.
* geturl.h: Use std::string instead of String throughout.
* res.rc (IDD_INSTATUS): Use SS_ENDELLIPSIS.
Max Bowsher [Wed, 30 Nov 2005 22:32:00 +0000 (22:32 +0000)]
2005-11-30 Max Bowsher <maxb1@ukf.net>
* site.h, site.cc: Use std::string in preference to String.
(site_list_type::init): Convert some painful raw C string work to
STL std::string work. Stop totally ignoring the result of this
calculation, implementing the (somewhat weird) sort order for sites
that was apparently indented for ages.
Brian Dessent [Fri, 9 Sep 2005 19:08:02 +0000 (19:08 +0000)]
* PickView.cc (PickView::paint): Set background mode to transparent.
* PickCategoryLine.cc (PickCategoryLine::paint): Use bitwise AND to
blit bitmaps.
* PickPackageLine.cc (PickPackageLine::paint): Ditto.
Brian Dessent [Thu, 1 Sep 2005 16:39:27 +0000 (16:39 +0000)]
2005-09-01 Brian Dessent <brian@dessent.net>
* package_meta.cc (packagemeta::uninstall): Remove support for
undocumented and dangerous postremove script.
2005-09-01 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* script.cc (run): Change to return the exit code or negative error.
(Script::run): Ditto.
(try_run_script): Receive both filename and extension and run only
one script. Also return the exit code.
* script.h (try_run_script): Change signature.
(Script::run): Ditto.
* postinstall.cc (RunScript::operator()): Change to return the exit
code or negative error.
* install.cc (Installer::preremoveOne): Pass extension to
try_run_script().
2005-09-01 Eric Blake <ebb9@byu.net>
* script.cc (shells): Use /bin/bash, not sh, to allow upgrades to
/bin/sh.
Brian Dessent [Sat, 21 May 2005 23:04:03 +0000 (23:04 +0000)]
2005-05-21 Brian Dessent <brian@dessent.net>
* prereq.cc: New file.
* prereq.h: Ditto.
* tree-minus.bmp: Ditto.
* tree-plus.bmp: Ditto.
* Makefile.am: Add prereq.cc and prereq.h to build.
* PickCategoryLine.cc (PickCategoryLine::paint): Add new parameter and
refactor. Use bitmap for '+' and '-' indicators. Draw package lines
column-wise for better drawing efficiency.
(PickCategoryLine::click): Use previously calculated x value.
* PickCategoryLine.h (PickCategoryLine::paint): Update prototype. Add
'spin_x' member.
* PickLine.h (PickLine:paint): Update prototype.
* PickPackageLine.cc (PickPackageLine::DrawCheck): Remove.
(PickPackageLine::DrawIcon): New function.
(PickPackageLine::paint): Add parameter. Refactor completely for more
efficient painting.
* PickPackageLine.h (PickPackageLine::DrawIcon): Add prototype.
(PickPackageLine::paint): Update prototype.
(PickPackageLine::DrawCheck): Remove.
* PickView.cc (pkg_headers): Remove unused 'slen' field, add new
'needs_clip' field to signify if clipping is necessary for this column.
(PickView::note_width): Fold long line. Refactor slightly for
simplicity.
(PickView::set_view_mode): Remove.
(PickView::cycleViewMode): New function.
(PickView::setViewMode): Refactor completely. Incorporate functionality
of clear_view() here instead. Simplify package selection into a single
'for' loop rather than repeating code for each type.
(isObsolete): New function, with second overloaded version.
(PickView::setObsolete): New function.
(PickView::insert_pkg): Do not show obsolete packages. Move
declaration of 'db' lower. Fix whitespace.
(PickView::insert_category): Do not show obsolete packages.
(PickView::clear_view): Remove. Moved logic into 'setViewMode'.
(PickView::scroll): Add additional parameter 'howmany' with default
value of 1. Scroll by 'howmany' lines for SB_LINEDOWN and SB_LINEUP.
(NUM_CATEGORY_COL_WIDTH): Define.
(PickView::init_headers): Fix whitespace. Add comments. Ignore
obsolete packages in width calculations. Add functionality to size
'Category' column so that at least NUM_CATEGORY_COL_WIDTH categories
are displayed for every package. Ensure that 'new_col' takes into
account all possible labels.
(PickView::PickView): Initialize showObsolete to false.
(PickView::init): Remove unused bitmap bm_rtarrow. Add new bitmaps
bm_treeplus and bm_treeminus. Use a macro for better readability.
Fix whitespace formatting. Remove header computation from here, call
refresh() instead.
(PickView::registerWindowClass): Remove unnecessary background brush.
(PickView::WindowProc): Add support for WM_MOUSEWHEEL message
processing. Fix indentation. Reformat for readability.
(PickView::paint): Get the update region before calling BeginPaint.
Fill the update region with the default colors. Do not do clipping
here. Pass update region to the PickLine paint function instead.
Free the update region when finished.
(PickView::Create): Fix indentation.
(PickView::defaultTrust): Ditto.
(PickView::refresh): Add column recalculation logic here.
* PickView.h: Fix indentation.
(RTARROW_WIDTH): Remove unused define.
(NEW_COL_SIZE_SLOP): Ditto.
(TREE_INDENT): Define.
(PickView::get_view_mode): Remove.
(PickView::set_view_mode): Rename to setViewMode for consistency.
(PickView::cycleViewMode): Add new function.
(PickView::setObsolete): Ditto.
(PickView::clear_view): Remove.
(PickView::bm_treeplus): Define new member.
(PickView::bm_treeminus): Ditto.
(PickView::scroll): Add parameter.
(PickView::Header::slen): Remove unused member.
(PickView::Header::needs_clip): Define new member.
(PickView::showObsolete): Ditto.
(isObsolete): Add prototype, and for overloaded version as well.
* choose.cc: Add include.
(ChooserControlsInfo): Allow new checkbox to be resized.
(ChooserPage::OnInit): Start dialog with 'Hide obsolete' checked.
(ChooserPage::OnNext): Call the dependency checker, act accordingly.
(ChooserPage::changeTrust): Notify dependency checker of current trust
level when it changes.
(ChooserPage::OnMessageCmd): Just call cycleViewMode instead when
changing the view. Update the chooser when the user toggles the
'hide obsolete' checkbox.
(ChooserPage::OnMouseWheel): New function. Pass mouse wheel message
on to chooser.
* choose.h (OnMouseWheel): Add prototype.
* main.cc: Add include.
(main): Define and initialize the PrereqPage object. Add it into
the property sheet list.
* PropPage.cc (PropertyPage::DialogProc): Add support for WM_MOUSEWHEEL
message processing in derived classes.
(PropertyPage::OnMouseWheel): New function.
* PropPage.h (PropertyPage::OnMouseWheel): Add prototype.
* res.rc (IDD_LOCAL_DIR): Shorten edit box so that pushbutton is not
crowded.
(IDD_SITE): Provide static text with an ID so that it can be resized
properly. Move pushbutton slightly to right so that it doesn't crowd
edit box.
(IDD_SPLASH): Change copyright displayed on spash screen to be generic
since the actual list of contributors is long.
(IDD_CHOOSE): Add checkbox. Resize other controls to accomodate.
(IDD_PREREQ): New dialog.
(SPIN): Delete duplicated bitmap resource.
(IDB_RTARROW): Remove unused bitmap resource.
(IDB_TREE_PLUS): Add.
(IDB_TREE_MINUS): Ditto.
(IDS_TRUSTPREV_TOOLTIP): Revise wording to be more concise.
(IDS_TRUSTCURR_TOOLTIP): Ditto.
(IDS_TRUSTEXP_TOOLTIP): Ditto.
(IDS_VIEWBUTTON_TOOLTIP): Ditto.
* resource.h (IDD_PREREQ): Define.
(IDB_RTARROW): Remove.
(IDB_TREE_PLUS): Add, and renumber.
(IDB_TREE_MINUS): Ditto.
(IDC_SITE_USERURL): Define.
(IDC_CHOOSE_HIDE): Ditto.
(IDC_PREREQ_TEXT): Ditto.
(IDC_PREREQ_EDIT): Ditto.
(IDC_PREREQ_CHECK): Ditto.
* site.cc (SiteControlsInfo): Ensure that 'User URL' static text is
properly resized.
Max Bowsher [Sat, 14 May 2005 15:57:29 +0000 (15:57 +0000)]
2005-05-14 Max Bowsher <maxb@ukf.net>
"Type" field of packageversions was not even being filled in. Fix.
* cygpackage.h, cygpackage.cc (cygpackage::createInstance):
Make "type" a mandatory parameter of the constructor.
* IniDBBuilderPackage.cc: Adjust callers.
Max Bowsher [Sat, 7 May 2005 22:07:55 +0000 (22:07 +0000)]
2005-05-07 Max Bowsher <maxb@ukf.net>
* download.cc (validateCachedPackage): Remove all MD5 checking code.
It is not acceptable to check MD5 sums as part of simply answering
whether a package exists in the local cache or not. It is too slow.
MD5 sums always have been - and will continue to be - checked at
install time.
(NoMD5Option): Remove this option, as the code it controls has been
removed.
Brian Dessent [Sat, 7 May 2005 04:27:08 +0000 (04:27 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* choose.cc (ChooserPage::OnInit): Initialize tooltips for this
dialog.
* proppage.h (PropertyPage::makeClickable): Update prototype to
reflect same argument name as function.
* proppage.cc (PropertyPage::DialogProc): Remove redundant 'break'
statements that follow 'return's. Add missing braces to case
statements. Call handler for TTN_GETDISPINFO.
* res.rc (IDS_TRUSTKEEP_TOOLTIP): Add new STRINGTABLE entry for
tooltip text.
(IDS_TRUSTPREV_TOOLTIP): Ditto.
(IDS_TRUSTCURR_TOOLTIP): Ditto.
(IDS_TRUSTEXP_TOOLTIP): Ditto.
(IDS_TRUSTPREV_TOOLTIP): Ditto.
(IDS_VIEWBUTTON_TOOLTIP): Ditto.
* resource.h: Likewise, add identifiers for tooltip resources.
* window.h: Add includes.
(Window::TooltipHandle): Add new private data structure.
(Window::TooltipStrings): Ditto.
(Window::ActivateTooltips): Define new function to support tooltip
functionality.
(Window::SetTooltipState): Ditto.
(Window::AddTooltip): Ditto.
(TooltipNotificationHandler): Ditto.
* window.cc (Window::Window): Initialize handle to NULL.
(Window::~Window): Call DestroyWindow on tooltip control if it was
activated.
(Window::ActivateTooltips): New function to activate the tooltip
control.
(Window::SetTooltipState): New function to allow toggling of
tooltips.
(Window::AddTooltip): New function that adds a tooltip to a given
control in a given window. Also implement overloaded versions that
provide simpler interface and the ability to use a string resource.
(Window::TooltipNotificationHandler): New function to handle
TTN_GETDISPINFO notification messages.
Brian Dessent [Sat, 7 May 2005 03:42:40 +0000 (03:42 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* resource.h: Reorganize. Group by type, and give each its own
range of IDs. Regenerate IDs accordingly.
(IDD_CHOOSER): Remove obsolete and unused symbol.
Brian Dessent [Thu, 5 May 2005 21:00:33 +0000 (21:00 +0000)]
2005-05-05 Brian Dessent <brian@dessent.net>
* ControlAdjuster.h: (enum ControlPosition): Declare new
resizing methods CP_STRETCH_LEFTHALF and CP_STRETCH_RIGHTHALF, and
their TOP/BOTTOM aliases.
* ControlAdjuster.cc: (ControlAdjuster::ControlInfo::adjust):
Implement CP_STRETCH_LEFTHALF and CP_STRETCH_RIGHTHALF, which
are designed to resize elements in a two-column layout.
* localdir.h: (class LocalDirPage): Remove constructor
implementation from here...
* localdir.cc: (LocalDirPage::LocalDirPage): ...to here, and call
AddControlsInfo on initialization.
(static LocaldirControlsInfo): Add. Define sizing rules for dialog
elements.
* proppage.h: Add includes. (PropertyPage::ClickableURL): Declare new
storage type for internal use by class. (PropertyPage::urls):
Likewise. (PropertyPage::urlWinProc): Add declaration.
(PropertyPage::makeClickable): Likewise.
* proppage.cc: Add includes. (PropertyPage::DialogProc): Implement
handler for WM_CTLCOLORSTATIC message. Supports static controls that
have been turned into clickable hyperlinks. (static
PropertyPage::urls): Declare. (PropertyPage::makeClickable):
Implement new member function that provides user interface for making
text into clickable URLs. (PropertyPage::urlWinProc): Implement new
private member function used as a windowproc for subclassing a static
control.
* resource.h: (IDC_SPLASH_URL, IDC_FILEMODES_LINK, IDC_ROOTDIR_GRP,
IDC_INSTALLFOR_GRP, IDC_ALLUSERS_TEXT, IDC_JUSTME_TEXT, IDC_MODE_GRP,
IDC_MODE_TEXT, IDC_MODE_BIN, IDC_LOCALDIR_GRP, IDC_SPLASH_TEXT,
IDC_SPLASH_ICON, IDC_SPLASH_COPYR): Add. Replaces anonymous
IDC_STATIC ids, so that controls can be referenced by the resizer.
* res.rc: (IDD_LOCAL_DIR): Rearrange controls to match top-down order
in the dialog. Fold long lines. Replace anonymous IDC_STATIC ids.
(IDD_ROOT): Reorder in same manner. Replace anonymous IDC_STATIC
ids. Add descriptive text of each option, and hyperlink for more
information. Mark suggested choice as "(RECOMMENDED)". Swap order
of 'unix'/'dos' radio buttons so that recommended choice is first in
both columns. (IDD_SPLASH): Reorder elements to match top-down
order of dialog, fold long lines. Add descriptive paragraph, remove
anonymous ids. Update copyright text, replace sources.redhat.com
with cygwin.com.
* root.h: (class RootPage): Remove constructor implementation from
here...
* root.cc: ...to here, and call AddControlInfo. (static
RootControlsInfo): Add. Populate with resizing data.
(RootPage::OnInit): Make text a clickable hyperlink.
* splash.h: (class SplashPage): Likewise, move constructor from
here...
* splash.cc: ...to here. Call AddControlInfo. (static
SplashControlsInfo): Add and populate. (SplashPage::Create): Make
link on splash page a clickable hyperlink.
* window.h: Add include. (class Window): Store allocated fonts with a
vector instead of fixed array. Change indentation of setParent to be
consistent.
* window.cc: (Window::Window): Remove FontCounter.
(Window::~Window): Likewise. Iterate over vector of fonts
instead. (Window::SetDlgItemFont): Use vector.