• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisione1eb437b2ef69b809001bae979337f2110d99eb0 (tree)
Time2012-02-25 18:27:00
Authorqwerty2501 <riot313@gmai...>
Commiterqwerty2501

Log Message

規定のブラウザとのクッキー共有機能実装

Change Summary

Incremental Difference

Binary files a/nlite.suo and b/nlite.suo differ
--- a/nlite/nlite_property.cpp
+++ b/nlite/nlite_property.cpp
@@ -95,7 +95,7 @@ namespace nlite{
9595 numberNameFlag(FALSE),
9696 autoColorRegisterFlag(FALSE),
9797 activeCountTimeFlag(TRUE),
98- browserType(BT_INTERNET_EXPLORER),
98+ browserType(BT_DEFAULT),
9999 ncvUserSettingReadedFlag(FALSE)
100100 {}
101101
--- a/nlite/nlite_propertyWindow.cpp
+++ b/nlite/nlite_propertyWindow.cpp
@@ -51,6 +51,7 @@ BOOL CCookieSettingWindow::OnInitDialog(CWindow wndFocus, LPARAM lInitParam){
5151 case BT_DEFAULT:
5252
5353 radio = GetDlgItem(IDC_DEFAULT_BT_RADIO);
54+ break;
5455
5556 default:
5657 goto skip;
--- a/shareCookie/shareCookie.c
+++ b/shareCookie/shareCookie.c
@@ -947,9 +947,8 @@ fileopenerr:
947947 BROWSERTYPE getDefaultBrowserType(){
948948
949949 BROWSERTYPE rslt = BT_NOSETTING;
950- WCHAR currentUserSID[_MAX_PATH];
951- DWORD cName = ARRAY_LENGTH(currentUserSID);
952- FILETIME fileTime;
950+ WCHAR browserName[_MAX_PATH];
951+ DWORD cName = sizeof(browserName);
953952 HKEY hKey;
954953 //レジストリキーを読み取り専用でオープン
955954 if(RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\https\\UserChoice",0,KEY_READ,&hKey) != ERROR_SUCCESS){
@@ -957,11 +956,38 @@ BROWSERTYPE getDefaultBrowserType(){
957956 }
958957
959958
959+ if(_tcscmp(browserName,TEXT("ChromeHTML")) == 0){
960960
961+ rslt = BT_GOOGLE_CHROME;
962+
963+ } else if(_tcscmp(browserName,TEXT("IE.HTTP")) == 0 ){
964+
965+ rslt = BT_INTERNET_EXPLORER;
966+
967+ } else if(_tcscmp(browserName,TEXT("FirefoxURL"))==0){
968+
969+ rslt = BT_FIRE_FOX;
970+
971+ } else if(_tcscmp(browserName,TEXT("SafariURL")) == 0){
972+
973+ rslt = BT_SAFARI;
974+ } else if(_tcscmp(browserName,TEXT("Opera.Protocol"))==0){
975+
976+ rslt = BT_OPERA;
977+
978+ } else if(_tcscmp(browserName,TEXT("Sleipnir2.HTTP"))==0){
979+
980+ rslt = BT_IE_COMPONENT;
981+
982+ } else {
983+
984+ rslt = BT_IE_COMPONENT;
985+
986+ }
961987
962988
963- RegQueryValueEx(hKey,TEXT("Progid"),(LPDWORD)NULL,(LPDWORD)NULL,(LPBYTE)&currentUserSID,&cName);
964- //HKEY_CURRENT_USER\Software\Microsoft\Protected Storage System Provider\
989+ RegQueryValueEx(hKey,TEXT("Progid"),(LPDWORD)NULL,(LPDWORD)NULL,(LPBYTE)&browserName,&cName);
990+
965991
966992
967993 RegCloseKey(hKey);