Bug 543976 - Clean up Maemo defines. r=mfinkle
authorDoug Turner <dougt@dougt.org>
Tue, 09 Feb 2010 17:00:40 -0800
changeset 66003 bd527d18c61cdfb25dbb6f4c6f8636d4bd5e50c9
parent 66002 4f801718d7316ca5a926ad13f50c13ba3ccaff8a
child 66004 9cb6a4e5392440270afd9f320961152a799556fd
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs543976
Bug 543976 - Clean up Maemo defines. r=mfinkle
mobile/app/mobile.js
mobile/chrome/content/BrowserView.js
mobile/chrome/content/Util.js
mobile/chrome/content/browser.xul
mobile/components/DirectoryProvider.js
mobile/components/phone/Makefile.in
mobile/components/phone/nsPhoneSupport.cpp
mobile/installer/debian/fennec.postinst.in
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -37,17 +37,17 @@
 #filter substitution
 
 pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
 pref("general.useragent.extra.mobile", "@APP_UA_NAME_EXTRA@/@APP_VERSION_EXTRA@ Fennec/@APP_VERSION@");
 pref("browser.chromeURL", "chrome://browser/content/");
 
 pref("browser.startup.homepage", "about:firstrun");
 
-#if MOZ_PLATFORM_HILDON
+#if MOZ_PLATFORM_MAEMO
 pref("browser.ui.cursor", false);
 #elifdef WINCE
 pref("browser.ui.cursor", false);
 #else // DESKTOP
 pref("browser.ui.cursor", true);
 #endif
 
 /* use custom widget for html:select */
