Bug 1246707 - Set all Snackbar durations to LONG. r=ahunt
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 17 Feb 2016 14:14:20 +0000
changeset 321284 b8449a2d5fc1817544c3c2d3a38085823af48d2e
parent 321283 3e9b07b743d66f85008867f64ab914377794b46c
child 321285 42e9aea45240c473313b7136c8ad0e8a2a18471f
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt
bugs1246707
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1246707 - Set all Snackbar durations to LONG. r=ahunt MozReview-Commit-ID: EuSc6movOlX
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
mobile/android/base/java/org/mozilla/gecko/EditBookmarkDialog.java
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferences.java
mobile/android/base/java/org/mozilla/gecko/preferences/SearchEnginePreference.java
mobile/android/chrome/content/ActionBarHandler.js
mobile/android/chrome/content/MasterPassword.js
mobile/android/chrome/content/Reader.js
mobile/android/chrome/content/SelectionHandler.js
mobile/android/chrome/content/aboutLogins.js
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -419,17 +419,17 @@ public class BrowserApp extends GeckoApp
         SnackbarHelper.showSnackbarWithAction(this,
                 getResources().getString(R.string.bookmark_added),
                 Snackbar.LENGTH_LONG,
                 getResources().getString(R.string.bookmark_options),
                 callback);
     }
 
     private void showBookmarkRemovedSnackbar() {
-        SnackbarHelper.showSnackbar(this, getResources().getString(R.string.bookmark_removed), Snackbar.LENGTH_SHORT);
+        SnackbarHelper.showSnackbar(this, getResources().getString(R.string.bookmark_removed), Snackbar.LENGTH_LONG);
     }
 
     private void showSwitchToReadingListSnackbar(String message) {
         final SnackbarHelper.SnackbarCallback callback = new SnackbarHelper.SnackbarCallback() {
             @Override
             public void onClick(View v) {
                 Telemetry.sendUIEvent(TelemetryContract.Event.SHOW, TelemetryContract.Method.TOAST, "reading_list");
 
@@ -451,17 +451,17 @@ public class BrowserApp extends GeckoApp
 
     public void onAlreadyInReadingList(String url) {
         showSwitchToReadingListSnackbar(getResources().getString(R.string.reading_list_duplicate));
     }
 
     public void onRemovedFromReadingList(String url) {
         SnackbarHelper.showSnackbar(this,
                 getResources().getString(R.string.reading_list_removed),
-                Snackbar.LENGTH_SHORT);
+                Snackbar.LENGTH_LONG);
     }
 
     @Override
     public boolean onKey(View v, int keyCode, KeyEvent event) {
         if (AndroidGamepadManager.handleKeyEvent(event)) {
             return true;
         }
 
--- a/mobile/android/base/java/org/mozilla/gecko/EditBookmarkDialog.java
+++ b/mobile/android/base/java/org/mozilla/gecko/EditBookmarkDialog.java
@@ -214,17 +214,17 @@ public class EditBookmarkDialog {
                         db.updateBookmark(context.getContentResolver(), id, newUrl, nameText.getText().toString(), newKeyword);
                         return null;
                     }
 
                     @Override
                     public void onPostExecute(Void result) {
                         SnackbarHelper.showSnackbar((Activity) context,
                                 context.getString(R.string.bookmark_updated),
-                                Snackbar.LENGTH_SHORT);
+                                Snackbar.LENGTH_LONG);
                     }
                 }).execute();
             }
         });
 
         editPrompt.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialog, int whichButton) {
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -571,17 +571,17 @@ public abstract class GeckoApp
             ThreadUtils.postToBackgroundThread(new Runnable() {
                 @Override
                 public void run() {
                     final boolean bookmarkAdded = db.addBookmark(getContentResolver(), title, url);
                     final int resId = bookmarkAdded ? R.string.bookmark_added : R.string.bookmark_already_added;
                     ThreadUtils.postToUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            SnackbarHelper.showSnackbar(GeckoApp.this, getString(resId), Snackbar.LENGTH_SHORT);
+                            SnackbarHelper.showSnackbar(GeckoApp.this, getString(resId), Snackbar.LENGTH_LONG);
                         }
                     });
                 }
             });
 
         } else if ("Contact:Add".equals(event)) {
             final String email = message.optString("email", null);
             final String phone = message.optString("phone", null);
@@ -1009,39 +1009,39 @@ public abstract class GeckoApp
                 byte[] imgBuffer = os.toByteArray();
                 image = BitmapUtils.decodeByteArray(imgBuffer);
             }
             if (image != null) {
                 // Some devices don't have a DCIM folder and the Media.insertImage call will fail.
                 File dcimDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
 
                 if (!dcimDir.mkdirs() && !dcimDir.isDirectory()) {
-                    SnackbarHelper.showSnackbar(this, getString(R.string.set_image_path_fail), Snackbar.LENGTH_SHORT);
+                    SnackbarHelper.showSnackbar(this, getString(R.string.set_image_path_fail), Snackbar.LENGTH_LONG);
                     return;
                 }
                 String path = Media.insertImage(getContentResolver(),image, null, null);
                 if (path == null) {
-                    SnackbarHelper.showSnackbar(this, getString(R.string.set_image_path_fail), Snackbar.LENGTH_SHORT);
+                    SnackbarHelper.showSnackbar(this, getString(R.string.set_image_path_fail), Snackbar.LENGTH_LONG);
                     return;
                 }
                 final Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
                 intent.addCategory(Intent.CATEGORY_DEFAULT);
                 intent.setData(Uri.parse(path));
 
                 // Removes the image from storage once the chooser activity ends.
                 Intent chooser = Intent.createChooser(intent, getString(R.string.set_image_chooser_title));
                 ActivityResultHandler handler = new ActivityResultHandler() {
                     @Override
                     public void onActivityResult (int resultCode, Intent data) {
                         getContentResolver().delete(intent.getData(), null, null);
                     }
                 };
                 ActivityHandlerHelper.startIntentForActivity(this, chooser, handler);
             } else {
-                SnackbarHelper.showSnackbar(this, getString(R.string.set_image_fail), Snackbar.LENGTH_SHORT);
+                SnackbarHelper.showSnackbar(this, getString(R.string.set_image_fail), Snackbar.LENGTH_LONG);
             }
         } catch(OutOfMemoryError ome) {
             Log.e(LOGTAG, "Out of Memory when converting to byte array", ome);
         } catch(IOException ioe) {
             Log.e(LOGTAG, "I/O Exception while setting wallpaper", ioe);
         } finally {
             if (is != null) {
                 try {
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
@@ -2665,17 +2665,17 @@ public class GeckoAppShell
             IOUtils.safeStreamClose(os);
         }
     }
 
     // Don't fail silently, tell the user that we weren't able to share the image
     private static final void showImageShareFailureSnackbar() {
         SnackbarHelper.showSnackbar((Activity) getContext(),
                 getApplicationContext().getString(R.string.share_image_failed),
-                Snackbar.LENGTH_SHORT
+                Snackbar.LENGTH_LONG
         );
     }
 
     @WrapForJNI(allowMultithread = true)
     static InputStream createInputStream(URLConnection connection) throws IOException {
         return connection.getInputStream();
     }
 
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
@@ -414,12 +414,12 @@ public abstract class HomeFragment exten
             }
             return null;
         }
 
         @Override
         public void onPostExecute(Void result) {
             SnackbarHelper.showSnackbar((Activity) mContext,
                     mContext.getString(R.string.page_removed),
-                    Snackbar.LENGTH_SHORT);
+                    Snackbar.LENGTH_LONG);
         }
     }
 }
