OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 gtk_label_set_attributes(GTK_LABEL(label), attributes); | 145 gtk_label_set_attributes(GTK_LABEL(label), attributes); |
146 pango_attr_list_unref(attributes); | 146 pango_attr_list_unref(attributes); |
147 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 147 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
148 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | 148 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
149 | 149 |
150 GtkWidget* section_box = gtk_hbox_new(FALSE, 0); | 150 GtkWidget* section_box = gtk_hbox_new(FALSE, 0); |
151 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 151 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
152 GtkWidget* image = gtk_image_new_from_pixbuf( | 152 GtkWidget* image = gtk_image_new_from_pixbuf( |
153 section.state == PageInfoModel::SECTION_STATE_OK ? | 153 section.state == PageInfoModel::SECTION_STATE_OK ? |
154 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : | 154 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : |
155 rb.GetPixbufNamed(IDR_PAGEINFO_BAD)); | 155 rb.GetPixbufNamed(IDR_PAGEINFO_WARNING_MAJOR)); |
156 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, | 156 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, |
157 gtk_util::kControlSpacing); | 157 gtk_util::kControlSpacing); |
158 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); | 158 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); |
159 | 159 |
160 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 160 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
161 if (!section.headline.empty()) { | 161 if (!section.headline.empty()) { |
162 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str()); | 162 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str()); |
163 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 163 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
164 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0); | 164 gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0); |
165 } | 165 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 gtk_window_present(GTK_WINDOW(iter->second->widget())); | 214 gtk_window_present(GTK_WINDOW(iter->second->widget())); |
215 return; | 215 return; |
216 } | 216 } |
217 | 217 |
218 PageInfoWindowGtk* page_info_window = | 218 PageInfoWindowGtk* page_info_window = |
219 new PageInfoWindowGtk(parent, profile, url, ssl, show_history); | 219 new PageInfoWindowGtk(parent, profile, url, ssl, show_history); |
220 page_info_window->Show(); | 220 page_info_window->Show(); |
221 } | 221 } |
222 | 222 |
223 } // namespace browser | 223 } // namespace browser |
OLD | NEW |