@@ -64,17 +64,17 @@ pref("browser.cache.memory.enable", true
 pref("browser.cache.memory.capacity", 1024); // kilobytes
 
 /* tile cache prefs */
 /* -1 = default to very small value for the number of tiles unless we know about
         the device in which case we set this to an optimal value
 */
 #ifdef WINCE
 pref("tile.cache.size", 15); // tiles
-#elifdef MOZ_PLATFORM_HILDON
+#elifdef MOZ_PLATFORM_MAEMO
 pref("tile.cache.size", -1); // tiles
 #else
 pref("tile.cache.size", 30); // tiles
 #endif
 
 /* image cache prefs */
 pref("image.cache.size", 1048576); // bytes
 
@@ -90,17 +90,17 @@ pref("network.http.pipelining", true);
 pref("network.http.pipelining.ssl", true);
 pref("network.http.proxy.pipelining", true);
 pref("network.http.pipelining.maxrequests" , 6);
 pref("network.http.keep-alive.timeout", 600);
 pref("network.http.max-connections", 6);
 pref("network.http.max-connections-per-server", 4);
 pref("network.http.max-persistent-connections-per-server", 4);
 pref("network.http.max-persistent-connections-per-proxy", 4);
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
 pref("network.autodial-helper.enabled", true);
 #endif
 
 /* session history */
 pref("browser.sessionhistory.max_total_viewers", 1);
 pref("browser.sessionhistory.max_entries", 50);
 
 /* these should help performance */
@@ -308,17 +308,17 @@ pref("privacy.item.offlineApps", true);
 pref("privacy.item.history", true);
 pref("privacy.item.formdata", true);
 pref("privacy.item.downloads", true);
 pref("privacy.item.passwords", true);
 pref("privacy.item.sessions", true);
 pref("privacy.item.geolocation", true);
 pref("privacy.item.siteSettings", true);
 
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
 pref("plugins.force.wmode", "opaque");
 #endif
 
 // URL to the Learn More link XXX this is the firefox one.  Bug 495578 fixes this.
 pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
 
 // base url for the wifi geolocation network provider
 pref("geo.wifi.uri", "https://www.google.com/loc/json");
--- a/mobile/chrome/content/BrowserView.js
+++ b/mobile/chrome/content/BrowserView.js
@@ -245,17 +245,17 @@ BrowserView.prototype = {
     try {
       cacheSize = gPrefService.getIntPref("tile.cache.size");
     } catch(e) {}
 
     if (cacheSize == -1) {
       let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
       let device = sysInfo.get("device");
       switch (device) {
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
         case "Nokia N900":
           cacheSize = 26;
           break;
         case "Nokia N8xx":
           // N8xx has half the memory of N900 and crashes with higher numbers
           cacheSize = 10;
           break;
 #endif
--- a/mobile/chrome/content/Util.js
+++ b/mobile/chrome/content/Util.js
@@ -185,17 +185,17 @@ let Util = {
     }
 
     return resultSoFar;
   },
 
   // Put the Mozilla networking code into a state that will kick the auto-connection
   // process.
   forceOnline: function forceOnline() {
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
     gIOService.offline = false;
 #endif
   }
 };
 
 /**
  * Cache of commonly used elements.
  */
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -53,17 +53,17 @@
 
 <window id="main-window"
         onload="Browser.startup();"
         onunload="Browser.shutdown();"
         windowtype="navigator:browser"
         title="&brandShortName;"
 #ifdef WINCE
         sizemode="fullscreen"
-#elifdef MOZ_PLATFORM_HILDON
+#elifdef MOZ_PLATFORM_MAEMO
         sizemode="fullscreen"
 #else
         width="800"
         height="500"
 #endif
         onkeypress="onDebugKeyPress(event);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml">
@@ -143,17 +143,17 @@
   </commandset>
 
   <keyset id="mainKeyset">
     <!-- basic navigation -->
     <key id="key_back" keycode="VK_LEFT" command="cmd_back" modifiers="control"/>
     <key id="key_forward" keycode="VK_RIGHT" command="cmd_forward" modifiers="control"/>
     <key id="key_back2" keycode="VK_BACK" command="cmd_back"/>
     <key id="key_forward2" keycode="VK_BACK" command="cmd_forward" modifiers="shift"/>
-#ifndef MOZ_PLATFORM_HILDON
+#ifndef MOZ_PLATFORM_MAEMO
     <key id="key_reload" keycode="VK_F5" command="cmd_reload"/>
 #else
     <!-- F5 on maemo is "home" which is a task switching key -->
 #endif
     <key id="key_focusURL" key="l" modifiers="accel" command="cmd_openLocation"/>
 
     <!-- scrolling -->
     <key id="key_pageUp" keycode="VK_UP" modifiers="shift" command="cmd_scrollPageUp"/>
@@ -192,17 +192,17 @@
 
       <!-- Page Area -->
       <scrollbox id="page-scrollbox" class="window-width window-height" style="overflow: hidden;">
         <vbox>
           <!-- Main Toolbar -->
           <box id="toolbar-container" class="panel-dark toolbar-height">
             <box id="toolbar-moveable-container">
               <toolbar id="toolbar-main" class="panel-dark window-width">
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
                 <toolbarbutton id="tool-app-switch" class="button-image" oncommand="BrowserUI.switchTask();"/>
 #endif
                 <hbox id="urlbar-container" flex="1">
                   <box id="identity-box"
                        onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
                        onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
                     <box id="urlbar-image-box" mousethrough="always">
                       <image id="urlbar-throbber"/>
--- a/mobile/components/DirectoryProvider.js
+++ b/mobile/components/DirectoryProvider.js
@@ -61,17 +61,17 @@ DirectoryProvider.prototype = {
   getFile: function(prop, persistent) {
     if (prop == NS_APP_CACHE_PARENT_DIR) {
       let dirsvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
       let profile = dirsvc.get("ProfD", Ci.nsIFile);
 
       let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
       let device = sysInfo.get("device");
       switch (device) {
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
         case "Nokia N900":
           return profile;
         
         case "Nokia N8xx":
           let folder = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
           folder.initWithPath("/media/mmc2/.mozilla/fennec");
           return folder;
 #endif
--- a/mobile/components/phone/Makefile.in
+++ b/mobile/components/phone/Makefile.in
@@ -60,17 +60,17 @@ CPPSRCS   = nsPhoneSupport.cpp
 XPIDLSRCS = nsIPhoneSupport.idl
 
 
 EXTRA_DSO_LDOPTS += \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(NSPR_LIBS) \
 	$(NULL)
 
-ifdef MOZ_PLATFORM_HILDON
+ifdef MOZ_PLATFORM_MAEMO
 LOCAL_INCLUDES   += $(MOZ_DBUS_GLIB_CFLAGS)
 EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
 endif
 
 ifdef WINCE
 OS_LIBS += $(call EXPAND_LIBNAME, aygshell cellcore)
 endif
 
--- a/mobile/components/phone/nsPhoneSupport.cpp
+++ b/mobile/components/phone/nsPhoneSupport.cpp
@@ -39,17 +39,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifdef WINCE_WINDOWS_MOBILE
 #include <windows.h>
 #include <phone.h>
 #endif
 
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO
 #include <dbus/dbus.h>
 #endif
 
 #include "nsStringAPI.h"
 #include "nsIPhoneSupport.h"
 #include "nsIGenericFactory.h"
 
 class nsPhoneSupport : public nsIPhoneSupport
@@ -93,17 +93,17 @@ nsPhoneSupport::MakeCall(const PRUnichar
 #endif
 
   return (result == 0) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsPhoneSupport::SwitchTask()
 {
-#ifdef MOZ_PLATFORM_HILDON
+#ifdef MOZ_PLATFORM_MAEMO // 5 only?
   DBusError error;
   dbus_error_init(&error);
 
   DBusConnection *conn = dbus_bus_get(DBUS_BUS_SESSION, &error);
 
   DBusMessage *msg = dbus_message_new_signal("/com/nokia/hildon_desktop",
                                              "com.nokia.hildon_desktop",
                                              "exit_app_view");
--- a/mobile/installer/debian/fennec.postinst.in
+++ b/mobile/installer/debian/fennec.postinst.in
@@ -4,17 +4,17 @@
 #
 # see: dh_installdeb(1)
 
 set -e
 
 case "$1" in
     configure)
         # for faster initial startup
-#ifdef MOZ_PLATFORM_HILDON        
+#ifdef MOZ_PLATFORM_MAEMO
         /bin/su -l user -c "/usr/bin/fennec -silent" > /dev/null 2>&1  || echo -n ""
 #endif
         # for fennec icons
 	gtk-update-icon-cache -f /usr/share/icons/hicolor
 		
         # select where to install fennec menu
         if [ "$2" == "" ]; then