--- a/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferences.java
+++ b/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferences.java
@@ -650,17 +650,17 @@ OnSharedPreferenceChangeListener
     public void handleMessage(String event, JSONObject message) {
         try {
             if (event.equals("Sanitize:Finished")) {
                 boolean success = message.getBoolean("success");
                 final int stringRes = success ? R.string.private_data_success : R.string.private_data_fail;
 
                 SnackbarHelper.showSnackbar(GeckoPreferences.this,
                         getString(stringRes),
-                        Snackbar.LENGTH_SHORT);
+                        Snackbar.LENGTH_LONG);
             }
         } catch (Exception e) {
             Log.e(LOGTAG, "Exception handling message \"" + event + "\":", e);
         }
     }
 
     @Override
     public void handleMessage(final String event, final NativeJSObject message, final EventCallback callback) {
--- a/mobile/android/base/java/org/mozilla/gecko/preferences/SearchEnginePreference.java
+++ b/mobile/android/base/java/org/mozilla/gecko/preferences/SearchEnginePreference.java
@@ -89,17 +89,17 @@ public class SearchEnginePreference exte
     public void showDialog() {
         // If this is the last engine, then we are the default, and none of the options
         // on this menu can do anything.
         if (mParentCategory.getPreferenceCount() == 1) {
             Activity activity = (Activity) getContext();
 
             SnackbarHelper.showSnackbar(activity,
                     activity.getString(R.string.pref_search_last_toast),
-                    Snackbar.LENGTH_SHORT);
+                    Snackbar.LENGTH_LONG);
 
             return;
         }
 
         super.showDialog();
     }
 
     @Override
