Index: state.cc =================================================================== --- state.cc (revision 1162) +++ state.cc (working copy) @@ -27,7 +27,9 @@ bool test_mode; bool safe_mode; +int express_mode_option; int source; +int apache_port_number=80; std::string local_dir; Index: res_de.rc =================================================================== --- res_de.rc (revision 1162) +++ res_de.rc (working copy) @@ -245,8 +245,10 @@ "werden davon nur wenige Pakete installiert. Sie knnen " "diese Programm jederzeit wieder starten, um bei Bedarf " "Pakete zur lschen, hinzufgen oder zu aktualisieren.",IDC_SPLASH_TEXT,35,25,265,90 - CONTROL "Schnellinstallation",IDC_EXPRESS,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,124,265,20 + CONTROL "Schnell Desktopinstallation",IDC_EXPRESS_D,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,104,265,20 + CONTROL "Schnell Web-GISinstallation",IDC_EXPRESS_I,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,60,124,265,20 CONTROL "Fortgeschrittene Installation",IDC_ADVANCED,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,265,20 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 @@ -383,7 +385,7 @@ CONTROL "GDAL",IDC_PKG_GDAL,"Button", BS_AUTOCHECKBOX,108,78,100,8 CONTROL "Apache",IDC_PKG_APACHE,"Button", - BS_AUTOCHECKBOX,108,93,100,8 + BS_AUTOCHECKBOX,108,93,45,8 CONTROL "uDig",IDC_PKG_UDIG,"Button", BS_AUTOCHECKBOX,108,108,100,8 CONTROL "OpenEV",IDC_PKG_OPENEV,"Button", @@ -391,7 +393,9 @@ CONTROL "GRASS GIS",IDC_PKG_GRASS,"Button", BS_AUTOCHECKBOX,108,138,100,8 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 - + LTEXT "port number:",IDC_APACHE_PORT_LABEL,154,90,40,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_APACHE_PORT,210,90,25,12,ES_AUTOHSCROLL LTEXT "Pakete whlen",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP END @@ -453,4 +457,16 @@ "Infrastrukturpakete sind, die automatisch behandelt werden." IDS_SELPKG_INSTALL "Pakete zur Installation whlen " IDS_SELPKG_DOWNLOAD "Pakete zum Download whlen " + IDS_LIST_CURRENT "Current" + IDS_LIST_NEW "New" + IDS_LIST_BIN "Bin?" + IDS_LIST_SRC "Src?" + IDS_LIST_CATEGORIES "Categories" + IDS_LIST_SIZE "Size" + IDS_LIST_PACKAGE "Package" + IDS_CAPTION_FULL "Full" + IDS_CAPTION_PARTIAL "Partial" + IDS_CAPTION_UPTODATE "Up To Date" + IDS_CAPTION_NOTINSTALLED "Not Installed" + IDS_CAPTION_CATEGORY "Category" END Index: res_ua.rc =================================================================== --- res_ua.rc (revision 1162) +++ res_ua.rc (working copy) @@ -249,10 +249,12 @@ " " ", " ".",IDC_SPLASH_TEXT,35,25,265,90 - CONTROL " ",IDC_EXPRESS,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,124,102,10 + CONTROL " Desktop ",IDC_EXPRESS,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,104,172,10 + CONTROL " Web-GIS ",IDC_EXPRESS,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,60,124,172,10 CONTROL " ",IDC_ADVANCED,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,97,10 + BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,97,10 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 END @@ -388,15 +390,18 @@ CONTROL "GDAL",IDC_PKG_GDAL,"Button", BS_AUTOCHECKBOX,108,78,100,8 CONTROL "Apache",IDC_PKG_APACHE,"Button", - BS_AUTOCHECKBOX,108,93,100,8 + BS_AUTOCHECKBOX,108,93,45,8 CONTROL "uDig",IDC_PKG_UDIG,"Button", BS_AUTOCHECKBOX,108,108,100,8 CONTROL "OpenEV",IDC_PKG_OPENEV,"Button", BS_AUTOCHECKBOX,108,123,100,8 CONTROL "GRASS GIS",IDC_PKG_GRASS,"Button", BS_AUTOCHECKBOX,108,138,100,8 + LTEXT "port number:",IDC_APACHE_PORT_LABEL,154,90,40,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_APACHE_PORT,210,90,25,12,ES_AUTOHSCROLL + ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 - LTEXT " ",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP END @@ -466,4 +471,16 @@ ", , ." IDS_SELPKG_INSTALL "Select packages to install " IDS_SELPKG_DOWNLOAD "Select packages to download " + IDS_LIST_CURRENT "Current" + IDS_LIST_NEW "New" + IDS_LIST_BIN "Bin?" + IDS_LIST_SRC "Src?" + IDS_LIST_CATEGORIES "Categories" + IDS_LIST_SIZE "Size" + IDS_LIST_PACKAGE "Package" + IDS_CAPTION_FULL "Full" + IDS_CAPTION_PARTIAL "Partial" + IDS_CAPTION_UPTODATE "Up To Date" + IDS_CAPTION_NOTINSTALLED "Not Installed" + IDS_CAPTION_CATEGORY "Category" END Index: desktop.cc =================================================================== --- desktop.cc (revision 1162) +++ desktop.cc (working copy) @@ -419,7 +419,7 @@ save_dialog (h); if( express_mode ) - return IDD_EXP_PACKAGES; + return (long)express_mode_option; else return IDD_CHOOSE; } Index: res_ru.rc =================================================================== --- res_ru.rc (revision 1162) +++ res_ru.rc (working copy) @@ -249,10 +249,12 @@ ". " ", " ".",IDC_SPLASH_TEXT,35,25,265,90 - CONTROL " ",IDC_EXPRESS,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,124,102,10 + CONTROL " Desktop ",IDC_EXPRESS,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,104,172,10 + CONTROL " Web-GIS ",IDC_EXPRESS,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,60,124,172,10 CONTROL " ",IDC_ADVANCED,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,97,10 + BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,97,10 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 END @@ -396,6 +398,9 @@ CONTROL "GRASS GIS",IDC_PKG_GRASS,"Button", BS_AUTOCHECKBOX,108,138,100,8 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 + LTEXT "port number:",IDC_APACHE_PORT_LABEL,154,90,40,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_APACHE_PORT,210,90,25,12,ES_AUTOHSCROLL LTEXT " ",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP @@ -467,4 +472,16 @@ " ." IDS_SELPKG_INSTALL "Select packages to install " IDS_SELPKG_DOWNLOAD "Select packages to download " + IDS_LIST_CURRENT "Current" + IDS_LIST_NEW "New" + IDS_LIST_BIN "Bin?" + IDS_LIST_SRC "Src?" + IDS_LIST_CATEGORIES "Categories" + IDS_LIST_SIZE "Size" + IDS_LIST_PACKAGE "Package" + IDS_CAPTION_FULL "Full" + IDS_CAPTION_PARTIAL "Partial" + IDS_CAPTION_UPTODATE "Up To Date" + IDS_CAPTION_NOTINSTALLED "Not Installed" + IDS_CAPTION_CATEGORY "Category" END Index: PickView.h =================================================================== --- PickView.h (revision 1162) +++ PickView.h (working copy) @@ -55,6 +55,7 @@ PickView (Category & cat); void init(views _mode); ~PickView(); + char *mode_caption (char *, size_t); const char *mode_caption (); void setObsolete (bool doit); void insert_pkg (packagemeta &); @@ -116,6 +117,7 @@ return _value != rhs._value; } const char *caption (); + int captionvalue (); private: int _value; @@ -124,12 +126,14 @@ class Header { public: - const char *text; + char text[1000]; int width; int x; bool needs_clip; }; + + private: static ATOM WindowClassAtom; HWND listheader; @@ -141,6 +145,7 @@ RECTWrapper lastClientRect; void set_headers (); + void set_hederslabel (); void init_headers (HDC dc); void note_width (Header *hdrs, HDC dc, const std::string& string, int addend, int column); Index: choose.cc =================================================================== --- choose.cc (revision 1162) +++ choose.cc (working copy) @@ -85,6 +85,7 @@ void ChooserPage::createListview () { + char buf[1000]; packagedb db; chooser = new PickView (*db.categories.find("All")); RECT r = getDefaultListViewSize(); @@ -96,7 +97,7 @@ chooser->defaultTrust (TRUST_CURR); chooser->setViewMode (PickView::views::Category); - if (!SetDlgItemText (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption ())) + if (!SetDlgItemText (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption (buf,(sizeof (buf) / sizeof ((buf)[0]))))) log (LOG_BABBLE) << "Failed to set View button caption %ld" << GetLastError () << endLog; for_each (db.packages.begin(), db.packages.end(), bind2nd(mem_fun(&packagemeta::set_requirements), chooser->deftrust)); @@ -256,7 +257,10 @@ bool ChooserPage::OnMessageCmd (int id, HWND hwndctl, UINT code) { - if (code != BN_CLICKED) + + char buf[1000]; + + if (code != (UINT)BN_CLICKED) { // Not a click notification, we don't care. return false; @@ -287,7 +291,7 @@ case IDC_CHOOSE_VIEW: chooser->cycleViewMode (); if (!SetDlgItemText - (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption ())) + (GetHWND (), IDC_CHOOSE_VIEWCAPTION, chooser->mode_caption (buf,(sizeof (buf) / sizeof ((buf)[0]))))) log (LOG_BABBLE) << "Failed to set View button caption " << GetLastError () << endLog; break; Index: resource.h =================================================================== --- resource.h (revision 1162) +++ resource.h (working copy) @@ -34,6 +34,19 @@ #define IDS_SELPKG_DOWNLOAD 131 #define IDS_SELPKG_INSTALL 132 +#define IDS_LIST_CURRENT 133 +#define IDS_LIST_NEW 134 +#define IDS_LIST_BIN 135 +#define IDS_LIST_SRC 136 +#define IDS_LIST_CATEGORIES 137 +#define IDS_LIST_SIZE 138 +#define IDS_LIST_PACKAGE 139 +#define IDS_CAPTION_FULL 140 +#define IDS_CAPTION_PARTIAL 141 +#define IDS_CAPTION_UPTODATE 142 +#define IDS_CAPTION_NOTINSTALLED 143 +#define IDS_CAPTION_CATEGORY 144 + // Dialogs #define IDD_SPLASH 200 @@ -59,9 +72,12 @@ #define IDD_PREREQ 220 #define IDD_DROPPED 221 -#define IDD_EXP_PACKAGES 222 +#define IDD_EXP_PACKAGES 222 #define IDD_APACHE_CONF 223 +#define IDD_EXP_DPACKAGES 224 +#define IDD_EXP_IPACKAGES 225 + // Bitmaps #define IDB_SPIN 300 @@ -167,6 +183,10 @@ #define IDC_EXPRESS 585 #define IDC_ADVANCED 586 +#define IDC_EXPRESS_D 587 +#define IDC_EXPRESS_I 588 +#define IDC_APACHE_PORT 589 +#define IDC_APACHE_PORT_LABEL 590 #define IDC_PKG_MAPSERVER 600 #define IDC_PKG_GRASS 601 @@ -175,3 +195,4 @@ #define IDC_PKG_UDIG 604 #define IDC_PKG_OPENEV 605 #define IDC_PKG_QGIS 606 + Index: state.h =================================================================== --- state.h (revision 1162) +++ state.h (working copy) @@ -36,6 +36,8 @@ extern bool test_mode; extern bool safe_mode; +extern int express_mode_option; +extern int apache_port_number; extern int source; extern std::string local_dir; Index: splash.cc =================================================================== --- splash.cc (revision 1162) +++ splash.cc (working copy) @@ -51,10 +51,28 @@ { HWND h = GetHWND (); - express_mode = (IsDlgButtonChecked (h, IDC_EXPRESS) == BST_CHECKED); - if( express_mode ) + + if (IsDlgButtonChecked (h, IDC_EXPRESS_D) == BST_CHECKED) + { unattended_mode = true; - + // add new global for control EXPESS_DESKTOP INSTALL mode + // int express_mode_option (state.cc) + express_mode_option = IDD_EXP_DPACKAGES; + } + else if (IsDlgButtonChecked (h, IDC_EXPRESS_I) == BST_CHECKED) { + // add new global for control EXPESS_DESKTOP_AND_INTERNET INSTALL mode + // int express_mode_option (state.cc) + unattended_mode = true; + express_mode_option = IDD_EXP_IPACKAGES; + } + else + { + express_mode = 0; + unattended_mode = false; + express_mode_option = 0; + } + + return IDD_SOURCE; } @@ -69,8 +87,10 @@ test_mode = TestOption; safe_mode = SafeModeOption; - CheckDlgButton (h, IDC_EXPRESS, + CheckDlgButton (h, IDC_EXPRESS_D, express_mode ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton (h, IDC_EXPRESS_I, + !express_mode ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton (h, IDC_ADVANCED, !express_mode ? BST_CHECKED : BST_UNCHECKED); Index: express_package.cc =================================================================== --- express_package.cc (revision 1162) +++ express_package.cc (working copy) @@ -52,18 +52,19 @@ typedef struct { const char *package_name; int control_id; + int control_type; // add 2010.02.19 for EXPRESS mode } PackageControlPair; static const PackageControlPair PCPList[] = { - { "mapserver", IDC_PKG_MAPSERVER }, - { "qgis-full", IDC_PKG_QGIS }, - { "apache", IDC_PKG_APACHE }, - { "gdal", IDC_PKG_GDAL }, - { "udig", IDC_PKG_UDIG }, - { "openev", IDC_PKG_OPENEV }, - { "grass", IDC_PKG_GRASS }, - { "", -1 } + { "mapserver", IDC_PKG_MAPSERVER,IDD_EXP_IPACKAGES }, + { "qgis-full", IDC_PKG_QGIS,IDD_EXP_DPACKAGES }, + { "apache", IDC_PKG_APACHE,IDD_EXP_IPACKAGES }, + { "gdal", IDC_PKG_GDAL,1 }, + { "udig", IDC_PKG_UDIG,IDD_EXP_DPACKAGES }, + { "openev", IDC_PKG_OPENEV,IDD_EXP_DPACKAGES }, + { "grass", IDC_PKG_GRASS,IDD_EXP_DPACKAGES }, + { "", -1 ,-1 } }; static void save_dialog( HWND h ) @@ -72,6 +73,8 @@ packagedb db; int iPCP; + apache_port_number = eget(h,IDC_APACHE_PORT); + for( iPCP = 0; PCPList[iPCP].control_id != -1; iPCP++ ) { packagemeta *pack = @@ -112,20 +115,70 @@ { packagedb db; int iPCP; + bool express_type; for( iPCP = 0; PCPList[iPCP].control_id != -1; iPCP++ ) { + packagemeta *pack = db.findBinary(PackageSpecification(PCPList[iPCP].package_name)); - assert( pack != NULL ); - + assert( pack != NULL ); + if( pack == NULL ) continue; + // initialize EXPRESS_DESKTOP or INTERNET mode + switch( PCPList[iPCP].control_type ) + { + case 0: + express_type = BST_UNCHECKED; + break; + case 1: + express_type = BST_CHECKED; + break; + case IDD_EXP_DPACKAGES: + express_type = + ( express_mode_option == IDD_EXP_DPACKAGES) ? BST_CHECKED : BST_UNCHECKED; + + EnableWindow (GetDlgItem (h, PCPList[iPCP].control_id), + ( express_mode_option == IDD_EXP_DPACKAGES) ? TRUE : FALSE); + break; + case IDD_EXP_IPACKAGES: + express_type = + ( express_mode_option == IDD_EXP_IPACKAGES) ? BST_CHECKED : BST_UNCHECKED; + + EnableWindow (GetDlgItem (h, PCPList[iPCP].control_id), + ( express_mode_option == IDD_EXP_IPACKAGES) ? TRUE : FALSE); + + break; + default: + express_type = BST_UNCHECKED; + break; + } + + CheckDlgButton (h, PCPList[iPCP].control_id, pack->installed ? BST_CHECKED : BST_UNCHECKED); + + CheckDlgButton (h, PCPList[iPCP].control_id, + express_type); + + //initialize APACHE_PORT_NUMBER + if (express_mode_option != IDD_EXP_DPACKAGES ){ + if(apache_port_number==0){ + apache_port_number = 80; + } + EnableWindow (GetDlgItem (h, IDC_APACHE_PORT_LABEL),TRUE ); + EnableWindow (GetDlgItem (h, IDC_APACHE_PORT),TRUE ); + eset (h, IDC_APACHE_PORT, apache_port_number); + } + else { + EnableWindow (GetDlgItem (h, IDC_APACHE_PORT_LABEL),FALSE ); + EnableWindow (GetDlgItem (h, IDC_APACHE_PORT),FALSE ); } + + } } ExpressPackageSetupPage::ExpressPackageSetupPage () Index: res_ja.rc =================================================================== --- res_ja.rc (revision 1162) +++ res_ja.rc (working copy) @@ -33,10 +33,13 @@ 71,120,200,10 ICON IDI_CYGWIN, IDC_HEADICON, 290, 0, 21, 20 + CONTROL "", IDC_HEADSEPARATOR, "Static", SS_BLACKFRAME | SS_SUNKEN, 0, 28, 317, 1 + LTEXT "_E[h\[XI", IDC_STATIC_HEADER_TITLE, 7, 0, 258, 8, NOT WS_GROUP + LTEXT "C^[lbgCXg[/_E[hA邢̓[JfBNgCXg[IłB", IDC_STATIC, 21, 9, 239, 16, NOT WS_GROUP @@ -139,11 +142,11 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "ڐڑ(&D)",IDC_NET_DIRECT,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,55,73,10 + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,55,173,10 CONTROL "IEݒ𗘗p(&I)",IDC_NET_IE5,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,60,170,69,10 + BS_AUTORADIOBUTTON | WS_TABSTOP,60,70,169,10 CONTROL "HTTP/FTPvLV𗘗p(&P):",IDC_NET_PROXY,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,60,185,88,10 + BS_AUTORADIOBUTTON | WS_TABSTOP,60,85,188,10 EDITTEXT IDC_PROXY_HOST,120,105,120,12,ES_AUTOHSCROLL | WS_DISABLED | WS_GROUP EDITTEXT IDC_PROXY_PORT,120,125,30,12,ES_AUTOHSCROLL | @@ -229,13 +232,15 @@ CAPTION "OSGeo4WZbgAbv" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "OSGeo4W̃lbg[XĂZbgAbvvO", - IDC_STATIC_WELCOME_TITLE,35,1,195,24 + LTEXT "OSGeo4W̃lbg[XĂZbgAbv\r\nvO", + IDC_STATIC_WELCOME_TITLE,35,1,225,34 LTEXT "̃ZbgAbvvO͌ɑAbvf[gƓ悤ɁAOSGeo4W‹̏̃CXg[Ɏgp܂BۑꏊYȂ悤ɂĂB\r\n\r\n" "̃y[Wȍ~́ACXg[̃KCh܂BOSGeo4W͑ړĨpbP[W\Ă܂Bݒł́ApbP[W̊{ݒ̂݃CXg[ł܂BKvɉāAljA폜ApbP[W̃AbvO[ĥ߁A‚ł̃vOs邱Ƃł܂B", - IDC_SPLASH_TEXT,35,25,265,90 - CONTROL "GNXvXCXg[",IDC_EXPRESS,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,124,73,10 + IDC_SPLASH_TEXT,35,35,265,90 + CONTROL "GNXvX fXNgbvCXg[",IDC_EXPRESS_D,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,104,173,10 + CONTROL "GNXvX Web-GISCXg[",IDC_EXPRESS_I,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,60,124,173,10 CONTROL "AhoXCXg[",IDC_ADVANCED,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,69,10 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 @@ -248,7 +253,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "fXNgbvɃACR쐬(&D)",IDC_ROOT_DESKTOP,"Button", - BS_AUTOCHECKBOX,108,78,100,8 + BS_AUTOCHECKBOX,108,78,140,8 CONTROL "X^[gj[ɒlj(&S)",IDC_ROOT_MENU,"Button", BS_AUTOCHECKBOX,108,93,100,8 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 @@ -289,14 +294,14 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "ύXȂ(&K)",IDC_CHOOSE_KEEP,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,99,30,30,14 + WS_GROUP | WS_TABSTOP,40,30,45,14 CONTROL "O(&P)",IDC_CHOOSE_PREV,"Button",BS_AUTORADIOBUTTON , - 134,30,27,14 + 90,30,37,14 CONTROL "(&C)",IDC_CHOOSE_CURR,"Button",BS_AUTORADIOBUTTON , - 169,30,25,14 + 130,30,35,14 CONTROL "J(&x)",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON , - 204,30,25,14 - PUSHBUTTON "\(&V)",IDC_CHOOSE_VIEW,239,30,26,14,WS_GROUP + 174,30,40,14 + PUSHBUTTON "\(&V)",IDC_CHOOSE_VIEW,219,30,36,14,WS_GROUP CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28, 317,1 CONTROL "",IDC_LISTVIEW_POS,"Static",SS_BLACKFRAME | NOT @@ -308,7 +313,7 @@ IDC_CHOOSE_INST_TEXT,21,9,239,16,NOT WS_GROUP LTEXT "pbP[W̑I",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP - LTEXT "",IDC_CHOOSE_VIEWCAPTION,270,33,40,10 + LTEXT "",IDC_CHOOSE_VIEWCAPTION,270,33,50,10 END IDD_PREREQ DIALOG DISCARDABLE 0, 0, 317, 179 @@ -370,13 +375,16 @@ CONTROL "GDAL",IDC_PKG_GDAL,"Button", BS_AUTOCHECKBOX,108,78,100,8 CONTROL "Apache",IDC_PKG_APACHE,"Button", - BS_AUTOCHECKBOX,108,93,100,8 + BS_AUTOCHECKBOX,108,93,45,8 CONTROL "uDig",IDC_PKG_UDIG,"Button", BS_AUTOCHECKBOX,108,108,100,8 CONTROL "OpenEV",IDC_PKG_OPENEV,"Button", BS_AUTOCHECKBOX,108,123,100,8 CONTROL "GRASS GIS",IDC_PKG_GRASS,"Button", BS_AUTOCHECKBOX,108,138,100,8 + LTEXT "|[gԍ:",IDC_APACHE_PORT_LABEL,154,90,40,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_APACHE_PORT,210,90,25,12,ES_AUTOHSCROLL ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 LTEXT "pbP[WIĂ",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT @@ -436,4 +444,17 @@ "ʏ킱̂悤ȃpbP[W͍폜͖OύXꂽpbP[WłA܂͎IɏꂽCtXgN`[pbP[W̋̃v[Xz_łB" IDS_SELPKG_INSTALL "CXg[pbP[WIĂB" IDS_SELPKG_DOWNLOAD "_E[hpbP[WIĂB " -END \ No newline at end of file + IDS_LIST_CURRENT "ŐV" + IDS_LIST_NEW "VK" + IDS_LIST_BIN "s`?" + IDS_LIST_SRC "\[X?" + IDS_LIST_CATEGORIES "JeS" + IDS_LIST_SIZE "TCY" + IDS_LIST_PACKAGE "pbP[W" + IDS_CAPTION_FULL "S" + IDS_CAPTION_PARTIAL "ꕔ" + IDS_CAPTION_UPTODATE "Abvf[g" + IDS_CAPTION_NOTINSTALLED "CXg[" + IDS_CAPTION_CATEGORY "JeS" +END + Index: PickCategoryLine.cc =================================================================== --- PickCategoryLine.cc (revision 1162) +++ PickCategoryLine.cc (working copy) @@ -76,7 +76,7 @@ int max_y = y + (row + bucket.size ()) * theView.row_height; // paint all contained rows, columnwise - for (int i = 0; theView.headers[i].text; i++) + for (int i = 0; strlen(theView.headers[i].text); i++) { RECT r; r.left = x + theView.headers[i].x; Index: script.cc =================================================================== --- script.cc (revision 1162) +++ script.cc (working copy) @@ -32,6 +32,7 @@ #include "io_stream.h" #include "script.h" #include "mkdir.h" +#include "state.h" static std::string sh; static const char *cmd = 0; @@ -64,6 +65,11 @@ old_path).c_str()); SetEnvironmentVariable ("OSGEO4W_ROOT", get_root_dir ().c_str()); + char portnum[10]; + sprintf(portnum,"%d",(apache_port_number!=0) ? apache_port_number:80); + printf("%s\n",portnum); + SetEnvironmentVariable ("APACHE_PORT", portnum); + std::string startmenu; get_startmenu(startmenu); SetEnvironmentVariable ("OSGEO4W_STARTMENU", startmenu.c_str()); Index: PickView.cc =================================================================== --- PickView.cc (revision 1162) +++ PickView.cc (working copy) @@ -36,7 +36,7 @@ {"Categories", 0, 0, true}, {"Size", 0, 0, true}, {"Package", 0, 0, true}, - {0, 0, 0, false} + {"", 0, 0, false} }; static PickView::Header cat_headers[] = { @@ -47,9 +47,12 @@ {"Src?", 0, 0, false}, {"Size", 0, 0, true}, {"Package", 0, 0, true}, - {0, 0, 0, false} + {"", 0, 0, false} }; + + + // PickView:: views const PickView::views PickView::views::Unknown (0); const PickView::views PickView::views::PackageFull (1); @@ -84,9 +87,12 @@ return index; } + void PickView::set_headers () { + + if (view_mode == views::Unknown) return; if (view_mode == views::PackageFull || @@ -118,16 +124,56 @@ } else return; + while (int n = SendMessage (listheader, HDM_GETITEMCOUNT, 0, 0)) { SendMessage (listheader, HDM_DELETEITEM, n - 1, 0); } + int i; for (i = 0; i <= last_col; i++) - DoInsertItem (listheader, i, headers[i].width, (char *) headers[i].text); + { + DoInsertItem (listheader, i, headers[i].width, (char *) headers[i].text); + } } +#define ARRAYSIZE(a) (sizeof (a) / sizeof ((a)[0])) void +PickView::set_hederslabel() +{ + +//* + //current + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_CURRENT, pkg_headers[0].text, ARRAYSIZE ( pkg_headers[0].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_CURRENT, cat_headers[1].text, ARRAYSIZE ( pkg_headers[1].text ) ); + + //New + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_NEW, pkg_headers[1].text, ARRAYSIZE ( pkg_headers[1].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_NEW, cat_headers[2].text, ARRAYSIZE ( pkg_headers[2].text ) ); + + //Bin? + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_BIN, pkg_headers[2].text, ARRAYSIZE ( pkg_headers[2].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_BIN, cat_headers[3].text, ARRAYSIZE ( pkg_headers[3].text ) ); + + //Src? + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_SRC, pkg_headers[3].text, ARRAYSIZE ( pkg_headers[3].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_SRC, cat_headers[4].text, ARRAYSIZE ( pkg_headers[4].text ) ); + + //Categories + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_CATEGORIES, pkg_headers[4].text, ARRAYSIZE ( pkg_headers[4].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_CATEGORIES, cat_headers[0].text, ARRAYSIZE ( pkg_headers[0].text ) ); + + //Size + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_SIZE, pkg_headers[5].text, ARRAYSIZE ( pkg_headers[5].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_SIZE, cat_headers[5].text, ARRAYSIZE ( pkg_headers[5].text ) ); + + //Package + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_PACKAGE, pkg_headers[6].text, ARRAYSIZE ( pkg_headers[6].text ) ); + LoadString ( GetModuleHandle ( NULL ), IDS_LIST_PACKAGE, cat_headers[6].text, ARRAYSIZE ( pkg_headers[6].text ) ); +//*/ +} + +void PickView::note_width (PickView::Header *hdrs, HDC dc, const std::string& string, int addend, int column) { @@ -153,6 +199,8 @@ packagedb db; contents.empty (); + + if (view_mode == PickView::views::Category) { contents.ShowLabel (true); @@ -166,11 +214,13 @@ else { contents.ShowLabel (false); + // iterate through every package for (vector ::iterator i = db.packages.begin (); i != db.packages.end (); ++i) { packagemeta & pkg = **i; + if ( // "Full" : everything (view_mode == PickView::views::PackageFull) @@ -214,6 +264,35 @@ InvalidateRect (GetHWND(), &r, TRUE); } + +char * +PickView::mode_caption (char *src, size_t sz ) +{ + switch (view_mode.captionvalue ()) + { + case 1: + LoadString ( GetModuleHandle ( NULL ), IDS_CAPTION_FULL, src, sz ); + return src; + case 2: + LoadString ( GetModuleHandle ( NULL ), IDS_CAPTION_PARTIAL, src, sz ); + return src; + case 3: + LoadString ( GetModuleHandle ( NULL ), IDS_CAPTION_UPTODATE, src, sz ); + return src; + case 4: + LoadString ( GetModuleHandle ( NULL ), IDS_CAPTION_NOTINSTALLED, src,sz ); + return src; + case 5: + LoadString ( GetModuleHandle ( NULL ), IDS_CAPTION_CATEGORY, src, sz ); + return src; + default: + strcpy(src,""); + return src; + } + +} + + const char * PickView::mode_caption () { @@ -240,6 +319,13 @@ } } +int +PickView::views::captionvalue () +{ + return _value; +} + + /* meant to be called on packagemeta::categories */ bool isObsolete (set &categories) @@ -412,7 +498,7 @@ { int i; - for (i = 0; headers[i].text; i++) + for (i = 0; strlen(headers[i].text); i++) { headers[i].width = 0; headers[i].x = 0; @@ -424,6 +510,8 @@ // conversion by the unwise String(int) constructor. note_width (headers, dc, "0", HMARGIN + 11, bintick_col); note_width (headers, dc, "0", HMARGIN + 11, srctick_col); + + // accomodate the width of each category name packagedb db; @@ -485,6 +573,7 @@ note_width (headers, dc, compound_cat, HMARGIN, cat_col); } } + // ensure that the new_col is wide enough for all the labels const char *captions[] = { "Uninstall", "Skip", "Reinstall", "Retrieve", @@ -508,6 +597,7 @@ void PickView::init(views _mode) { + HDC dc = GetDC (GetHWND()); sysfont = GetStockObject (DEFAULT_GUI_FONT); SelectObject (dc, sysfont); @@ -574,6 +664,8 @@ ReleaseDC (GetHWND (), dc); view_mode = _mode; + + set_hederslabel(); refresh (); } Index: res_en.rc =================================================================== --- res_en.rc (revision 1162) +++ res_en.rc (working copy) @@ -244,8 +244,10 @@ "default. You can always run this program at any time in " "the future to add, remove, or upgrade packages as " "necessary.",IDC_SPLASH_TEXT,35,25,265,90 - CONTROL "Express Install",IDC_EXPRESS,"Button", - BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,124,73,10 + CONTROL "Express Desktop Install",IDC_EXPRESS_D,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,104,173,10 + CONTROL "Express Web-GIS Install",IDC_EXPRESS_I,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,60,124,173,10 CONTROL "Advanced Install",IDC_ADVANCED,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,60,144,69,10 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 @@ -382,7 +384,7 @@ CONTROL "GDAL",IDC_PKG_GDAL,"Button", BS_AUTOCHECKBOX,108,78,100,8 CONTROL "Apache",IDC_PKG_APACHE,"Button", - BS_AUTOCHECKBOX,108,93,100,8 + BS_AUTOCHECKBOX,108,93,45,8 CONTROL "uDig",IDC_PKG_UDIG,"Button", BS_AUTOCHECKBOX,108,108,100,8 CONTROL "OpenEV",IDC_PKG_OPENEV,"Button", @@ -390,7 +392,9 @@ CONTROL "GRASS GIS",IDC_PKG_GRASS,"Button", BS_AUTOCHECKBOX,108,138,100,8 ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20 - + LTEXT "Port number:",IDC_APACHE_PORT_LABEL,154,90,50,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_APACHE_PORT,210,90,25,12,ES_AUTOHSCROLL LTEXT "Select Packages",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP END @@ -459,4 +463,16 @@ "infrastructure packages that are handled automatically." IDS_SELPKG_INSTALL "Select packages to install " IDS_SELPKG_DOWNLOAD "Select packages to download " + IDS_LIST_CURRENT "Current" + IDS_LIST_NEW "New" + IDS_LIST_BIN "Bin?" + IDS_LIST_SRC "Src?" + IDS_LIST_CATEGORIES "Categories" + IDS_LIST_SIZE "Size" + IDS_LIST_PACKAGE "Package" + IDS_CAPTION_FULL "Full" + IDS_CAPTION_PARTIAL "Partial" + IDS_CAPTION_UPTODATE "Up To Date" + IDS_CAPTION_NOTINSTALLED "Not Installed" + IDS_CAPTION_CATEGORY "Category" END