| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 PangoAttrList* attributes = pango_attr_list_new(); | 142 PangoAttrList* attributes = pango_attr_list_new(); |
| 143 pango_attr_list_insert(attributes, | 143 pango_attr_list_insert(attributes, |
| 144 pango_attr_weight_new(PANGO_WEIGHT_BOLD)); | 144 pango_attr_weight_new(PANGO_WEIGHT_BOLD)); |
| 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(section.state ? | 152 GtkWidget* image = gtk_image_new_from_pixbuf( |
| 153 section.state != PageInfoModel::SECTION_STATE_ERROR ? |
| 153 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : | 154 rb.GetPixbufNamed(IDR_PAGEINFO_GOOD) : |
| 154 rb.GetPixbufNamed(IDR_PAGEINFO_BAD)); | 155 rb.GetPixbufNamed(IDR_PAGEINFO_BAD)); |
| 155 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, | 156 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, |
| 156 gtk_util::kControlSpacing); | 157 gtk_util::kControlSpacing); |
| 157 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); | 158 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); |
| 158 | 159 |
| 159 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 160 GtkWidget* text_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
| 160 if (!section.headline.empty()) { | 161 if (!section.headline.empty()) { |
| 161 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str()); | 162 label = gtk_label_new(UTF16ToUTF8(section.headline).c_str()); |
| 162 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 163 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 222 |
| 222 void ShowPageInfoBubble(gfx::NativeWindow parent, | 223 void ShowPageInfoBubble(gfx::NativeWindow parent, |
| 223 Profile* profile, | 224 Profile* profile, |
| 224 const GURL& url, | 225 const GURL& url, |
| 225 const NavigationEntry::SSLStatus& ssl, | 226 const NavigationEntry::SSLStatus& ssl, |
| 226 bool show_history) { | 227 bool show_history) { |
| 227 NOTIMPLEMENTED(); | 228 NOTIMPLEMENTED(); |
| 228 } | 229 } |
| 229 | 230 |
| 230 } // namespace browser | 231 } // namespace browser |
| OLD | NEW |