--- a/mobile/android/chrome/content/ActionBarHandler.js
+++ b/mobile/android/chrome/content/ActionBarHandler.js
@@ -343,17 +343,17 @@ var ActionBarHandler = {
       action: function(element, win) {
         // First copy the selection text to the clipboard.
         let selectedText = ActionBarHandler._getSelectedText();
         let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
           getService(Ci.nsIClipboardHelper);
         clipboard.copyString(selectedText);
 
         let msg = Strings.browser.GetStringFromName("selectionHelper.textCopied");
-        Snackbars.show(msg, Snackbars.LENGTH_SHORT);
+        Snackbars.show(msg, Snackbars.LENGTH_LONG);
 
         // Then cut the selection text.
         ActionBarHandler._getSelection(element, win).deleteFromDocument();
 
         ActionBarHandler._uninit();
         UITelemetry.addEvent("action.1", "actionbar", null, "cut");
       },
     },
@@ -378,17 +378,17 @@ var ActionBarHandler = {
 
       action: function(element, win) {
         let selectedText = ActionBarHandler._getSelectedText();
         let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
           getService(Ci.nsIClipboardHelper);
         clipboard.copyString(selectedText);
 
         let msg = Strings.browser.GetStringFromName("selectionHelper.textCopied");
-        Snackbars.show(msg, Snackbars.LENGTH_SHORT);
+        Snackbars.show(msg, Snackbars.LENGTH_LONG);
 
         ActionBarHandler._uninit();
         UITelemetry.addEvent("action.1", "actionbar", null, "copy");
       },
     },
 
     PASTE: {
       id: "paste_action",
--- a/mobile/android/chrome/content/MasterPassword.js
+++ b/mobile/android/chrome/content/MasterPassword.js
@@ -58,12 +58,12 @@ var MasterPassword = {
       if (token.checkPassword(aOldPassword)) {
         token.changePassword(aOldPassword, "");
         BrowserApp.notifyPrefObservers(this.pref);
         return true;
       }
     } catch(e) {
       dump("MasterPassword.removePassword: " + e + "\n");
     }
-    Snackbars.show(Strings.browser.GetStringFromName("masterPassword.incorrect"), Snackbars.LENGTH_SHORT);
+    Snackbars.show(Strings.browser.GetStringFromName("masterPassword.incorrect"), Snackbars.LENGTH_LONG);
     return false;
   }
 };
