* 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-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * 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 <corinna@vinschen.de>
* archive_tar.cc: Drop commented out static variable definitions.
}
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 ())
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
#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
#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
{ 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;
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
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));
}
{
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 ());
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())
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;
std::string local_dir;
-int root_text;
int root_scope;
int root_menu;
int root_desktop;