summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 20:14:44 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 20:14:44 +0000
commitba1ea30afdd071646a634f054a410a004b60f797 (patch)
treea812f67360752090080c81b07ce715dc709edc05 /chrome
parent8ac1a75acadaa2aae065212cb6255d00c789a184 (diff)
downloadchromium_src-ba1ea30afdd071646a634f054a410a004b60f797.zip
chromium_src-ba1ea30afdd071646a634f054a410a004b60f797.tar.gz
chromium_src-ba1ea30afdd071646a634f054a410a004b60f797.tar.bz2
Fix 1303177: Homepage field left enabled even though Reset to Default sets homepage to New Tab page.
The fix is to enable the textfield when the NewTabPageIsHomePage setting is changed. I also left out a change to the header guard from my last checkin (no code change). That's included in this changelist. BUG=1303177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/options/advanced_page_view.h6
-rw-r--r--chrome/browser/views/options/general_page_view.cc10
2 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/views/options/advanced_page_view.h b/chrome/browser/views/options/advanced_page_view.h
index 1c78051..ce9df47 100644
--- a/chrome/browser/views/options/advanced_page_view.h
+++ b/chrome/browser/views/options/advanced_page_view.h
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H__
-#define CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H__
+#ifndef CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H_
+#define CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H_
#include "chrome/browser/views/options/options_page_view.h"
#include "chrome/views/native_button.h"
@@ -64,4 +64,4 @@ class AdvancedPageView : public OptionsPageView,
DISALLOW_EVIL_CONSTRUCTORS(AdvancedPageView);
};
-#endif // #ifndef CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H__
+#endif // CHROME_BROWSER_VIEWS_OPTIONS_ADVANCED_PAGE_VIEW_H_
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index cccc7db..2902ff1 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -718,18 +718,20 @@ void GeneralPageView::NotifyPrefChanged(const std::wstring* pref_name) {
startup_custom_pages_table_model_->SetURLs(startup_pref.urls);
}
- if (!pref_name || *pref_name == prefs::kHomePageIsNewTabPage) {
- if (new_tab_page_is_home_page_.GetValue())
+ if (!pref_name || *pref_name == prefs::kHomePageIsNewTabPage) {
+ if (new_tab_page_is_home_page_.GetValue()) {
homepage_use_newtab_radio_->SetIsSelected(true);
- else
+ EnableHomepageURLField(false);
+ } else {
homepage_use_url_radio_->SetIsSelected(true);
+ EnableHomepageURLField(true);
+ }
}
if (!pref_name || *pref_name == prefs::kHomePage) {
bool enabled = homepage_.GetValue() != GetNewTabUIURLString();
if (enabled)
homepage_use_url_textfield_->SetText(homepage_.GetValue());
- EnableHomepageURLField(!new_tab_page_is_home_page_.GetValue());
}
if (!pref_name || *pref_name == prefs::kShowHomeButton) {