summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 20:41:41 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 20:41:41 +0000
commit80c4665c06621757f490ca2c61c725b36674a423 (patch)
treec9ae58c292fa58d3cec478b60fa3b5595b3d5cb6 /chrome/browser/gtk
parent26df97acbcbb594d0c6f78284f48b430086d8660 (diff)
downloadchromium_src-80c4665c06621757f490ca2c61c725b36674a423.zip
chromium_src-80c4665c06621757f490ca2c61c725b36674a423.tar.gz
chromium_src-80c4665c06621757f490ca2c61c725b36674a423.tar.bz2
[gtk] reinstate indentation of instant explanation in options dialog
This was broken when the initialization of the checkbutton's label was moved. BUG=none TEST=manual Review URL: http://codereview.chromium.org/5311001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index 05ce979..8d7931f 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -209,6 +209,14 @@ void GeneralPageGtk::NotifyPrefChanged(const std::string* pref_name) {
base::StringPrintf("[%d]", prefs->GetInteger(prefs::kInstantType));
}
gtk_button_set_label(GTK_BUTTON(instant_checkbox_), description.c_str());
+
+ // Relies on knowledge of GTK+ internals to find the checkbox's label child
+ // and then make the indent below match its vertical spacing.
+ GtkWidget* instant_label = gtk_bin_get_child(GTK_BIN(instant_checkbox_));
+ if (instant_label && GTK_IS_LABEL(instant_label)) {
+ g_signal_connect(instant_label, "size-allocate",
+ G_CALLBACK(OnInstantLabelSizeAllocateThunk), this);
+ }
}
initializing_ = false;
@@ -413,14 +421,6 @@ GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() {
G_CALLBACK(OnInstantToggledThunk), this);
gtk_box_pack_start(GTK_BOX(instant_vbox), instant_checkbox_, FALSE, FALSE, 0);
- // Relies on knowledge of GTK+ internals to find the checkbox's label child
- // and then make the indent below match its vertical spacing.
- GtkWidget* instant_label = gtk_bin_get_child(GTK_BIN(instant_checkbox_));
- if (instant_label && GTK_IS_LABEL(instant_label)) {
- g_signal_connect(instant_label, "size-allocate",
- G_CALLBACK(OnInstantLabelSizeAllocateThunk), this);
- }
-
instant_indent_ = gtk_fixed_new();
GtkWidget* explanation_box = gtk_hbox_new(FALSE, 0);
GtkWidget* explanation = gtk_label_new((
@@ -757,9 +757,8 @@ void GeneralPageGtk::UpdateHomepageIsNewTabRadio(bool homepage_is_new_tab,
}
void GeneralPageGtk::EnableHomepageURLField(bool enabled) {
- if (homepage_.IsManaged()) {
+ if (homepage_.IsManaged())
enabled = false;
- }
gtk_widget_set_sensitive(homepage_use_url_entry_, enabled);
}