Style fixes.

This commit is contained in:
Adrien Destugues
2014-09-16 21:38:24 +02:00
parent ce1f0d0a96
commit 804876f698
+7 -8
View File
@@ -1993,8 +1993,8 @@ BrowserWindow::_ShowBookmarks()
if (status != B_OK && status != B_ALREADY_RUNNING) { if (status != B_OK && status != B_ALREADY_RUNNING) {
BString message(B_TRANSLATE_COMMENT("There was an error trying to " BString message(B_TRANSLATE_COMMENT("There was an error trying to "
"show the Bookmarks folder.\n\nError: %error", "Don't translate variable " "show the Bookmarks folder.\n\nError: %error",
"%error")); "Don't translate variable %error"));
message.ReplaceFirst("%error", strerror(status)); message.ReplaceFirst("%error", strerror(status));
BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"),
message.String(), B_TRANSLATE("OK"), NULL, NULL, message.String(), B_TRANSLATE("OK"), NULL, NULL,
@@ -2408,6 +2408,7 @@ BrowserWindow::_NewTabURL(bool isNewWindow) const
return url; return url;
} }
BString BString
BrowserWindow::_EncodeURIComponent(const BString& search) BrowserWindow::_EncodeURIComponent(const BString& search)
{ {
@@ -2443,8 +2444,7 @@ void
BrowserWindow::_VisitSearchEngine(const BString& search) BrowserWindow::_VisitSearchEngine(const BString& search)
{ {
BString engine = ""; BString engine = "";
engine.SetToFormat(fSearchPageURL, engine.SetToFormat(fSearchPageURL, _EncodeURIComponent(search).String());
_EncodeURIComponent(search).String());
_VisitURL(engine); _VisitURL(engine);
} }
@@ -2499,7 +2499,7 @@ BrowserWindow::_SmartURLHandler(const BString& url)
else { else {
const char* localhostPrefix = "localhost/"; const char* localhostPrefix = "localhost/";
if(url.Compare(localhostPrefix, strlen(localhostPrefix)) == 0) if (url.Compare(localhostPrefix, strlen(localhostPrefix)) == 0)
_VisitURL(url); _VisitURL(url);
else { else {
bool isURL = false; bool isURL = false;
@@ -2610,9 +2610,8 @@ BrowserWindow::_ShowBookmarkBar(bool show)
fAppSettings->SetValue(kSettingsShowBookmarkBar, show); fAppSettings->SetValue(kSettingsShowBookmarkBar, show);
if (show) { if (show)
fBookmarkBar->Show(); fBookmarkBar->Show();
} else { else
fBookmarkBar->Hide(); fBookmarkBar->Hide();
}
} }