Backed out changeset fcd1191c12b5 (Bug 996850)

This commit is contained in:
Chenxia Liu 2014-04-22 11:33:57 -07:00
parent d32fba55e2
commit 3e796c6ab6
3 changed files with 4 additions and 13 deletions

View File

@ -27,7 +27,6 @@ import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;
/**
* Dialog fragment that displays frecency search results, for pinning a site, in a GridView.
@ -110,16 +109,11 @@ class PinSiteDialog extends DialogFragment {
// If the user manually entered a search term or URL, wrap the value in
// a special URI until we can get a valid URL for this bookmark.
final String text = mSearch.getText().toString().trim();
if (!TextUtils.isEmpty(text)) {
final String url = TopSitesPanel.encodeUserEnteredUrl(text);
mOnSiteSelectedListener.onSiteSelected(url, text);
dismiss();
} else {
// Can't have empty text.
Toast.makeText(getActivity(), R.string.home_top_sites_edit_empty_toast, Toast.LENGTH_SHORT).show();;
}
final String text = mSearch.getText().toString();
final String url = TopSitesPanel.encodeUserEnteredUrl(text);
mOnSiteSelectedListener.onSiteSelected(url, text);
dismiss();
return true;
}
});

View File

@ -319,7 +319,6 @@ size. -->
<!-- Localization note (home_top_sites_add): This string is used as placeholder
text underneath empty thumbnails in the Top Sites page on about:home. -->
<!ENTITY home_top_sites_add "Add a site">
<!ENTITY home_top_sites_edit_empty_toast "Please select a site or enter a search term">
<!ENTITY home_history_title "History">
<!ENTITY home_bookmarks_empty "Bookmarks you save show up here.">

View File

@ -297,8 +297,6 @@
<string name="home_top_sites_title">&home_top_sites_title;</string>
<string name="home_top_sites_add">&home_top_sites_add;</string>
<string name="home_top_sites_edit_empty_toast">&home_top_sites_edit_empty_toast;</string>
<string name="home_history_title">&home_history_title;</string>
<string name="home_bookmarks_empty">&home_bookmarks_empty;</string>
<string name="home_last_tabs_title">&home_last_tabs_title;</string>