From 47529ca4f074d1851349a022964991153cdb9ebc Mon Sep 17 00:00:00 2001 From: "dougt%meer.net" Date: Fri, 2 Sep 2005 18:15:00 +0000 Subject: [PATCH] Minimo only. Get spacing right. Also enabled global history git-svn-id: svn://10.0.0.236/trunk@179555 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/minimo/base/Minimo.cpp | 109 ++++++++++---------- mozilla/minimo/base/wince/minimo-link-comps | 66 ++++++------ mozilla/minimo/base/wince/minimo-link-names | 66 ++++++------ mozilla/minimo/chrome/content/minimo.js | 5 + mozilla/minimo/customization/all.js | 1 + 5 files changed, 129 insertions(+), 118 deletions(-) diff --git a/mozilla/minimo/base/Minimo.cpp b/mozilla/minimo/base/Minimo.cpp index a64da372414..c466b3f7640 100755 --- a/mozilla/minimo/base/Minimo.cpp +++ b/mozilla/minimo/base/Minimo.cpp @@ -361,6 +361,9 @@ void DoPreferences() return; prefBranch->SetIntPref("snav.keyCode.modifier", 0); + + + prefBranch->GetBoolPref("config.wince.dumpJSConsole", &gDumpJSConsole); } @@ -559,64 +562,66 @@ int main(int argc, char *argv[]) gtk_set_locale(); gtk_init(&argc, &argv); #endif - - if (DoesProcessAlreadyExist()) - return 0; - - CreateSplashScreen(); - + + if (DoesProcessAlreadyExist()) + return 0; + + CreateSplashScreen(); + #ifdef HACKY_PRE_LOAD_LIBRARY - LoadKnownLibs(); + LoadKnownLibs(); #endif - + #ifdef _BUILD_STATIC_BIN - NS_InitEmbedding(nsnull, nsnull, kPStaticModules, kStaticModuleCount); + NS_InitEmbedding(nsnull, nsnull, kPStaticModules, kStaticModuleCount); #else - NS_InitEmbedding(nsnull, nsnull); + NS_InitEmbedding(nsnull, nsnull); #endif // Choose the new profile - if (NS_FAILED(StartupProfile())) - return 1; - - DoPreferences(); - OverrideComponents(); - - NS_TIMELINE_ENTER("appStartup"); - nsCOMPtr appShell = do_CreateInstance(kAppShellCID); - appShell->Create(nsnull, nsnull); - - ApplicationObserver *appObserver = new ApplicationObserver(appShell); - if (!appObserver) - return 1; - NS_ADDREF(appObserver); - - WindowCreator *creatorCallback = new WindowCreator(appShell); - if (!creatorCallback) - return 1; - - nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); - wwatch->SetWindowCreator(creatorCallback); - - nsCOMPtr newWindow; - wwatch->OpenWindow(nsnull, start_url, "_blank", "chrome,dialog=no,all", nsnull, getter_AddRefs(newWindow)); - - appShell->Run(); - - appShell = nsnull; - wwatch = nsnull; - newWindow = nsnull; - - delete appObserver; - delete creatorCallback; - - if (gDumpJSConsole) - WriteConsoleLog(); - - // Close down Embedding APIs - NS_TermEmbedding(); - + if (NS_FAILED(StartupProfile())) + return 1; + + DoPreferences(); + OverrideComponents(); + + NS_TIMELINE_ENTER("appStartup"); + nsCOMPtr appShell = do_CreateInstance(kAppShellCID); + appShell->Create(nsnull, nsnull); + + ApplicationObserver *appObserver = new ApplicationObserver(appShell); + if (!appObserver) + return 1; + NS_ADDREF(appObserver); + + WindowCreator *creatorCallback = new WindowCreator(appShell); + if (!creatorCallback) + return 1; + + nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); + wwatch->SetWindowCreator(creatorCallback); + + nsCOMPtr newWindow; + wwatch->OpenWindow(nsnull, start_url, "_blank", "chrome,dialog=no,all", nsnull, getter_AddRefs(newWindow)); + + appShell->Run(); + + appShell = nsnull; + wwatch = nsnull; + newWindow = nsnull; + + delete appObserver; + delete creatorCallback; + + if (gDumpJSConsole) + WriteConsoleLog(); + + // Close down Embedding APIs + NS_TermEmbedding(); + #ifdef HACKY_PRE_LOAD_LIBRARY - UnloadKnownLibs(); + UnloadKnownLibs(); #endif - return NS_OK; + return NS_OK; } + + diff --git a/mozilla/minimo/base/wince/minimo-link-comps b/mozilla/minimo/base/wince/minimo-link-comps index d6b9a3c679d..76cb412e9d1 100755 --- a/mozilla/minimo/base/wince/minimo-link-comps +++ b/mozilla/minimo/base/wince/minimo-link-comps @@ -1,33 +1,33 @@ -xpconect -mozuconv -i18n -necko -jar50 -rdf -pref -caps -gkparser -gkgfxwin -imglib2 -gkwidget -gklayout -docshell -embedcmp -webbrwsr -texteditor -txmgr -appshell -chrome -mork -tkitcmps -xmlextra -t8iix -websrvcs -gkplugin -softkey -pipboot -pipnss -pippki -phone -snav -ssr +xpconect +mozuconv +i18n +necko +jar50 +rdf +pref +caps +gkparser +gkgfxwin +imglib2 +gkwidget +gklayout +docshell +embedcmp +webbrwsr +texteditor +txmgr +appshell +chrome +mork +tkitcmps +xmlextra +t8iix +websrvcs +gkplugin +softkey +pipboot +pipnss +pippki +phone +snav +ssr diff --git a/mozilla/minimo/base/wince/minimo-link-names b/mozilla/minimo/base/wince/minimo-link-names index 2648ad6323c..b8629272f1b 100755 --- a/mozilla/minimo/base/wince/minimo-link-names +++ b/mozilla/minimo/base/wince/minimo-link-names @@ -1,33 +1,33 @@ -xpconnect -nsUConvModule -nsI18nModule -necko_core_and_primary_protocols -nsJarModule -nsPrefModule -nsSecurityManagerModule -nsRDFModule -nsParserModule -nsGfxModule -nsImageLib2Module -nsPluginModule -nsWidgetModule -nsLayoutModule -docshell_provider -embedcomponents -Browser_Embedding_Module -nsEditorModule -nsTransactionManagerModule -appshell -nsChromeModule -nsMorkModule -nsToolkitCompsModule -nsXMLExtrasModule -TransformiixModule -nsWebServicesModule -SoftKeyBoardModule -BOOT -NSS -PKI -nsPhoneSupportModule -SpatialNavigationModule -SSRModule +xpconnect +nsUConvModule +nsI18nModule +necko_core_and_primary_protocols +nsJarModule +nsPrefModule +nsSecurityManagerModule +nsRDFModule +nsParserModule +nsGfxModule +nsImageLib2Module +nsPluginModule +nsWidgetModule +nsLayoutModule +docshell_provider +embedcomponents +Browser_Embedding_Module +nsEditorModule +nsTransactionManagerModule +appshell +nsChromeModule +nsMorkModule +nsToolkitCompsModule +nsXMLExtrasModule +TransformiixModule +nsWebServicesModule +SoftKeyBoardModule +BOOT +NSS +PKI +nsPhoneSupportModule +SpatialNavigationModule +SSRModule diff --git a/mozilla/minimo/chrome/content/minimo.js b/mozilla/minimo/chrome/content/minimo.js index 5ec6e4dc188..283f9e48913 100755 --- a/mozilla/minimo/chrome/content/minimo.js +++ b/mozilla/minimo/chrome/content/minimo.js @@ -223,9 +223,14 @@ function browserInit(refTab) getBrowser().addProgressListener(BrowserStatusHandler, Components.interfaces.nsIWebProgress.NOTIFY_ALL); gBrowserStatusHandlerArray.push(BrowserStatusHandler); + var refBrowser=getBrowser().getBrowserForTab(refTab); var webNavigation=refBrowser.webNavigation; webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"].createInstance(Components.interfaces.nsISHistory); + + // enable global history + getBrowser().docShell.QueryInterface(Components.interfaces.nsIDocShellHistory).useGlobalHistory = true; + } catch (e) { alert("Error trying to startup browser. Please report this as a bug:\n" + e); } diff --git a/mozilla/minimo/customization/all.js b/mozilla/minimo/customization/all.js index 96399f190df..1d2208c1350 100755 --- a/mozilla/minimo/customization/all.js +++ b/mozilla/minimo/customization/all.js @@ -154,3 +154,4 @@ pref("security.warn_submit_insecure", false); pref("network.autodial-helper.enabled", true); pref("config.wince.useOKBtn", true); +