From: Corinna Vinschen Date: Fri, 15 Nov 2013 10:22:16 +0000 (+0000) Subject: * mount.cc (read_mounts): Drop setting root_text. X-Git-Tag: release_2.869~32 X-Git-Url: https://cygwin.com/git/?a=commitdiff_plain;h=89753b0e1522e9e842b7f851ce689f750873c6a2;p=cygwin-apps%2Fsetup.git * mount.cc (read_mounts): Drop setting root_text. * res.rc: Set content of root dir dialog correctly right from the start. Remove unused items. * resource.h (IDC_ROOT_TEXT): Remove. (IDC_ROOT_BINARY): Ditto. (IDC_FILEMODES_LINK): Ditto. (IDC_MODE_GRP): Ditto. (IDC_MODE_TEXT): Ditto. (IDC_MODE_BIN): Ditto. * root.cc (Root): Set "Install For" group items to CP_STRETCH. Remove all "text/binary" items. (rb): Remove. (check_if_enable_next): Drop test for root_text. (load_dialog): Remove all code setting items differently to what's specified as default in the resources, in favor of setting this correctly in the resources. (save_dialog): Drop setting root_text. (RootPage::OnMessageCmd): Drop IDC_ROOT_TEXT/IDC_ROOT_BINARY handling. (RootPage::OnInit): Drop IDC_FILEMODES_LINK handling. (RootPage::OnNext): Drop "text"/"binary" state from debug output. * state.cc (root_text): Remove. --- diff --git a/ChangeLog b/ChangeLog index 38c50ca0..3f46fded 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2013-11-15 Corinna Vinschen + + * mount.cc (read_mounts): Drop setting root_text. + * res.rc: Set content of root dir dialog correctly right from the start. + Remove unused items. + * resource.h (IDC_ROOT_TEXT): Remove. + (IDC_ROOT_BINARY): Ditto. + (IDC_FILEMODES_LINK): Ditto. + (IDC_MODE_GRP): Ditto. + (IDC_MODE_TEXT): Ditto. + (IDC_MODE_BIN): Ditto. + * root.cc (Root): Set "Install For" group items to CP_STRETCH. + Remove all "text/binary" items. + (rb): Remove. + (check_if_enable_next): Drop test for root_text. + (load_dialog): Remove all code setting items differently to what's + specified as default in the resources, in favor of setting this + correctly in the resources. + (save_dialog): Drop setting root_text. + (RootPage::OnMessageCmd): Drop IDC_ROOT_TEXT/IDC_ROOT_BINARY handling. + (RootPage::OnInit): Drop IDC_FILEMODES_LINK handling. + (RootPage::OnNext): Drop "text"/"binary" state from debug output. + * state.cc (root_text): Remove. + 2013-11-14 Corinna Vinschen * archive_tar.cc: Drop commented out static variable definitions. diff --git a/mount.cc b/mount.cc index a205672a..4395a458 100644 --- a/mount.cc +++ b/mount.cc @@ -353,7 +353,6 @@ read_mounts (const std::string val) } got_usr_bin = got_usr_lib = false; - root_text = IDC_ROOT_BINARY; root_scope = (is_admin ())? IDC_ROOT_SYSTEM : IDC_ROOT_USER; if (val.size ()) diff --git a/res.rc b/res.rc index 5137cb2e..902c5a44 100644 --- a/res.rc +++ b/res.rc @@ -105,35 +105,23 @@ BEGIN CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28, SETUP_STANDARD_DIALOG_W,1 - GROUPBOX "Root Directory",IDC_ROOTDIR_GRP,5,35,305,35 + GROUPBOX "Root Directory",IDC_ROOTDIR_GRP,5,35,330,35 EDITTEXT IDC_ROOT_DIR,13,47,245,14,ES_AUTOHSCROLL | WS_TABSTOP PUSHBUTTON "B&rowse...",IDC_ROOT_BROWSE,260,47,44,14,WS_TABSTOP - GROUPBOX "Install For",IDC_INSTALLFOR_GRP,5,76,150,101 - GROUPBOX "Default Text File Type",IDC_MODE_GRP,160,76,150,101 + GROUPBOX "Install For",IDC_INSTALLFOR_GRP,5,76,330,101 CONTROL "&All Users (RECOMMENDED)",IDC_ROOT_SYSTEM,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,89,130,8 CONTROL "Just &Me",IDC_ROOT_USER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,130,130,8 - CONTROL "&Unix / binary (RECOMMENDED)",IDC_ROOT_BINARY,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,170,89,130,8 - CONTROL "D&OS / text",IDC_ROOT_TEXT,"Button",BS_AUTORADIOBUTTON | - WS_TABSTOP,170,130,130,8 - LTEXT "Cygwin will be available to all users of the system. " - "NOTE: This is required if you wish to run services like " - "sshd, etc.",IDC_ALLUSERS_TEXT,25,101,125,28 - LTEXT "Cygwin will only be available to the current user. " - "Only select this if you lack Admin. privileges or you " - "have specific needs.",IDC_JUSTME_TEXT,25,140,125,32 - - LTEXT "No line translation done; all files opened in binary mode." - " Files on disk will have LF line endings.", IDC_MODE_BIN, - 181,101,125,27 - LTEXT "Line endings will be translated from unix (LF) to DOS " - "(CR-LF) on write and vice versa on read.",IDC_MODE_TEXT, - 181,140,125,26 - LTEXT "Read more about file modes...",IDC_FILEMODES_LINK, - 200,166,99,8 + LTEXT "Cygwin will be available to all users of the system.", + IDC_ALLUSERS_TEXT,25,101,300,28 + LTEXT "Cygwin will still be available to all users, but " + "Desktop Icons, Cygwin Menu Entries, and important " + "Installer information are only available to the current " + "user. Only select this if you lack Administrator " + "privileges or if you have specific needs.", + IDC_JUSTME_TEXT,25,140,300,32 END IDD_SITE DIALOG DISCARDABLE 0, 0, SETUP_STANDARD_DIALOG_DIMS diff --git a/resource.h b/resource.h index 8acfeee1..1803ad12 100644 --- a/resource.h +++ b/resource.h @@ -91,8 +91,6 @@ #define IDC_SOURCE_LOCALDIR 502 #define IDC_ROOT_DIR 503 #define IDC_ROOT_BROWSE 504 -#define IDC_ROOT_TEXT 505 -#define IDC_ROOT_BINARY 506 #define IDC_URL_LIST 507 #define IDC_SITE_NEXT 508 #define IDC_BACK 509 @@ -147,14 +145,10 @@ #define IDC_HEADICON 559 #define IDC_HEADSEPARATOR 560 #define IDC_SPLASH_URL 561 -#define IDC_FILEMODES_LINK 562 #define IDC_ROOTDIR_GRP 563 #define IDC_INSTALLFOR_GRP 564 #define IDC_ALLUSERS_TEXT 565 #define IDC_JUSTME_TEXT 566 -#define IDC_MODE_GRP 567 -#define IDC_MODE_TEXT 568 -#define IDC_MODE_BIN 569 #define IDC_LOCALDIR_GRP 570 #define IDC_SPLASH_TEXT 571 #define IDC_SPLASH_ICON 572 diff --git a/root.cc b/root.cc index 3d6d1ac4..8e78f7c5 100644 --- a/root.cc +++ b/root.cc @@ -51,22 +51,15 @@ static ControlAdjuster::ControlInfo RootControlsInfo[] = { { IDC_ROOT_DIR, CP_STRETCH, CP_TOP }, { IDC_ROOT_BROWSE, CP_RIGHT, CP_TOP }, - { IDC_INSTALLFOR_GRP, CP_STRETCH_LEFTHALF, CP_STRETCH }, + { IDC_INSTALLFOR_GRP, CP_STRETCH, CP_STRETCH }, { IDC_ROOT_SYSTEM, CP_LEFT, CP_TOP }, - { IDC_ALLUSERS_TEXT, CP_STRETCH_LEFTHALF, CP_TOP }, + { IDC_ALLUSERS_TEXT, CP_STRETCH, CP_TOP }, { IDC_ROOT_USER, CP_LEFT, CP_BOTTOM }, - { IDC_JUSTME_TEXT, CP_STRETCH_LEFTHALF, CP_BOTTOM }, - - { IDC_MODE_GRP, CP_STRETCH_RIGHTHALF, CP_STRETCH }, - { IDC_ROOT_BINARY, CP_STRETCH_RIGHTHALF, CP_TOP }, - { IDC_MODE_BIN, CP_STRETCH_RIGHTHALF, CP_TOP }, - { IDC_ROOT_TEXT, CP_STRETCH_RIGHTHALF, CP_BOTTOM }, - { IDC_MODE_TEXT, CP_STRETCH_RIGHTHALF, CP_BOTTOM }, - { IDC_FILEMODES_LINK, CP_RIGHT, CP_BOTTOM }, + { IDC_JUSTME_TEXT, CP_STRETCH, CP_BOTTOM }, + {0, CP_LEFT, CP_TOP} }; -static int rb[] = { IDC_ROOT_TEXT, IDC_ROOT_BINARY, 0 }; static int su[] = { IDC_ROOT_SYSTEM, IDC_ROOT_USER, 0 }; static string orig_root_dir; @@ -74,8 +67,8 @@ static string orig_root_dir; static void check_if_enable_next (HWND h) { - EnableWindow (GetDlgItem (h, IDOK), root_text - && egetString (h, IDC_ROOT_DIR).size() && root_scope); + EnableWindow (GetDlgItem (h, IDOK), + egetString (h, IDC_ROOT_DIR).size() && root_scope); } static inline void @@ -95,53 +88,14 @@ SetDlgItemRect (HWND h, int item, LPRECT r) static void load_dialog (HWND h) { - rbset (h, rb, root_text); rbset (h, su, root_scope); eset (h, IDC_ROOT_DIR, get_root_dir ()); check_if_enable_next (h); - /* Stretch IDC_ROOTDIR_GRP content to full dialog width. Use - IDC_ROOTDIR_GRP rectangle as fix point. */ - RECT rect_base, rect; - GetDlgItemRect (h, IDC_ROOTDIR_GRP, &rect_base); - - GetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect); - rect.right = rect_base.right; - SetDlgItemRect (h, IDC_INSTALLFOR_GRP, &rect); - - GetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect); - rect.right = rect_base.right - 25; - SetDlgItemRect (h, IDC_ALLUSERS_TEXT, &rect); - - GetDlgItemRect (h, IDC_JUSTME_TEXT, &rect); - rect.right = rect_base.right - 25; - SetDlgItemRect (h, IDC_JUSTME_TEXT, &rect); - - /* Change adjustment accordingly. */ - RootControlsInfo[3].horizontalPos = CP_STRETCH; - RootControlsInfo[5].horizontalPos = CP_STRETCH; - RootControlsInfo[7].horizontalPos = CP_STRETCH; - - SetWindowText (GetDlgItem (h, IDC_ALLUSERS_TEXT), - "Cygwin will be available to all users of the system."); - SetWindowText (GetDlgItem (h, IDC_JUSTME_TEXT), - "Cygwin will still be available to all users, but " - "Desktop Icons, Cygwin Menu Entries, and important " - "Installer information are only available to the current " - "user. Only select this if you lack Administrator " - "privileges or if you have specific needs."); - - ShowWindow (GetDlgItem (h, IDC_MODE_GRP), SW_HIDE); - ShowWindow (GetDlgItem (h, IDC_ROOT_BINARY), SW_HIDE); - ShowWindow (GetDlgItem (h, IDC_MODE_BIN), SW_HIDE); - ShowWindow (GetDlgItem (h, IDC_ROOT_TEXT), SW_HIDE); - ShowWindow (GetDlgItem (h, IDC_MODE_TEXT), SW_HIDE); - ShowWindow (GetDlgItem (h, IDC_FILEMODES_LINK), SW_HIDE); } static void save_dialog (HWND h) { - root_text = IDC_ROOT_BINARY; root_scope = rbget (h, su); set_root_dir (egetString (h, IDC_ROOT_DIR)); } @@ -291,8 +245,6 @@ RootPage::OnMessageCmd (int id, HWND hwndctl, UINT code) { case IDC_ROOT_DIR: - case IDC_ROOT_TEXT: - case IDC_ROOT_BINARY: case IDC_ROOT_SYSTEM: case IDC_ROOT_USER: check_if_enable_next (GetHWND ()); @@ -321,8 +273,6 @@ RootPage::Create () void RootPage::OnInit () { - makeClickable (IDC_FILEMODES_LINK, - "http://cygwin.com/cygwin-ug-net/using-textbinary.html"); if (((string)RootOption).size()) set_root_dir((string)RootOption); if (!get_root_dir ().size()) @@ -358,7 +308,6 @@ RootPage::OnNext () return -1; log (LOG_PLAIN) << "root: " << get_root_dir () - << (root_text == IDC_ROOT_TEXT ? " text" : " binary") << (root_scope == IDC_ROOT_USER ? " user" : " system") << endLog; return 0; diff --git a/state.cc b/state.cc index 7982ef41..055b13d2 100644 --- a/state.cc +++ b/state.cc @@ -29,7 +29,6 @@ int source; std::string local_dir; -int root_text; int root_scope; int root_menu; int root_desktop;