Changeset 718 in dev
- Timestamp:
- Aug 13, 2008, 10:42:13 PM (16 years ago)
- Location:
- trunk/ab5.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/DialogBoxes.cpp
r717 r718 1020 1020 BOOL bOptionToolbar; 1021 1021 BOOL bOptionRad; 1022 BOOL bOptionWeb;1023 1022 BOOL temp_bSaveCheckProject; 1024 1023 BOOL temp_bLineAdjust; … … 1039 1038 CTheme obj_temp_Theme; 1040 1039 1041 BOOL temp_bCtrlKeyHyperLink;1042 BOOL temp_bSaveWebFindStr;1043 CDBDomain *pobj_temp_DBDomain;1044 1040 1045 1041 void SaveSetting(void){ … … 1118 1114 //ライン アジャスタ 1119 1115 pobj_nv->bLineAdjust=temp_bLineAdjust; 1120 }1121 if(bOptionWeb){1122 pobj_nv->bCtrlKeyHyperLink=temp_bCtrlKeyHyperLink;1123 1124 pobj_nv->bSaveWebFindStr=temp_bSaveWebFindStr;1125 1126 //SideWebウィンドウを再表示1127 //delete pobj_SideWeb;1128 //pobj_SideWeb=new CSideWeb(hOwner);1129 //ActiveBasic::IDE::Program::mainFrame.Resized();1130 1116 } 1131 1117 return; … … 1962 1948 return 0; 1963 1949 } 1964 char szDomainAdd_Name[255];1965 char szDomainAdd_Domain[255];1966 BOOL CALLBACK Dlg_Option_Web_Domain_Add(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){1967 switch(message){1968 case WM_INITDIALOG:1969 SetPosCenter(hwnd);1970 SetFocus(GetDlgItem(hwnd,IDC_NAME));1971 1972 if(lParam!=-1){1973 SetWindowText(hwnd,"Web検索用ドメインを編集");1974 SetDlgItemText(hwnd,IDC_NAME,szDomainAdd_Name);1975 SetDlgItemText(hwnd,IDC_DOMAIN,szDomainAdd_Domain);1976 }1977 break;1978 case WM_COMMAND:1979 switch(LOWORD(wParam)){1980 case IDOK:1981 GetDlgItemText(hwnd,IDC_NAME,szDomainAdd_Name,255);1982 GetDlgItemText(hwnd,IDC_DOMAIN,szDomainAdd_Domain,255);1983 EndDialog(hwnd,1);1984 return 1;1985 case IDCANCEL:1986 EndDialog(hwnd,0);1987 return 1;1988 }1989 return 0;1990 }1991 return 0;1992 }1993 BOOL CALLBACK Dlg_Option_Web(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){1994 HWND hListView;1995 NMHDR *nmhdr;1996 int i;1997 char temporary[255];1998 switch(message){1999 case WM_INITDIALOG:2000 2001 bOptionWeb=1;2002 2003 2004 //Ctrlキーによるハイパーリンク2005 if(pobj_nv->bCtrlKeyHyperLink) SendDlgItemMessage(hwnd,IDC_CTRLKEY_HYPERLINK,BM_SETCHECK,BST_CHECKED,0);2006 2007 //Web検索文字列を保存するかどうか2008 if(pobj_nv->bSaveWebFindStr) SendDlgItemMessage(hwnd,IDC_SAVE_WEBFINDSTR,BM_SETCHECK,BST_CHECKED,0);2009 2010 2011 //拡張スタイル2012 DWORD dwStyle;2013 hListView=GetDlgItem(hwnd,IDC_DOMAIN_LIST);2014 dwStyle=ListView_GetExtendedListViewStyle(hListView);2015 dwStyle|=LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES;2016 ListView_SetExtendedListViewStyle(hListView,dwStyle);2017 2018 LV_COLUMN ListView_Column;2019 ListView_Column.mask=LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;2020 ListView_Column.fmt=LVCFMT_LEFT;2021 2022 ListView_Column.cx=80;2023 ListView_Column.pszText="表示名";2024 ListView_Column.iSubItem=0;2025 ListView_InsertColumn(hListView,ListView_Column.iSubItem,&ListView_Column);2026 2027 ListView_Column.cx=200;2028 ListView_Column.pszText="ドメイン";2029 ListView_Column.iSubItem++;2030 ListView_InsertColumn(hListView,ListView_Column.iSubItem,&ListView_Column);2031 2032 //一時オブジェクトにコピー2033 pobj_temp_DBDomain->copy_get(pobj_nv->pobj_DBDomain);2034 2035 //ドメインリストにデータをセット2036 pobj_temp_DBDomain->SetListView(hListView);2037 2038 break;2039 case WM_COMMAND:2040 switch(LOWORD(wParam)){2041 case IDC_ADD:2042 if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_OPTION_WEB_DOMAIN_ADD),hwnd,(DLGPROC)Dlg_Option_Web_Domain_Add,-1)) return 1;2043 2044 pobj_temp_DBDomain->add(szDomainAdd_Name,szDomainAdd_Domain);2045 return 1;2046 case IDC_DELETE:2047 hListView=GetDlgItem(hwnd,IDC_DOMAIN_LIST);2048 for(i=0;i<ListView_GetItemCount(hListView);i++){2049 if(ListView_GetItemState(hListView,i,LVIS_SELECTED)){2050 ListView_GetItemText(hListView,i,0,temporary,255);2051 pobj_temp_DBDomain->del(temporary);2052 break;2053 }2054 }2055 return 1;2056 case IDC_EDIT:2057 hListView=GetDlgItem(hwnd,IDC_DOMAIN_LIST);2058 for(i=0;i<ListView_GetItemCount(hListView);i++){2059 if(ListView_GetItemState(hListView,i,LVIS_SELECTED)){2060 ListView_GetItemText(hListView,i,0,temporary,255);2061 2062 ListView_GetItemText(hListView,i,0,szDomainAdd_Name,255);2063 ListView_GetItemText(hListView,i,1,szDomainAdd_Domain,255);2064 lstrcpy(temporary,szDomainAdd_Name);2065 if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_OPTION_WEB_DOMAIN_ADD),hwnd,(DLGPROC)Dlg_Option_Web_Domain_Add,i)) return 1;2066 2067 pobj_temp_DBDomain->change(temporary,szDomainAdd_Name,szDomainAdd_Domain);2068 }2069 }2070 return 1;2071 }2072 return 0;2073 case WM_NOTIFY:2074 nmhdr=(NMHDR *)lParam;2075 if(nmhdr->code==PSN_APPLY||nmhdr->code==PSN_KILLACTIVE){2076 2077 //Ctrlキーによるハイパーリンク2078 if(SendDlgItemMessage(hwnd,IDC_CTRLKEY_HYPERLINK,BM_GETCHECK,0,0)) temp_bCtrlKeyHyperLink=1;2079 else temp_bCtrlKeyHyperLink=0;2080 2081 //Web検索文字列を保存するかどうか2082 if(SendDlgItemMessage(hwnd,IDC_SAVE_WEBFINDSTR,BM_GETCHECK,0,0)) temp_bSaveWebFindStr=1;2083 else temp_bSaveWebFindStr=0;2084 2085 if(nmhdr->code==PSN_APPLY) SaveSetting();2086 }2087 if(nmhdr->idFrom==IDC_DOMAIN_LIST){2088 if(nmhdr->code==NM_DBLCLK){2089 LPNMLISTVIEW lpnmListView;2090 lpnmListView=(LPNMLISTVIEW)lParam;2091 2092 char szBeforeName[255];2093 ListView_GetItemText(nmhdr->hwndFrom,lpnmListView->iItem,0,szDomainAdd_Name,255);2094 ListView_GetItemText(nmhdr->hwndFrom,lpnmListView->iItem,1,szDomainAdd_Domain,255);2095 lstrcpy(szBeforeName,szDomainAdd_Name);2096 if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_OPTION_WEB_DOMAIN_ADD),hwnd,(DLGPROC)Dlg_Option_Web_Domain_Add,lpnmListView->iItem)) return 1;2097 2098 pobj_temp_DBDomain->change(szBeforeName,szDomainAdd_Name,szDomainAdd_Domain);2099 }2100 }2101 return 1;2102 }2103 return 0;2104 }2105 1950 void DlgOptionSetting(HWND hwnd){ 2106 1951 PROPSHEETHEADER psh; … … 2115 1960 bOptionToolbar=0; 2116 1961 bOptionRad=0; 2117 bOptionWeb=0;2118 1962 2119 1963 i=0; … … 2159 2003 #endif 2160 2004 2005 2161 2006 i++; 2162 psp[i].dwSize=sizeof(PROPSHEETPAGE);2163 psp[i].dwFlags=PSP_DEFAULT;2164 psp[i].hInstance=hResInst;2165 psp[i].pszTemplate=MAKEINTRESOURCE(IDD_OPTION_WEB);2166 psp[i].pfnDlgProc=(DLGPROC)Dlg_Option_Web;2167 hpsp[i]=CreatePropertySheetPage(&psp[i]);2168 2169 i++;2170 2171 2172 2173 ///////////////////////////2174 // 一時オブジェクトを生成2175 ///////////////////////////2176 2177 pobj_temp_DBDomain=new CDBDomain();2178 2007 2179 2008 … … 2189 2018 psh.ppsp=psp; 2190 2019 PropertySheet(&psh); 2191 2192 2193 2194 ///////////////////////////2195 // 一時オブジェクトを破棄2196 ///////////////////////////2197 2198 delete pobj_temp_DBDomain;2199 2020 } 2200 2021 BOOL CALLBACK DialogAbout(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ -
trunk/ab5.0/abdev/abdev/NonVolatile.cpp
r717 r718 518 518 519 519 //Ctrlキーによるハイパーリンク 520 bCtrlKeyHyperLink= 1;520 bCtrlKeyHyperLink=0; 521 521 522 522 //Web検索文字列を保存するかどうか 523 bSaveWebFindStr= 1;523 bSaveWebFindStr=0; 524 524 525 525 //アクティブ デザイン テーマ -
trunk/ab5.0/jenga/include/common/Environment.h
r524 r718 19 19 { 20 20 static std::string appDir; 21 if( appDir. size() == 0)21 if( appDir.empty() ) 22 22 { 23 23 char temporary[MAX_PATH]; … … 40 40 { 41 41 static std::string appFileName; 42 if( appFileName. size() == 0)42 if( appFileName.empty() ) 43 43 { 44 44 char temporary[MAX_PATH]; … … 57 57 { 58 58 static std::string appFilePath; 59 if( appFilePath. size() == 0)59 if( appFilePath.empty() ) 60 60 { 61 61 char temporary[MAX_PATH]; … … 66 66 return appFilePath; 67 67 } 68 69 static const std::string &GetUserAppDir() 70 { 71 static std::string userAppDir; 72 if( userAppDir.empty() ) 73 { 74 char szDirPath[MAX_PATH]; 75 if( SHGetSpecialFolderPath( NULL, szDirPath, CSIDL_APPDATA, TRUE ) == FALSE ) 76 { 77 throw; 78 } 79 userAppDir = szDirPath; 80 81 if( userAppDir[userAppDir.size()-1] == '\\' ) 82 { 83 userAppDir = userAppDir.substr( 0, userAppDir.size() - 1 ); 84 } 85 } 86 87 return userAppDir; 88 } 68 89 }; 69 90 -
trunk/ab5.0/jenga/src/common/Directory.cpp
r694 r718 8 8 if ( isMake ) 9 9 { 10 if (!::MakeSureDirectoryPathExists(path.c_str())) 10 std::string tempPath = path; 11 if( !tempPath.empty() && tempPath[tempPath.size()-1] != '\\' ) 12 { 13 tempPath += "\\"; 14 } 15 if (!::MakeSureDirectoryPathExists(tempPath.c_str())) 11 16 { 12 17 Jenga::Throw( "MakeSureDirectoryPathExists failed!" );
Note:
See TracChangeset
for help on using the changeset viewer.