--- a/mobile/android/chrome/content/Reader.js
+++ b/mobile/android/chrome/content/Reader.js
@@ -175,17 +175,17 @@ var Reader = {
         Messaging.sendRequest({
           type: "SystemUI:Visibility",
           visible: message.data.visible
         });
         break;
 
       case "Reader:ToolbarHidden":
         if (!this._hasUsedToolbar) {
-          Snackbars.show(Strings.browser.GetStringFromName("readerMode.toolbarTip"), Snackbars.LENGTH_SHORT);
+          Snackbars.show(Strings.browser.GetStringFromName("readerMode.toolbarTip"), Snackbars.LENGTH_LONG);
           Services.prefs.setBoolPref("reader.has_used_toolbar", true);
           this._hasUsedToolbar = true;
         }
         break;
 
       case "Reader:UpdateReaderButton": {
         let tab = BrowserApp.getTabForBrowser(message.target);
         tab.browser.isArticle = message.data.isArticle;
--- a/mobile/android/chrome/content/SelectionHandler.js
+++ b/mobile/android/chrome/content/SelectionHandler.js
@@ -1085,17 +1085,17 @@ var SelectionHandler = {
     this._domWinUtils.sendMouseEventToWindow("mouseup", aX, aY, 0, 0, 0, true);
   },
 
   copySelection: function sh_copySelection() {
     let selectedText = this._getSelectedText();
     if (selectedText.length) {
       let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
       clipboard.copyString(selectedText);
-      Snackbars.show(Strings.browser.GetStringFromName("selectionHelper.textCopied"), Snackbars.LENGTH_SHORT);
+      Snackbars.show(Strings.browser.GetStringFromName("selectionHelper.textCopied"), Snackbars.LENGTH_LONG);
     }
     this._closeSelection();
   },
 
   shareSelection: function sh_shareSelection() {
     let selectedText = this._getSelectedText();
     if (selectedText.length) {
       Messaging.sendRequest({
--- a/mobile/android/chrome/content/aboutLogins.js
+++ b/mobile/android/chrome/content/aboutLogins.js
@@ -26,20 +26,20 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 var debug = Cu.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog.d.bind(null, "AboutLogins");
 
 var gStringBundle = Services.strings.createBundle("chrome://browser/locale/aboutLogins.properties");
 
 function copyStringShowSnackbar(string, notifyString) {
   try {
     let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
     clipboard.copyString(string);
-    Snackbars.show(notifyString, Snackbars.LENGTH_SHORT);
+    Snackbars.show(notifyString, Snackbars.LENGTH_LONG);
   } catch (e) {
     debug("Error copying from about:logins");
-    Snackbars.show(gStringBundle.GetStringFromName("loginsDetails.copyFailed"), Snackbars.LENGTH_SHORT);
+    Snackbars.show(gStringBundle.GetStringFromName("loginsDetails.copyFailed"), Snackbars.LENGTH_LONG);
   }
 }
 
 // Delay filtering while typing in MS
 const FILTER_DELAY = 500;
 
 var Logins = {
   _logins: [],
@@ -286,17 +286,17 @@ var Logins = {
     let origUsername = this._selectedLogin.username;
     let origPassword = this._selectedLogin.password;
     let origDomain = this._selectedLogin.hostname;
 
     try {
       if ((newUsername === origUsername) &&
           (newPassword === origPassword) &&
           (newDomain === origDomain) ) {
-        Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_SHORT);
+        Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_LONG);
         this._showList();
         return;
       }
 
       let logins = Services.logins.findLogins({}, origDomain, origDomain, null);
 
       for (let i = 0; i < logins.length; i++) {
         if (logins[i].username == origUsername) {
@@ -305,20 +305,20 @@ var Logins = {
           clone.password = newPassword;
           clone.hostname = newDomain;
           Services.logins.removeLogin(logins[i]);
           Services.logins.addLogin(clone);
           break;
         }
       }
     } catch (e) {
-      Snackbars.show(gStringBundle.GetStringFromName("editLogin.couldNotSave"), Snackbars.LENGTH_SHORT);
+      Snackbars.show(gStringBundle.GetStringFromName("editLogin.couldNotSave"), Snackbars.LENGTH_LONG);
       return;
     }
-    Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_SHORT);
+    Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_LONG);
     this._showList();
   },
 
   _onPasswordBtn: function () {
     this._updatePasswordBtn(this._isPasswordBtnInHideMode());
   },
 
   _updatePasswordBtn: function (aShouldShow) {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -457,17 +457,17 @@ var BrowserApp = {
     Services.obs.addObserver(this, "Webapps:Load", false);
     Services.obs.addObserver(this, "Webapps:AutoUninstall", false);
     Services.obs.addObserver(this, "sessionstore-state-purge-complete", false);
     Services.obs.addObserver(this, "Fonts:Reload", false);
 
     Messaging.addListener(this.getHistory.bind(this), "Session:GetHistory");
 
     function showFullScreenWarning() {
-      Snackbars.show(Strings.browser.GetStringFromName("alertFullScreenToast"), Snackbars.LENGTH_SHORT);
+      Snackbars.show(Strings.browser.GetStringFromName("alertFullScreenToast"), Snackbars.LENGTH_LONG);
     }
 
     window.addEventListener("fullscreen", function() {
       Messaging.sendRequest({
         type: window.fullScreen ? "ToggleChrome:Hide" : "ToggleChrome:Show"
       });
     }, false);
 
@@ -1013,17 +1013,17 @@ var BrowserApp = {
         aTarget.setAttribute("src", aTarget.getAttribute("data-ctv-src"));
 
         // Shows a snackbar to unblock all images if browser.image_blocking.enabled is enabled.
         let blockedImgs = aTarget.ownerDocument.querySelectorAll("[data-ctv-src]");
         if (blockedImgs.length == 0) {
           return;
         }
         let message = Strings.browser.GetStringFromName("imageblocking.downloadedImage");
-        Snackbars.show(message, Snackbars.LENGTH_SHORT, {
+        Snackbars.show(message, Snackbars.LENGTH_LONG, {
           action: {
             label: Strings.browser.GetStringFromName("imageblocking.showAllImages"),
             callback: () => {
               UITelemetry.addEvent("action.1", "toast", null, "web_show_all_image");
               for (let i = 0; i < blockedImgs.length; ++i) {
                 blockedImgs[i].setAttribute("data-ctv-show", "true");
                 blockedImgs[i].setAttribute("src", blockedImgs[i].getAttribute("data-ctv-src"));
               }
@@ -1321,17 +1321,17 @@ var BrowserApp = {
       if (isPrivate) {
         message = Strings.browser.GetStringFromName("privateClosedMessage.message");
       } else if (title) {
         message = Strings.browser.formatStringFromName("undoCloseToast.message", [title], 1);
       } else {
         message = Strings.browser.GetStringFromName("undoCloseToast.messageDefault");
       }
 
-      Snackbars.show(message, Snackbars.LENGTH_SHORT, {
+      Snackbars.show(message, Snackbars.LENGTH_LONG, {
         action: {
           label: Strings.browser.GetStringFromName("undoCloseToast.action2"),
           callback: function() {
             UITelemetry.addEvent("undo.1", "toast", null, "closetab");
             ss.undoCloseTab(window, closedTabData);
           }
         }
       });
@@ -2997,17 +2997,17 @@ var NativeWindow = {
       }
 
       return this.makeURLAbsolute(aLink.baseURI, href);
     },
 
     _copyStringToDefaultClipboard: function(aString) {
       let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
       clipboard.copyString(aString);
-      Snackbars.show(Strings.browser.GetStringFromName("selectionHelper.textCopied"), Snackbars.LENGTH_SHORT);
+      Snackbars.show(Strings.browser.GetStringFromName("selectionHelper.textCopied"), Snackbars.LENGTH_LONG);
     },
 
     _stripScheme: function(aString) {
       let index = aString.indexOf(":");
       return aString.slice(index + 1);
     }
   }
 };
@@ -5613,17 +5613,17 @@ var XPInstallObserver = {
       }
     }
 
     let strings = Strings.browser;
     let brandShortName = Strings.brand.GetStringFromName("brandShortName");
 
     switch (aTopic) {
       case "addon-install-started":
-        Snackbars.show(strings.GetStringFromName("alertAddonsDownloading"), Snackbars.LENGTH_SHORT);
+        Snackbars.show(strings.GetStringFromName("alertAddonsDownloading"), Snackbars.LENGTH_LONG);
         break;
       case "addon-install-disabled": {
         if (!tab)
           return;
 
         let enabled = true;
         try {
           enabled = Services.prefs.getBoolPref("xpinstall.enabled");
@@ -6677,31 +6677,31 @@ var SearchEngines = {
       }
     }).bind(this));
   },
 
   addOpenSearchEngine: function addOpenSearchEngine(engine) {
     Services.search.addEngine(engine.url, Ci.nsISearchEngine.DATA_XML, engine.iconURL, false, {
       onSuccess: function() {
         // Display a toast confirming addition of new search engine.
-        Snackbars.show(Strings.browser.formatStringFromName("alertSearchEngineAddedToast", [engine.title], 1), Snackbars.LENGTH_SHORT);
+        Snackbars.show(Strings.browser.formatStringFromName("alertSearchEngineAddedToast", [engine.title], 1), Snackbars.LENGTH_LONG);
       },
 
       onError: function(aCode) {
         let errorMessage;
         if (aCode == 2) {
           // Engine is a duplicate.
           errorMessage = "alertSearchEngineDuplicateToast";
 
         } else {
           // Unknown failure. Display general error message.
           errorMessage = "alertSearchEngineErrorToast";
         }
 
-        Snackbars.show(Strings.browser.formatStringFromName(errorMessage, [engine.title], 1), Snackbars.LENGTH_SHORT);
+        Snackbars.show(Strings.browser.formatStringFromName(errorMessage, [engine.title], 1), Snackbars.LENGTH_LONG);
       }
     });
   },
 
   addEngine: function addEngine(aElement) {
     let form = aElement.form;
     let charset = aElement.ownerDocument.characterSet;
     let docURI = Services.io.newURI(aElement.ownerDocument.URL, charset, null);
@@ -6772,17 +6772,17 @@ var SearchEngines = {
         handleCompletion: function (reason) {
           // if there's already an engine with this name, add a number to
           // make the name unique (e.g., "Google" becomes "Google 2")
           let name = title.value;
           for (let i = 2; Services.search.getEngineByName(name); i++)
             name = title.value + " " + i;
 
           Services.search.addEngineWithDetails(name, favicon, null, null, method, formURL);
-          Snackbars.show(Strings.browser.formatStringFromName("alertSearchEngineAddedToast", [name], 1), Snackbars.LENGTH_SHORT);
+          Snackbars.show(Strings.browser.formatStringFromName("alertSearchEngineAddedToast", [name], 1), Snackbars.LENGTH_LONG);
           let engine = Services.search.getEngineByName(name);
           engine.wrappedJSObject._queryCharset = charset;
           for (let i = 0; i < formData.length; ++i) {
             let param = formData[i];
             if (param.name && param.value)
               engine.addParam(param.name, param.value, null);
           }
         }