Browse Source

Use default open/save dialog

import/tags/kmeleon75
boisso 8 years ago
parent
commit
04fca357eb
  1. 2
      k-meleon/Components.cpp
  2. 11
      k-meleon/MfcEmbed.cpp
  3. 6
      k-meleon/Preferences.cpp

2
k-meleon/Components.cpp

@ -55,7 +55,7 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
{NS_PROMPTSERVICE_CONTRACTID, &kNS_PROMPTSERVICE_CID},
{"@mozilla.org/prompter;1", &kNS_PROMPTSERVICE_CID},
{NS_HELPERAPPLAUNCHERDLG_CONTRACTID, &kNS_UNKNOWNCONTENTTYPEHANDLER_CID},
//{NS_HELPERAPPLAUNCHERDLG_CONTRACTID, &kNS_UNKNOWNCONTENTTYPEHANDLER_CID},
{"@mozilla.org/uriloader/content-handler;1?type=application/k-skin", &kNS_UNKNOWNCONTENTTYPEHANDLER_CID},
{NS_COOKIEPROMPTSERVICE_CONTRACTID, &kNS_COOKIEPROMPTSERVICE_CID},
{NS_CERTIFICATEDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID},

11
k-meleon/MfcEmbed.cpp

@ -1607,6 +1607,17 @@ void CMfcEmbedApp::CheckProfileVersion()
toDelete = GetMozDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR) + _T("\\xul.mfl");
DeleteFile(toDelete);
if (oldVersion < 0x02010001) {
bool b = theApp.preferences.GetBool("kmeleon.download.useDownloadDir", FALSE);
theApp.preferences.SetBool("browser.download.useDownloadDir", b);
theApp.preferences.Clear("kmeleon.download.useDownloadDir");
CString s = theApp.preferences.GetString("kmeleon.download.dir", _T(""));
theApp.preferences.SetString("browser.download.dir", s);
theApp.preferences.Clear("kmeleon.download.dir");
s = theApp.preferences.GetString("kmeleon.download.lastDir", _T(""));
theApp.preferences.SetString("browser.download.lastDir", s);
theApp.preferences.Clear("kmeleon.download.lastDir");
}
if (oldVersion < 0x02010000) {
nsCOMPtr<nsIFile> mimeFile;

6
k-meleon/Preferences.cpp

@ -120,9 +120,9 @@ NS_IMPL_ISUPPORTS(CPrefObserver, nsIObserver);
CPreferences::CPreferences() :
iSaveType("kmeleon.general.saveType", 0),
saveDir("kmeleon.download.saveDir", _T("")),
downloadDir("kmeleon.download.dir", _T("")),
lastDownloadDir("kmeleon.download.lastDir", _T("")),
bUseDownloadDir("kmeleon.download.useDownloadDir", false),
downloadDir("browser.download.dir", _T("")),
lastDownloadDir("browser.download.lastDir", _T("")),
bUseDownloadDir("browser.download.useDownloadDir", false),
bAskOpenSave("kmeleon.download.askOpenSave", true),
bShowMinimized("kmeleon.download.showMinimizedDialog", false),
bFlashWhenCompleted("kmeleon.download.flashWhenCompleted", false),

Loading…
Cancel
Save